From 706d829613eb60849847f246d8ef4b99e8992821 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 18:46:41 -0300 Subject: [PATCH 01/18] feat: componente de mensajes resaltados --- app/views/bootstrap/_alert.haml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/views/bootstrap/_alert.haml diff --git a/app/views/bootstrap/_alert.haml b/app/views/bootstrap/_alert.haml new file mode 100644 index 00000000..0fb3d2d3 --- /dev/null +++ b/app/views/bootstrap/_alert.haml @@ -0,0 +1,2 @@ +.alert.alert-primary{ role: 'alert', class: local_assigns[:class] } + = yield From d48231e725c9cb1929d9cf9e863d39aaeed3aae5 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 18:52:42 -0300 Subject: [PATCH 02/18] fix: usar siempre el componente --- app/views/invitadxs/show.haml | 2 +- app/views/layouts/_flash.haml | 3 ++- app/views/layouts/_help.haml | 1 + app/views/posts/_form.haml | 8 +++++--- app/views/posts/_submit.haml | 4 ++-- app/views/posts/attributes/_content.haml | 4 ++-- app/views/posts/index.haml | 2 +- app/views/sites/_form.haml | 10 ++++++---- 8 files changed, 20 insertions(+), 14 deletions(-) diff --git a/app/views/invitadxs/show.haml b/app/views/invitadxs/show.haml index e1d47288..0c23522b 100644 --- a/app/views/invitadxs/show.haml +++ b/app/views/invitadxs/show.haml @@ -1,4 +1,4 @@ .row.align-items-center.justify-content-center.full-height .col-md-6.align-self-center - .alert{role: 'alert', class: "alert-success"} + = render 'bootstrap/alert' do = t('.confirmation_sent') diff --git a/app/views/layouts/_flash.haml b/app/views/layouts/_flash.haml index 149f946f..7bd7ec0b 100644 --- a/app/views/layouts/_flash.haml +++ b/app/views/layouts/_flash.haml @@ -1,3 +1,4 @@ - flash.each do |type, message| - unless type == 'js' - .alert{ role: 'alert', class: "alert-#{type}" }= message + = render 'bootstrap/alert' do + = message diff --git a/app/views/layouts/_help.haml b/app/views/layouts/_help.haml index 7a821e2d..6800b524 100644 --- a/app/views/layouts/_help.haml +++ b/app/views/layouts/_help.haml @@ -1,3 +1,4 @@ +-# DEPRECADO .alert.alert-info.alert-dismissible.fade.show{role: 'alert'} - if help.respond_to? :each %ul diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index e46b2eda..f81cef58 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -1,7 +1,9 @@ - unless post.errors.empty? - .alert.alert-danger - %h4= t('.errors.title') - %p= t('.errors.help') + - title = t('.errors.title') + - help = t('.errors.help') + = render 'boostrap/alert' do + %h4= title + %p= help %ul - post.errors.each do |attribute, errors| diff --git a/app/views/posts/_submit.haml b/app/views/posts/_submit.haml index b21b5ff2..717b8bfe 100644 --- a/app/views/posts/_submit.haml +++ b/app/views/posts/_submit.haml @@ -1,6 +1,6 @@ .form-group = submit_tag t('.save'), class: 'btn submit-post' - .invalid-help.alert.alert-danger.d-none + = render 'boostrap/alert', class: 'invalid-help d-none' do = site.config.fetch('invalid_help', t('.invalid_help')) - .sending-help.alert.alert-success.d-none + = render 'boostrap/alert', class: 'sending-help d-none' do = site.config.fetch('sending_help', t('.sending_help')) diff --git a/app/views/posts/attributes/_content.haml b/app/views/posts/attributes/_content.haml index 36b88872..5db023fb 100644 --- a/app/views/posts/attributes/_content.haml +++ b/app/views/posts/attributes/_content.haml @@ -6,7 +6,7 @@ .editor{ id: attribute, data: { editor: '' } } -# Esto es para luego decirle al navegador que se olvide estas cosas. = hidden_field_tag 'storage_keys[]', "#{request.original_url}##{attribute}", data: { target: 'storage-key' } - .alert.alert-info + = render 'bootstrap/alert' do :markdown #{t('editor.alert')} = text_area_tag "#{base}[#{attribute}]", '', @@ -123,7 +123,7 @@ %label{ for: 'link-url' }= t('editor.url') %input.form-control{ type: 'url', id: 'link-url', name: 'link-url' }/ - .editor-aviso-word.alert.alert-info + = render 'bootstrap/alert', class: 'editor-aviso-word' do %p= t('editor.word') .editor-content.form-control.h-auto.mt-1{ contenteditable: 'true' } diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index a82616d8..54587fc5 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -34,7 +34,7 @@ = render 'sites/build', site: @site - if @site.design.credits - .alert.alert-primary{ role: 'alert' } + = render 'bootstrap/alert' do = sanitize_markdown @site.design.credits = link_to t('sites.donations.text'), t('sites.donations.url'), class: 'btn' - if @site.design.designer_url diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index 9a044c7f..757b8b48 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -1,7 +1,9 @@ - unless site.errors.empty? - .alert.alert-info - %h4= t('.errors.title') - %p.lead= t('.errors.help') + - title = t('.errors.title') + - help = t('.errors.help') + = render 'bootstrap/alert' do + %h4= title + %p.lead= help %ul - site.errors.messages.each_pair do |attr, error| - attr = attr.to_s @@ -48,7 +50,7 @@ %h2= t('.design.title') %p.lead= t('.help.design') - if invalid? site, :design_id - .alert.alert-info + = render 'bootstrap/alert' do = t('activerecord.errors.models.site.attributes.design_id.layout_incompatible.help', layouts: site.incompatible_layouts.to_sentence) .row.designs From 74a19ad9d9ced91d4e64dba51a48b4138ef133bb Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 18:55:48 -0300 Subject: [PATCH 03/18] feat: mostrar los mensajes en todas las vistas #12792 --- app/views/collaborations/collaborate.haml | 1 - app/views/devise/sessions/new.haml | 2 -- app/views/layouts/application.html.haml | 3 +++ app/views/posts/index.haml | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/collaborations/collaborate.haml b/app/views/collaborations/collaborate.haml index 50cad809..4d43ad7e 100644 --- a/app/views/collaborations/collaborate.haml +++ b/app/views/collaborations/collaborate.haml @@ -11,7 +11,6 @@ url: site_collaborate_path(@site), method: :post) do |f| - unless current_usuarie - = render 'layouts/flash' .form-group = f.label :email = f.email_field :email, autofocus: true, autocomplete: 'email', diff --git a/app/views/devise/sessions/new.haml b/app/views/devise/sessions/new.haml index b5223e5f..9b396187 100644 --- a/app/views/devise/sessions/new.haml +++ b/app/views/devise/sessions/new.haml @@ -3,8 +3,6 @@ .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center - = render 'layouts/flash' - .sr-only %h2= t('.sign_in') %p= t('.help') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 85d5ab22..965a856f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -21,6 +21,9 @@ %body{ class: yield(:body) } .container-fluid#sutty = render 'layouts/breadcrumb' + = render 'layouts/flash' + = yield + - if flash[:js] .js-flash.d-none{ data: flash[:js] } diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index 54587fc5..dbeddaad 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -41,7 +41,6 @@ = link_to t('sites.designer_url'), @site.design.designer_url, class: 'btn' %section.col - = render 'layouts/flash' .d-flex.justify-content-between.align-items-center.pl-2-plus.pr-2-plus.mb-2 %form{ action: site_posts_path } - @filter_params.each do |param, value| From f3845c755f5057ac4512120041ccfdbf30badf75 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 19:03:00 -0300 Subject: [PATCH 04/18] fix: informar que hay que confirmar la cuenta --- config/locales/devise.views.en.yml | 2 +- config/locales/devise.views.es.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/devise.views.en.yml b/config/locales/devise.views.en.yml index fd041b33..ae024645 100644 --- a/config/locales/devise.views.en.yml +++ b/config/locales/devise.views.en.yml @@ -104,7 +104,7 @@ en: 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: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." 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. signed_up_but_unconfirmed: A message with a confirmation link has been sent to your email address. Please follow the link to activate your account. diff --git a/config/locales/devise.views.es.yml b/config/locales/devise.views.es.yml index 73166afc..b9e2e5e4 100644 --- a/config/locales/devise.views.es.yml +++ b/config/locales/devise.views.es.yml @@ -104,7 +104,7 @@ es: new: sign_up: Registrarme 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: "Hemos enviado un mensaje con un enlace de confirmación a tu correo electrónico. Por favor, abrí el enlace para terminar de activar tu cuenta." 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. signed_up_but_unconfirmed: Para recibir actualizaciones, se ha enviado un mensaje con un enlace de confirmación a tu correo electrónico. Abre el enlace para activar tu cuenta. From b415b3f3cfba3bb8dfc70c71b63038b1674201bd Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 19:05:15 -0300 Subject: [PATCH 05/18] =?UTF-8?q?fix:=20especificar=20d=C3=B3nde=20se=20pu?= =?UTF-8?q?ede=20pedir=20reconfirmaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/devise.views.en.yml | 2 +- config/locales/devise.views.es.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/devise.views.en.yml b/config/locales/devise.views.en.yml index ae024645..33f7870b 100644 --- a/config/locales/devise.views.en.yml +++ b/config/locales/devise.views.en.yml @@ -138,7 +138,7 @@ en: errors: messages: already_confirmed: was already confirmed, please try signing in - confirmation_period_expired: needs to be confirmed within %{period}, please request a new one + confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one using the \"Didn't receive confirmation instructions?\" link" expired: has expired, please request a new one not_found: not found not_locked: was not locked diff --git a/config/locales/devise.views.es.yml b/config/locales/devise.views.es.yml index b9e2e5e4..63e3ae41 100644 --- a/config/locales/devise.views.es.yml +++ b/config/locales/devise.views.es.yml @@ -138,7 +138,7 @@ es: errors: messages: already_confirmed: ya ha sido confirmada, por favor intenta iniciar sesión - confirmation_period_expired: necesita confirmarse dentro de %{period}, por favor solicita una nueva + confirmation_period_expired: "necesita confirmarse dentro de %{period}, por favor solicita un nuevo código de confirmación usando la opción \"¿No has recibido las instrucciones de confirmación?\"" expired: ha expirado, por favor solicita una nueva not_found: no se ha encontrado not_locked: no estaba bloqueada From 40e68da16a59d9220299ab6c42428e414de293c2 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 19:18:11 -0300 Subject: [PATCH 06/18] fix: mostrar los errores de devise --- app/views/devise/confirmations/new.haml | 4 ++-- app/views/devise/invitations/edit.haml | 3 ++- app/views/devise/invitations/new.haml | 3 ++- app/views/devise/passwords/edit.haml | 3 ++- app/views/devise/passwords/new.haml | 3 ++- app/views/devise/registrations/edit.haml | 4 ++-- app/views/devise/registrations/new.haml | 4 ++-- app/views/devise/shared/_error_messages.haml | 9 ++++----- app/views/devise/unlocks/new.haml | 3 ++- 9 files changed, 20 insertions(+), 16 deletions(-) diff --git a/app/views/devise/confirmations/new.haml b/app/views/devise/confirmations/new.haml index 59568cb7..bc2f77bb 100644 --- a/app/views/devise/confirmations/new.haml +++ b/app/views/devise/confirmations/new.haml @@ -1,6 +1,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-4.align-self-center .sr-only @@ -11,8 +13,6 @@ url: confirmation_path(resource_name), html: { method: :post }) do |f| - = render 'devise/shared/error_messages', resource: resource - :ruby value = if resource.pending_reconfirmation? resource.unconfirmed_email diff --git a/app/views/devise/invitations/edit.haml b/app/views/devise/invitations/edit.haml index 565429a8..ed4980ef 100644 --- a/app/views/devise/invitations/edit.haml +++ b/app/views/devise/invitations/edit.haml @@ -1,6 +1,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center %h2= t 'devise.invitations.edit.header' @@ -8,7 +10,6 @@ as: resource_name, url: invitation_path(resource_name), html: { method: :put }) do |f| - = render 'devise/shared/error_messages', resource: resource = f.hidden_field :invitation_token, readonly: true - if f.object.class.require_password_on_accepting .form-group diff --git a/app/views/devise/invitations/new.haml b/app/views/devise/invitations/new.haml index 44ceec2e..4ebb8fa7 100644 --- a/app/views/devise/invitations/new.haml +++ b/app/views/devise/invitations/new.haml @@ -1,6 +1,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center %h2= t 'devise.invitations.new.header' @@ -8,7 +10,6 @@ as: resource_name, url: invitation_path(resource_name), html: { method: :post }) do |f| - = render 'devise/shared/error_messages', resource: resource - resource.class.invite_key_fields.each do |field| .form-group = f.label field diff --git a/app/views/devise/passwords/edit.haml b/app/views/devise/passwords/edit.haml index 7f7b16fb..3a8843c0 100644 --- a/app/views/devise/passwords/edit.haml +++ b/app/views/devise/passwords/edit.haml @@ -1,6 +1,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center .sr-only @@ -10,7 +12,6 @@ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| - = render 'devise/shared/error_messages', resource: resource = f.hidden_field :reset_password_token diff --git a/app/views/devise/passwords/new.haml b/app/views/devise/passwords/new.haml index 3c80b8a0..08dd8d2e 100644 --- a/app/views/devise/passwords/new.haml +++ b/app/views/devise/passwords/new.haml @@ -1,6 +1,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center .sr-only @@ -11,7 +13,6 @@ as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| - = render 'devise/shared/error_messages', resource: resource .form-group = f.label :email, class: 'sr-only' = f.email_field :email, autofocus: true, autocomplete: 'email', diff --git a/app/views/devise/registrations/edit.haml b/app/views/devise/registrations/edit.haml index 6a25da65..92699ab8 100644 --- a/app/views/devise/registrations/edit.haml +++ b/app/views/devise/registrations/edit.haml @@ -3,6 +3,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-6.align-self-center %h2= t('.title') @@ -11,8 +13,6 @@ url: registration_path(resource_name), html: { method: :put }) do |f| - = render 'devise/shared/error_messages', resource: resource - .form-group = f.label :email = f.email_field :email, autofocus: true, autocomplete: 'email', diff --git a/app/views/devise/registrations/new.haml b/app/views/devise/registrations/new.haml index 21676556..e6bda964 100644 --- a/app/views/devise/registrations/new.haml +++ b/app/views/devise/registrations/new.haml @@ -1,6 +1,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center %h2= t('.sign_up') @@ -10,8 +12,6 @@ as: resource_name, url: registration_path(resource_name, params: { locale: params[:locale] })) do |f| - = render 'devise/shared/error_messages', resource: resource - .form-group = f.label :email, class: 'sr-only' = f.email_field :email, autofocus: true, autocomplete: 'email', diff --git a/app/views/devise/shared/_error_messages.haml b/app/views/devise/shared/_error_messages.haml index a921fd61..0f0c1835 100644 --- a/app/views/devise/shared/_error_messages.haml +++ b/app/views/devise/shared/_error_messages.haml @@ -1,9 +1,8 @@ - if resource.errors.any? - #error_explanation - %h2 + = render 'bootstrap/alert' do + %h4.alert-heading = I18n.t("errors.messages.not_saved", | count: resource.errors.count, | resource: resource.class.model_name.human.downcase) | - %ul - - resource.errors.full_messages.each do |message| - %li= message + - resource.errors.full_messages.each do |message| + %p= message diff --git a/app/views/devise/unlocks/new.haml b/app/views/devise/unlocks/new.haml index ac511115..09468a52 100644 --- a/app/views/devise/unlocks/new.haml +++ b/app/views/devise/unlocks/new.haml @@ -1,6 +1,8 @@ = content_for :body do - 'black-bg' += render 'devise/shared/error_messages', resource: resource + .row.align-items-center.justify-content-center.full-height .col-md-5.align-self-center .sr-only @@ -11,7 +13,6 @@ as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| - = render 'devise/shared/error_messages', resource: resource .form-group = f.label :email, class: 'sr-only' = f.email_field :email, autofocus: true, autocomplete: 'email', From 944668edbe6c2fa51d0bdce2c8dcb22802760798 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 19:18:30 -0300 Subject: [PATCH 07/18] =?UTF-8?q?fix:=20mostrar=20siempre=20los=20links=20?= =?UTF-8?q?de=20recuperaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit por si se vencen, poder encontrarlos --- app/views/devise/shared/_links.haml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/devise/shared/_links.haml b/app/views/devise/shared/_links.haml index b4b89175..479eb457 100644 --- a/app/views/devise/shared/_links.haml +++ b/app/views/devise/shared/_links.haml @@ -18,17 +18,16 @@ new_password_path(resource_name, params: locale) %br/ -- if devise_mapping.confirmable? && controller_name != 'confirmations' +- if devise_mapping.confirmable? = link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name, params: locale) %br/ - if devise_mapping.lockable? - if resource_class.unlock_strategy_enabled?(:email) - - if controller_name != 'unlocks' - = link_to t('.didn_t_receive_unlock_instructions'), - new_unlock_path(resource_name, params: locale) - %br/ + = link_to t('.didn_t_receive_unlock_instructions'), + new_unlock_path(resource_name, params: locale) + %br/ - if devise_mapping.omniauthable? - resource_class.omniauth_providers.each do |provider| From 79f8241dec54f788910d2f8291b71468e1133f5c Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 19:18:55 -0300 Subject: [PATCH 08/18] fix: ser especificxs --- config/locales/devise.views.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.views.en.yml b/config/locales/devise.views.en.yml index 33f7870b..027311c9 100644 --- a/config/locales/devise.views.en.yml +++ b/config/locales/devise.views.en.yml @@ -138,7 +138,7 @@ en: errors: messages: already_confirmed: was already confirmed, please try signing in - confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one using the \"Didn't receive confirmation instructions?\" link" + confirmation_period_expired: "needs to be confirmed within %{period}, please request a new confirmation link using the \"Didn't receive confirmation instructions?\" option below" expired: has expired, please request a new one not_found: not found not_locked: was not locked From 445bf26257333d6fb3f96e374721b14d02b88ac6 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Mar 2023 19:21:07 -0300 Subject: [PATCH 09/18] =?UTF-8?q?fix:=20hacer=20la=20caja=20m=C3=A1s=20leg?= =?UTF-8?q?ible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/application.scss | 4 ++++ app/views/bootstrap/_alert.haml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index b756759a..72c7788d 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -25,6 +25,10 @@ $spacers: ( 2-plus: 0.75rem ); +$sizes: ( + "70ch": 70ch, +); + @import "bootstrap"; @import "editor"; diff --git a/app/views/bootstrap/_alert.haml b/app/views/bootstrap/_alert.haml index 0fb3d2d3..395f75d2 100644 --- a/app/views/bootstrap/_alert.haml +++ b/app/views/bootstrap/_alert.haml @@ -1,2 +1,2 @@ -.alert.alert-primary{ role: 'alert', class: local_assigns[:class] } +.alert.alert-primary.mx-auto.content.max-w-70ch{ role: 'alert', class: local_assigns[:class] } = yield From 6856b605176ea40b43e039eff1de69eecb9866b2 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 12:05:55 -0300 Subject: [PATCH 10/18] fixup! fix: usar siempre el componente --- app/views/posts/_form.haml | 2 +- app/views/posts/_submit.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index f81cef58..7de0ea79 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -1,7 +1,7 @@ - unless post.errors.empty? - title = t('.errors.title') - help = t('.errors.help') - = render 'boostrap/alert' do + = render 'bootstrap/alert' do %h4= title %p= help diff --git a/app/views/posts/_submit.haml b/app/views/posts/_submit.haml index 717b8bfe..cad43320 100644 --- a/app/views/posts/_submit.haml +++ b/app/views/posts/_submit.haml @@ -1,6 +1,6 @@ .form-group = submit_tag t('.save'), class: 'btn submit-post' - = render 'boostrap/alert', class: 'invalid-help d-none' do + = render 'bootstrap/alert', class: 'invalid-help d-none' do = site.config.fetch('invalid_help', t('.invalid_help')) - = render 'boostrap/alert', class: 'sending-help d-none' do + = render 'bootstrap/alert', class: 'sending-help d-none' do = site.config.fetch('sending_help', t('.sending_help')) From 40dfa65bc2ae690b684e18478f5a0cde7857fc29 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 16:40:10 -0300 Subject: [PATCH 11/18] =?UTF-8?q?feat:=20anchos=20y=20altos=20m=C3=A1ximos?= =?UTF-8?q?=20y=20m=C3=ADnimos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/application.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 72c7788d..830769a7 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -408,6 +408,8 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1); @each $prop, $abbrev in (width: w, height: h) { @each $size, $length in $sizes { .#{$abbrev}-#{$grid-breakpoint}-#{$size} { #{$prop}: $length !important; } + .min-#{$abbrev}#{$infix}-#{$size} { min-#{$prop}: $length !important; } + .max-#{$abbrev}#{$infix}-#{$size} { max-#{$prop}: $length !important; } } } From 951a04574528646272724f4263dd2d5db4fa496d Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 16:43:11 -0300 Subject: [PATCH 12/18] =?UTF-8?q?fix:=20no=20mostrar=20un=20t=C3=ADtulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/devise/shared/_error_messages.haml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/devise/shared/_error_messages.haml b/app/views/devise/shared/_error_messages.haml index 0f0c1835..64340e4f 100644 --- a/app/views/devise/shared/_error_messages.haml +++ b/app/views/devise/shared/_error_messages.haml @@ -1,8 +1,4 @@ - if resource.errors.any? = render 'bootstrap/alert' do - %h4.alert-heading - = I18n.t("errors.messages.not_saved", | - count: resource.errors.count, | - resource: resource.class.model_name.human.downcase) | - resource.errors.full_messages.each do |message| %p= message From 167aaf5549106394e15c448731ec938d13ea068d Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 16:43:19 -0300 Subject: [PATCH 13/18] =?UTF-8?q?Revert=20"fix:=20mostrar=20siempre=20los?= =?UTF-8?q?=20links=20de=20recuperaci=C3=B3n"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 944668edbe6c2fa51d0bdce2c8dcb22802760798. --- app/views/devise/shared/_links.haml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/devise/shared/_links.haml b/app/views/devise/shared/_links.haml index 479eb457..b4b89175 100644 --- a/app/views/devise/shared/_links.haml +++ b/app/views/devise/shared/_links.haml @@ -18,16 +18,17 @@ new_password_path(resource_name, params: locale) %br/ -- if devise_mapping.confirmable? +- if devise_mapping.confirmable? && controller_name != 'confirmations' = link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name, params: locale) %br/ - if devise_mapping.lockable? - if resource_class.unlock_strategy_enabled?(:email) - = link_to t('.didn_t_receive_unlock_instructions'), - new_unlock_path(resource_name, params: locale) - %br/ + - if controller_name != 'unlocks' + = link_to t('.didn_t_receive_unlock_instructions'), + new_unlock_path(resource_name, params: locale) + %br/ - if devise_mapping.omniauthable? - resource_class.omniauth_providers.each do |provider| From 1f921d836f537994fbba18c4df302dea4a9455e5 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 20:18:52 -0300 Subject: [PATCH 14/18] =?UTF-8?q?fixup!=20feat:=20anchos=20y=20altos=20m?= =?UTF-8?q?=C3=A1ximos=20y=20m=C3=ADnimos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/application.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 830769a7..0e602ac0 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -408,8 +408,8 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1); @each $prop, $abbrev in (width: w, height: h) { @each $size, $length in $sizes { .#{$abbrev}-#{$grid-breakpoint}-#{$size} { #{$prop}: $length !important; } - .min-#{$abbrev}#{$infix}-#{$size} { min-#{$prop}: $length !important; } - .max-#{$abbrev}#{$infix}-#{$size} { max-#{$prop}: $length !important; } + .min-#{$abbrev}#{$grid-breakpoint}-#{$size} { min-#{$prop}: $length !important; } + .max-#{$abbrev}#{$grid-breakpoint}-#{$size} { max-#{$prop}: $length !important; } } } From ce26c15a505173e8a1579fcdc7578bd4312c74fe Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 20:34:54 -0300 Subject: [PATCH 15/18] fix: mejorar el texto --- config/locales/devise.views.en.yml | 2 +- config/locales/devise.views.es.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/devise.views.en.yml b/config/locales/devise.views.en.yml index 027311c9..793f3a0a 100644 --- a/config/locales/devise.views.en.yml +++ b/config/locales/devise.views.en.yml @@ -138,7 +138,7 @@ en: errors: messages: already_confirmed: was already confirmed, please try signing in - confirmation_period_expired: "needs to be confirmed within %{period}, please request a new confirmation link using the \"Didn't receive confirmation instructions?\" option below" + confirmation_period_expired: "wasn't confirmed within %{period}. Please request a new confirmation link by using the \"Resend confirmation instructions\" button below and find it in your inbox." expired: has expired, please request a new one not_found: not found not_locked: was not locked diff --git a/config/locales/devise.views.es.yml b/config/locales/devise.views.es.yml index 63e3ae41..896bcdda 100644 --- a/config/locales/devise.views.es.yml +++ b/config/locales/devise.views.es.yml @@ -138,7 +138,7 @@ es: errors: messages: already_confirmed: ya ha sido confirmada, por favor intenta iniciar sesión - confirmation_period_expired: "necesita confirmarse dentro de %{period}, por favor solicita un nuevo código de confirmación usando la opción \"¿No has recibido las instrucciones de confirmación?\"" + confirmation_period_expired: "sin confirmar luego de %{period}. Por favor, usa el botón \"Reenviar instrucciones de confirmación\" y busca el nuevo link en tu casilla." expired: ha expirado, por favor solicita una nueva not_found: no se ha encontrado not_locked: no estaba bloqueada From a7b199941d5cb3f622712ef065516931792953d7 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Mar 2023 20:39:27 -0300 Subject: [PATCH 16/18] =?UTF-8?q?fixup!=20feat:=20anchos=20y=20altos=20m?= =?UTF-8?q?=C3=A1ximos=20y=20m=C3=ADnimos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/application.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 0e602ac0..2f52829b 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -408,8 +408,8 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1); @each $prop, $abbrev in (width: w, height: h) { @each $size, $length in $sizes { .#{$abbrev}-#{$grid-breakpoint}-#{$size} { #{$prop}: $length !important; } - .min-#{$abbrev}#{$grid-breakpoint}-#{$size} { min-#{$prop}: $length !important; } - .max-#{$abbrev}#{$grid-breakpoint}-#{$size} { max-#{$prop}: $length !important; } + .min-#{$abbrev}-#{$grid-breakpoint}-#{$size} { min-#{$prop}: $length !important; } + .max-#{$abbrev}-#{$grid-breakpoint}-#{$size} { max-#{$prop}: $length !important; } } } From 16c3fa24132037b3ff973b97c97edcb7fbdc8b56 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 30 Mar 2023 14:56:22 -0300 Subject: [PATCH 17/18] =?UTF-8?q?fix:=20ancho=20m=C3=A1ximo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bootstrap/_alert.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/bootstrap/_alert.haml b/app/views/bootstrap/_alert.haml index 395f75d2..85bcbe84 100644 --- a/app/views/bootstrap/_alert.haml +++ b/app/views/bootstrap/_alert.haml @@ -1,2 +1,2 @@ -.alert.alert-primary.mx-auto.content.max-w-70ch{ role: 'alert', class: local_assigns[:class] } +.alert.alert-primary.mx-auto.content.max-w-md-70ch{ role: 'alert', class: local_assigns[:class] } = yield From aff16fdf779f674257e53f382aa18da71d828d81 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 30 Mar 2023 16:50:45 -0300 Subject: [PATCH 18/18] fix: texto --- config/locales/devise.views.es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/devise.views.es.yml b/config/locales/devise.views.es.yml index 896bcdda..b745fc5f 100644 --- a/config/locales/devise.views.es.yml +++ b/config/locales/devise.views.es.yml @@ -138,7 +138,7 @@ es: errors: messages: already_confirmed: ya ha sido confirmada, por favor intenta iniciar sesión - confirmation_period_expired: "sin confirmar luego de %{period}. Por favor, usa el botón \"Reenviar instrucciones de confirmación\" y busca el nuevo link en tu casilla." + confirmation_period_expired: "quedó sin confirmar luego de %{period}. Por favor, usa el botón \"Reenviar instrucciones de confirmación\" y busca el nuevo link en tu casilla." expired: ha expirado, por favor solicita una nueva not_found: no se ha encontrado not_locked: no estaba bloqueada