From e67854fe568d1fccfa906040bd4172907f4d6130 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Thu, 30 Nov 2023 01:50:22 +0200 Subject: [PATCH] better sign yourself flow --- app/controllers/application_controller.rb | 5 ++-- app/javascript/template_builder/builder.vue | 26 +++++++++++++---- app/views/dashboard/index.html.erb | 2 +- app/views/shared/_button_title.html.erb | 4 +-- app/views/submissions/_detailed_form.html.erb | 16 ++++++----- app/views/submissions/_email_form.html.erb | 14 ++++++---- app/views/submissions/_phone_form.html.erb | 16 ++++++----- app/views/submissions/new.html.erb | 2 +- app/views/submissions/show.html.erb | 2 +- app/views/templates/_submission.html.erb | 26 +++++++++++++++-- app/views/templates/_title.html.erb | 9 ++++-- app/views/templates/new.html.erb | 2 +- app/views/templates/show.html.erb | 28 ++++++++++--------- 13 files changed, 101 insertions(+), 51 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 38b541aa..16aa80fa 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -44,8 +44,9 @@ class ApplicationController < ActionController::Base redirect_to setup_index_path unless User.exists? end - def button_title(title: 'Submit', disabled_with: 'Submitting', icon: nil, icon_disabled: nil) - render_to_string(partial: 'shared/button_title', locals: { title:, disabled_with:, icon:, icon_disabled: }) + def button_title(title: 'Submit', disabled_with: 'Submitting', title_class: '', icon: nil, icon_disabled: nil) + render_to_string(partial: 'shared/button_title', + locals: { title:, disabled_with:, title_class:, icon:, icon_disabled: }) end def svg_icon(icon_name, class: '') diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue index 18faa713..9439523c 100644 --- a/app/javascript/template_builder/builder.vue +++ b/app/javascript/template_builder/builder.vue @@ -8,7 +8,7 @@ class="flex justify-between py-1.5 items-center pr-4 sticky top-0 z-10" :style="{ backgroundColor }" > -
+