diff --git a/Gemfile.lock b/Gemfile.lock index 19b6e4cff..0fd7810ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -169,7 +169,7 @@ GEM factory_bot_rails (5.0.2) factory_bot (~> 5.0.2) railties (>= 4.2.0) - faker (1.9.5) + faker (1.9.6) i18n (>= 0.7) faraday (0.15.4) multipart-post (>= 1.2, < 3) diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index da3f38ec8..2fa078313 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -18,7 +18,7 @@ module IconsHelper end def member_icon - icon('fas', 'user') + icon('far', 'user') end def harvest_icon diff --git a/app/views/devise/registrations/_delete.html.haml b/app/views/devise/registrations/_delete.html.haml index cbe5263c4..ddcf82dbd 100644 --- a/app/views/devise/registrations/_delete.html.haml +++ b/app/views/devise/registrations/_delete.html.haml @@ -2,6 +2,7 @@ %br/ = render 'devise/shared/error_messages', resource: resource + %p Delete your account from #{ENV['GROWSTUFF_SITE_NAME']}. .form-group = f.label :current_password, "Password required to delete", class: 'control-label col-md-2' .col-md-4 @@ -9,4 +10,4 @@ .form-group .form-actions.col-md-offset-2.col-md-8 - = f.submit "Delete", class: 'btn btn-primary' + = f.submit "Delete", class: 'btn btn-danger' diff --git a/app/views/devise/registrations/_edit_apps.html.haml b/app/views/devise/registrations/_edit_apps.html.haml index 05e9546c2..cd813558a 100644 --- a/app/views/devise/registrations/_edit_apps.html.haml +++ b/app/views/devise/registrations/_edit_apps.html.haml @@ -3,20 +3,18 @@ html: { method: :put, class: 'form-horizontal' }) do |_f| %br/ = render 'devise/shared/error_messages', resource: resource - .row .col-md-12 %p = image_tag "twitter_32.png", size: "32x32", alt: 'Twitter logo' - if @twitter_auth You are connected to Twitter as - = succeed "." do - = link_to @twitter_auth.name, "http://twitter.com/#{@twitter_auth.name}" + = link_to @twitter_auth.name, "http://twitter.com/#{@twitter_auth.name}" = link_to "Disconnect", @twitter_auth, confirm: "Are you sure you want to remove this connection?", - method: :delete, class: "remove" + method: :delete, class: "remove btn btn-danger" - else - = link_to 'Connect to Twitter', '/members/auth/twitter' + = link_to 'Connect to Twitter', '/members/auth/twitter', class: 'btn' .row .col-md-12 @@ -24,13 +22,12 @@ = image_tag "flickr_32.png", size: "32x32", alt: 'Flickr logo' - if @flickr_auth You are connected to Flickr as - = succeed "." do - = link_to @flickr_auth.name, "http://flickr.com/photos/#{@flickr_auth.uid}" + = link_to @flickr_auth.name, "http://flickr.com/photos/#{@flickr_auth.uid}" = link_to "Disconnect", @flickr_auth, confirm: "Are you sure you want to remove this connection?", - method: :delete, class: "remove" + method: :delete, class: "remove btn btn-danger" - else - = link_to 'Connect to Flickr', '/members/auth/flickr' + = link_to 'Connect to Flickr', '/members/auth/flickr', class: 'btn' .row .col-md-12 @@ -42,6 +39,6 @@ = link_to @facebook_auth.name, "http://facebook.com/profile/#{@facebook_auth.uid}" = link_to "Disconnect", @facebook_auth, confirm: "Are you sure you want to remove this connection?", - method: :delete, class: "remove" + method: :delete, class: "remove btn btn-danger" - else - = link_to 'Connect to Facebook', '/members/auth/facebook' + = link_to 'Connect to Facebook', '/members/auth/facebook', class: 'btn' diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml index de5480290..075fdd4a3 100644 --- a/app/views/devise/registrations/edit.html.haml +++ b/app/views/devise/registrations/edit.html.haml @@ -1,30 +1,30 @@ - content_for :title, "Settings for #{current_member.login_name}" -%ul.nav.nav-tabs{ role: 'tablist' } - %li.active - %a{ href: '#profile', role: 'tab', 'data-toggle': 'tab' } - Profile - %li - %a{ href: '#email', role: 'tab', 'data-toggle': 'tab' } - Email - %li - %a{ href: '#apps', role: 'tab', 'data-toggle': 'tab' } - Apps - %li - %a{ href: '#password', role: 'tab', 'data-toggle': 'tab' } - Password - %li - %a{ href: '#delete', role: 'tab', 'data-toggle': 'tab' } - Delete Account +%h1 + = member_icon + Settings for #{current_member.login_name} -.tab-content - .tab-pane.active#profile - = render partial: 'edit_profile' - .tab-pane#email - = render partial: 'edit_email' - .tab-pane#apps - = render partial: 'edit_apps' - .tab-pane#password - = render partial: 'edit_password' - .tab-pane#delete - = render partial: 'delete' +.card + %ul#myTab.nav.nav-tabs{role: "tablist"} + %li.nav-item + %a#profile-tab.nav-link.active{"aria-controls" => "profile", "aria-selected" => "true", "data-toggle" => "tab", href: "#profile", role: "tab"} Profile + %li.nav-item + %a#email-tab.nav-link{"aria-controls" => "email", "aria-selected" => "false", "data-toggle" => "tab", href: "#email", role: "tab"} Email + %li.nav-item + %a#apps-tab.nav-link{"aria-controls" => "apps", "aria-selected" => "false", "data-toggle" => "tab", href: "#apps", role: "tab"} Apps + %li.nav-item + %a#password-tab.nav-link{"aria-controls" => "password", "aria-selected" => "false", "data-toggle" => "tab", href: "#password", role: "tab"} Password + %li.nav-item + %a#delete-tab.nav-link.text-danger{"aria-controls" => "delete", "aria-selected" => "false", "data-toggle" => "tab", href: "#delete", role: "tab"} Delete Account + .card-body + #myTabContent.tab-content + #profile.tab-pane.fade.show.active{"aria-labelledby" => "profile-tab", role: "tabpanel"} + = render partial: 'edit_profile' + #email.tab-pane.fade{"aria-labelledby" => "email-tab", role: "tabpanel"} + = render partial: 'edit_email' + #apps.tab-pane.fade{"aria-labelledby" => "apps-tab", role: "tabpanel"} + = render partial: 'edit_apps' + #password.tab-pane.fade{"aria-labelledby" => "password-tab", role: "tabpanel"} + = render partial: 'edit_password' + #delete.tab-pane.fade{"aria-labelledby" => "delete-tab", role: "tabpanel"} + = render partial: 'delete'