From c6eb21faad772d0baa7ea56444688166884b9169 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 1 Feb 2021 18:17:26 +0100 Subject: [PATCH 1/5] Change site name to "Account", add comet icon ... and remove the "beta" tag. --- app/assets/stylesheets/layout.scss | 17 ++++++----------- app/views/layouts/application.html.erb | 6 ++++-- app/views/shared/icons/_comet.html.erb | 1 + 3 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 app/views/shared/icons/_comet.html.erb diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 41ff821..e0231f2 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -22,20 +22,15 @@ span.project-name { display: none; - // font-size: .5em; - // text-transform: none; - // vertical-align: super; } - span.beta { - font-size: .5em; - font-style: italic; - text-transform: none; - vertical-align: super; - } + span.icon { + svg { + height: 1.8rem; + width: auto; + } - span.bolt { - color: #ffd000; + margin-right: 0.5rem; } } diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 4afa39a..4029d24 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -15,9 +15,11 @@

+ + <%= render partial: "shared/icons/comet" %> + Kosmos - Akkounts - beta + Account

<% if user_signed_in? %>

diff --git a/app/views/shared/icons/_comet.html.erb b/app/views/shared/icons/_comet.html.erb new file mode 100644 index 0000000..78071f8 --- /dev/null +++ b/app/views/shared/icons/_comet.html.erb @@ -0,0 +1 @@ + From 92bfc33bf0b19b4970e0f213b8c9c527d69f047e Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 1 Feb 2021 18:24:01 +0100 Subject: [PATCH 2/5] Remove bottom border from last section on page --- app/assets/stylesheets/layout.scss | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index e0231f2..ac82e4b 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -124,13 +124,11 @@ main { } section { - border-bottom: 1px dotted #ccc; padding-bottom: 3rem; margin-bottom: 3rem; - @include media-max(small) { - padding-bottom: 3rem; - margin-bottom: 3rem; + &:not(:last-of-type) { + border-bottom: 1px dotted #ccc; } } From 8997349186c4699db1977a217f167546e1e90b8b Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 1 Feb 2021 18:38:35 +0100 Subject: [PATCH 3/5] Move password change to new Security tab --- app/assets/stylesheets/main_nav.scss | 6 +++++- app/controllers/security_controller.rb | 7 +++++++ app/views/dashboard/index.html.erb | 9 --------- app/views/security/index.html.erb | 12 ++++++++++++ app/views/shared/_main_nav.html.erb | 4 ++++ config/routes.rb | 2 ++ 6 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 app/controllers/security_controller.rb create mode 100644 app/views/security/index.html.erb diff --git a/app/assets/stylesheets/main_nav.scss b/app/assets/stylesheets/main_nav.scss index eaa1756..b3615b0 100644 --- a/app/assets/stylesheets/main_nav.scss +++ b/app/assets/stylesheets/main_nav.scss @@ -16,7 +16,7 @@ @include media-max(large) { display: grid; grid-template-columns: repeat(1fr); - grid-template-columns: 1fr 1fr 1fr; + grid-template-columns: 1fr 1fr 1fr 1fr; } li { @@ -41,6 +41,10 @@ padding-right: 0; } + @include media-max(small) { + font-size: 0.85rem; + } + &.active { color: $text-color-body; border-bottom: 2px solid #ffd000; diff --git a/app/controllers/security_controller.rb b/app/controllers/security_controller.rb new file mode 100644 index 0000000..358cd0d --- /dev/null +++ b/app/controllers/security_controller.rb @@ -0,0 +1,7 @@ +class SecurityController < ApplicationController + before_action :require_user_signed_in + + def index + @current_section = :security + end +end diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 528ff15..d0261fa 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -37,12 +37,3 @@

- -
-

Password change

-

- <%= form_with(url: settings_reset_password_path, method: :post) do %> - <%= submit_tag("Send me a password reset link") %> - <% end %> -

-
diff --git a/app/views/security/index.html.erb b/app/views/security/index.html.erb new file mode 100644 index 0000000..dbe2e0a --- /dev/null +++ b/app/views/security/index.html.erb @@ -0,0 +1,12 @@ +
+

Security

+
+ +
+

Password change

+

+ <%= form_with(url: settings_reset_password_path, method: :post) do %> + <%= submit_tag("Send me a password reset link") %> + <% end %> +

+
diff --git a/app/views/shared/_main_nav.html.erb b/app/views/shared/_main_nav.html.erb index d96a161..bd2a872 100644 --- a/app/views/shared/_main_nav.html.erb +++ b/app/views/shared/_main_nav.html.erb @@ -13,6 +13,10 @@ <%= link_to "Donations", donations_path, class: @current_section == :contributions ? "active" : nil %> +
  • + <%= link_to "Security", security_path, + class: @current_section == :security ? "active" : nil %> +
  • diff --git a/config/routes.rb b/config/routes.rb index 5873f71..89f8b2f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,6 +12,8 @@ Rails.application.routes.draw do get 'settings', to: 'settings#index' post 'settings_reset_password', to: 'settings#reset_password' + get 'security', to: 'security#index' + resources :invitations, only: ['index', 'show', 'create', 'destroy'] namespace :admin do From 698e4381c29e9f82ad0212612d7c4ed252c956c0 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 1 Feb 2021 18:53:48 +0100 Subject: [PATCH 4/5] Improve table styles * Nicer table headers * Hide invitation IDs on small screens --- app/assets/stylesheets/layout.scss | 28 +++++++++++++++++++++++----- app/views/invitations/index.html.erb | 4 ++-- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index ac82e4b..cf4267b 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -118,11 +118,6 @@ main { } } - th, td { - line-height: 1.5rem; - padding-right: 1rem; - } - section { padding-bottom: 3rem; margin-bottom: 3rem; @@ -132,6 +127,29 @@ main { } } + table { + width: 100%; + + th, td { + line-height: 1.5rem; + padding-right: 1rem; + + &.hide-small { + @include media-max(small) { + display: none; + } + } + } + + th { + color: $text-color-discreet; + font-weight: normal; + text-transform: uppercase; + font-size: 0.85rem; + padding-bottom: 0.5rem; + } + } + .actions { margin-top: 2rem; } diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index a35d313..1c5996f 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -29,7 +29,7 @@ - + @@ -37,7 +37,7 @@ <% @invitations_used.each do |invitation| %> - + From a01cb9ae2135c89a4a6c50f463911211e5098795 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 1 Feb 2021 18:58:34 +0100 Subject: [PATCH 5/5] Adjust site header in admin, signup layouts --- app/views/layouts/admin.html.erb | 4 ++-- app/views/layouts/application.html.erb | 4 +--- app/views/layouts/signup.html.erb | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb index ac24d75..8a6368a 100644 --- a/app/views/layouts/admin.html.erb +++ b/app/views/layouts/admin.html.erb @@ -15,9 +15,9 @@

    + <%= render partial: "shared/icons/comet" %> Kosmos - Akkounts - beta + Accounts

    <% if user_signed_in? %>

    diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 4029d24..bdf836e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -15,9 +15,7 @@

    - - <%= render partial: "shared/icons/comet" %> - + <%= render partial: "shared/icons/comet" %> Kosmos Account

    diff --git a/app/views/layouts/signup.html.erb b/app/views/layouts/signup.html.erb index 1a49165..b2ddc1c 100644 --- a/app/views/layouts/signup.html.erb +++ b/app/views/layouts/signup.html.erb @@ -15,9 +15,9 @@

    + <%= render partial: "shared/icons/comet" %> Kosmos Sign Up -

    <% if user_signed_in? %>

    URLID Accepted Invited user
    <%= invitation_url(invitation.token) %><%= invitation.token %> <%= invitation.used_at.strftime("%Y-%m-%d") %> <%= User.find(invitation.invited_user_id).address %>