From f03e42f350474954811481ebdb4543959059e2a6 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 13:54:10 -0300 Subject: [PATCH 1/8] boton de registro #80 --- app/views/devise/shared/_links.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/devise/shared/_links.haml b/app/views/devise/shared/_links.haml index 0e646e41..c182d323 100644 --- a/app/views/devise/shared/_links.haml +++ b/app/views/devise/shared/_links.haml @@ -5,7 +5,8 @@ %br/ - if devise_mapping.registerable? && controller_name != 'registrations' - = link_to t('.sign_up'), new_registration_path(resource_name) + = link_to t('.sign_up'), new_registration_path(resource_name), + class: 'btn btn-lg btn-block btn-success' %br/ - if devise_mapping.recoverable? From e868462dbf8ce248e8f7adedc923da75f1c27e4b Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 13:56:29 -0300 Subject: [PATCH 2/8] mensaje de bienvenida --- app/views/devise/registrations/new.haml | 5 ++--- config/locales/devise.views.en.yml | 3 ++- config/locales/devise.views.es.yml | 8 ++++---- config/locales/es.yml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/devise/registrations/new.haml b/app/views/devise/registrations/new.haml index 41d2fbfa..92a44aec 100644 --- a/app/views/devise/registrations/new.haml +++ b/app/views/devise/registrations/new.haml @@ -5,9 +5,8 @@ .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center - .sr-only - %h2= t('.sign_up') - %p= t('.help') + %h2= t('.sign_up') + %p= t('.help') = form_for(resource, as: resource_name, diff --git a/config/locales/devise.views.en.yml b/config/locales/devise.views.en.yml index d4c60db0..fd041b33 100644 --- a/config/locales/devise.views.en.yml +++ b/config/locales/devise.views.en.yml @@ -44,7 +44,7 @@ en: locked: Your account is locked. not_found_in_database: Invalid %{authentication_keys} or password. timeout: Your session expired. Please sign in again to continue. - unauthenticated: You need to sign in or sign up before continuing. + unauthenticated: Hi! You need to sign in or sign up before managing your sites. unconfirmed: You have to confirm your email address before continuing. mailer: confirmation_instructions: @@ -103,6 +103,7 @@ en: we_need_your_current_password_to_confirm_your_changes: We need your current password to confirm your changes new: sign_up: Sign up + help: We only ask for an e-mail address and a password. The password is safely stored, no one else besides you knows it! You'll also receive an e-mail to confirm your account. signed_up: Welcome! You have signed up successfully. signed_up_but_inactive: You have signed up successfully. However, we could not sign you in because your account is not yet activated. signed_up_but_locked: You have signed up successfully. However, we could not sign you in because your account is locked. diff --git a/config/locales/devise.views.es.yml b/config/locales/devise.views.es.yml index 508930c1..d0f57934 100644 --- a/config/locales/devise.views.es.yml +++ b/config/locales/devise.views.es.yml @@ -16,7 +16,7 @@ es: last_sign_in_ip: IP del último inicio locked_at: Fecha de bloqueo password: Contraseña - password_confirmation: Confirmación de la contraseña + password_confirmation: Confirma tu contraseña remember_created_at: Fecha de 'Recordarme' remember_me: Recordarme reset_password_sent_at: Fecha de envío de código para contraseña @@ -44,7 +44,7 @@ es: locked: Tu cuenta está bloqueada. not_found_in_database: "%{authentication_keys} o contraseña inválidos." timeout: Tu sesión expiró. Por favor, inicia sesión nuevamente para continuar. - unauthenticated: Tienes que iniciar sesión o registrarte para poder continuar. + unauthenticated: "¡Hola! Tienes que iniciar sesión o registrarte para poder gestionar tus sitios." unconfirmed: Te enviamos un correo electrónico para confirmar tu cuenta, por favor acéptalo para poder continuar. mailer: confirmation_instructions: @@ -80,7 +80,7 @@ es: edit: change_my_password: Cambiar mi contraseña change_your_password: Cambia tu contraseña - confirm_new_password: Confirme la nueva contraseña + confirm_new_password: Confirma la nueva contraseña new_password: Nueva contraseña new: forgot_your_password: "¿Has olvidado tu contraseña?" @@ -103,7 +103,7 @@ es: we_need_your_current_password_to_confirm_your_changes: Necesitamos tu contraseña actual para confirmar los cambios. new: sign_up: Registrarme por primera vez - email: O simplemente continuar con tu dirección de correo y contraseña + help: Para registrarte solo pedimos una dirección de correo y una contraseña. La contraseña se almacena de forma segura, ¡nadie más que vos la sabe! Recibirás un correo de confirmación de cuenta. signed_up: Bienvenide. Tu cuenta fue creada. signed_up_but_inactive: Tu cuenta ha sido creada correctamente. Sin embargo, no hemos podido iniciar la sesión porque tu cuenta aún no está activada. signed_up_but_locked: Tu cuenta ha sido creada correctamente. Sin embargo, no hemos podido iniciar la sesión porque que tu cuenta está bloqueada. diff --git a/config/locales/es.yml b/config/locales/es.yml index 3a11551a..fffb3378 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -71,7 +71,7 @@ es: usuarie: email: 'Correo electrónico' password: 'Contraseña' - password_confirmation: 'Confirmación de contraseña' + password_confirmation: 'Confirma tu contraseña' current_password: 'Contraseña actual' lang: Idioma principal remember_me: Recordarme From b28ca182a77f4be245b211db0526d710abf50267 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 14:08:48 -0300 Subject: [PATCH 3/8] permitir ingresar sin confirmar la cuenta #80 --- config/initializers/devise.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index ea927a67..4980a93b 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -197,7 +197,7 @@ Devise.setup do |config| # website without confirming their account. # Default is 0.days, meaning the user cannot access the website # without confirming their account. - # config.allow_unconfirmed_access_for = 2.days + config.allow_unconfirmed_access_for = 2.days # A period that the user is allowed to confirm their account before # their token becomes invalid. For example, if set to 3.days, the user From 96fc65a94fe9cb16c4ea7b486816e85153652b7c Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 14:23:38 -0300 Subject: [PATCH 4/8] mensaje de bienvenida #80 --- app/views/sites/index.haml | 3 +++ config/locales/en.yml | 17 ++++++++++++++++- config/locales/es.yml | 12 ++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/app/views/sites/index.haml b/app/views/sites/index.haml index 0cd3562c..759e9e38 100644 --- a/app/views/sites/index.haml +++ b/app/views/sites/index.haml @@ -9,6 +9,9 @@ class: 'btn' %section.col + - if @sites.empty? + :markdown + #{t('.welcome')} %table.table.table-condensed %tbody - @sites.each do |site| diff --git a/config/locales/en.yml b/config/locales/en.yml index 4e0d1c8d..1a452b5a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -251,7 +251,22 @@ en: title: 'Sites' pull: 'Upgrade' help: 'This is the list of sites you can edit' - visit: 'Visitar el sitio' + visit: 'Visit the site' + welcome: | + # Welcome! + + You have no sites yet. You can generate all the sites you want + with the **Create site** button. + + Para ver los cambios, usa el botón **Publicar cambios** en cada + sitio y espera unos segundos. También recibirás un correo de + notificación. + + To see your changes, use the **Publish changes** button on each + site and wait a few seconds. You'll also receive an e-mail + notification. + + [Create my first site](/sites/new) repository: config: 'Changes in config' actions: 'Actions' diff --git a/config/locales/es.yml b/config/locales/es.yml index fffb3378..fd15d75b 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -257,6 +257,18 @@ es: pull: 'Actualizar' help: 'Este es el listado de sitios que puedes editar' visit: 'Visitar el sitio' + welcome: | + # ¡Bienvenide! + + Todavía no tienes ningún sitio. Puedes crear todos los sitios + que quieras usando el botón **Crear sitio**. + + Para ver los cambios, usa el botón **Publicar cambios** en cada + sitio y espera unos segundos. También recibirás un correo de + notificación. + + [Crear mi primer sitio](/sites/new) + repository: config: 'Cambios en la configuración' actions: 'Acciones' From cc4d49b3984b262287398abd8841cc3e591e03f0 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 14:25:42 -0300 Subject: [PATCH 5/8] =?UTF-8?q?quitar=20el=20bot=C3=B3n=20de=20ayuda=20mut?= =?UTF-8?q?ua=20temporalmente=20#80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hasta que resolvamos la usabilidad del chat --- app/views/layouts/_breadcrumb.haml | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/views/layouts/_breadcrumb.haml b/app/views/layouts/_breadcrumb.haml index 8d9939eb..3551153a 100644 --- a/app/views/layouts/_breadcrumb.haml +++ b/app/views/layouts/_breadcrumb.haml @@ -21,9 +21,6 @@ - if current_usuarie %ul.navbar-nav - %li.nav-item - = link_to t('.mutual_aid'), mutual_aid_url(local_channel), - class: 'btn' %li.nav-item = link_to t('.logout'), destroy_usuarie_session_path, method: :delete, role: 'button', class: 'btn' From 8667215a2ada4172845e5ec9fb6f7fb888b58e2d Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 14:41:57 -0300 Subject: [PATCH 6/8] dar menos opciones al crear el sitio #80 --- app/views/sites/_form.haml | 20 +++++++++++++------- app/views/sites/edit.haml | 4 ++-- app/views/sites/new.haml | 5 +++-- config/locales/es.yml | 1 + 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index 60e5a8de..18814dca 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -86,14 +86,20 @@ %hr/ - .form-group - %h2= t('.deploys.title') - %p.lead= t('.help.deploys') - + - unless site.persisted? = f.fields_for :deploys do |deploy| - = render "deploys/#{deploy.object.type.underscore}", - deploy: deploy, site: site - %hr/ + - next unless deploy.object.kind_of? DeployLocal + = deploy.hidden_field :type + + - else + .form-group + %h2= t('.deploys.title') + %p.lead= t('.help.deploys') + + = f.fields_for :deploys do |deploy| + = render "deploys/#{deploy.object.type.underscore}", + deploy: deploy, site: site + %hr/ .form-group = f.submit submit, class: 'btn btn-lg btn-block' diff --git a/app/views/sites/edit.haml b/app/views/sites/edit.haml index 7edbb057..cc5977cf 100644 --- a/app/views/sites/edit.haml +++ b/app/views/sites/edit.haml @@ -1,8 +1,8 @@ = render 'layouts/breadcrumb', crumbs: [link_to(t('sites.index.title'), sites_path), t('.title', site: @site.name)] -.row - .col +.row.justify-content-center + .col-md-8 %h1= t('.title', site: @site.name) = render 'form', site: @site, submit: t('.submit') diff --git a/app/views/sites/new.haml b/app/views/sites/new.haml index f4efbea0..fa724421 100644 --- a/app/views/sites/new.haml +++ b/app/views/sites/new.haml @@ -1,8 +1,9 @@ = render 'layouts/breadcrumb', crumbs: [link_to(t('sites.index.title'), sites_path), t('.title')] -.row - .col +.row.justify-content-center + .col-md-8 %h1= t('.title') + %p.lead= t('.help') = render 'form', site: @site, submit: t('.submit') diff --git a/config/locales/es.yml b/config/locales/es.yml index fd15d75b..163f3f33 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -284,6 +284,7 @@ es: new: title: 'Crear un sitio' submit: 'Crear sitio' + help: 'Podrás editar estas opciones más adelante en la configuración del sitio.' edit: title: 'Editar %{site}' submit: 'Guardar cambios' From 53bb1ccb32a890c3a129ca3ca86986d8184bcb3d Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 14:43:02 -0300 Subject: [PATCH 7/8] =?UTF-8?q?acomodar=20el=20bot=C3=B3n=20de=20publicaci?= =?UTF-8?q?=C3=B3n=20de=20cambios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/sites/_build.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/sites/_build.haml b/app/views/sites/_build.haml index d85e83cf..ca68765c 100644 --- a/app/views/sites/_build.haml +++ b/app/views/sites/_build.haml @@ -7,7 +7,7 @@ link: nil - else = form_tag site_enqueue_path(site), - method: :post, class: 'form-inline' do + method: :post, class: 'form-inline inline' do = button_tag type: 'submit', class: 'btn no-border-radius', title: t('help.sites.enqueue'), From 7623ce6297094d6b5521a3f41c8ff51af7458185 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 14:45:00 -0300 Subject: [PATCH 8/8] margen entre botones #80 --- app/assets/stylesheets/application.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 5894e684..f6db8fef 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -185,6 +185,7 @@ svg { color: var(--background); border: none; border-radius: 0; + margin-right: 0.3rem; &:hover { color: var(--background);