From 3f49e4a3b8e6195de104c231e3aba6172609788a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 12 Dec 2022 11:40:58 +0100 Subject: [PATCH 01/21] Use more appropriate icon in sidenav --- app/views/icons/_user.html.erb | 2 +- app/views/shared/_sidenav_settings.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/icons/_user.html.erb b/app/views/icons/_user.html.erb index 7bb5f29..b925f0d 100644 --- a/app/views/icons/_user.html.erb +++ b/app/views/icons/_user.html.erb @@ -1 +1 @@ - \ No newline at end of file + diff --git a/app/views/shared/_sidenav_settings.html.erb b/app/views/shared/_sidenav_settings.html.erb index 3239907..c57c90b 100644 --- a/app/views/shared/_sidenav_settings.html.erb +++ b/app/views/shared/_sidenav_settings.html.erb @@ -1,5 +1,5 @@ <%= render SidenavLinkComponent.new( - name: "Account", path: "#", icon: "settings", disabled: true + name: "Account", path: "#", icon: "user", disabled: true ) %> <%= render SidenavLinkComponent.new( name: "Password", path: security_path, icon: "key", From 3197743a55e5346b3183965a8076301457cc40be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 12 Dec 2022 14:05:31 +0100 Subject: [PATCH 02/21] Change donations to contrbutions, add tabbed nav Introduces components for tabbed navigation and adds a tab menu and item for non-financial contributions to the donations/contributions page. --- .../main_with_tabnav_component.html.erb | 14 +++++++++++++ app/components/main_with_tabnav_component.rb | 7 +++++++ app/components/tabnav_link_component.html.erb | 3 +++ app/components/tabnav_link_component.rb | 21 +++++++++++++++++++ .../donations_controller.rb | 2 +- .../contributions/projects_controller.rb | 8 +++++++ .../donations/index.html.erb | 8 ++++--- .../contributions/projects/index.html.erb | 16 ++++++++++++++ app/views/donations/index.json.jbuilder | 1 - app/views/shared/_main_nav.html.erb | 4 ++-- .../shared/_tabnav_contributions.html.erb | 8 +++++++ config/routes.rb | 8 +++++-- 12 files changed, 91 insertions(+), 9 deletions(-) create mode 100644 app/components/main_with_tabnav_component.html.erb create mode 100644 app/components/main_with_tabnav_component.rb create mode 100644 app/components/tabnav_link_component.html.erb create mode 100644 app/components/tabnav_link_component.rb rename app/controllers/{ => contributions}/donations_controller.rb (74%) create mode 100644 app/controllers/contributions/projects_controller.rb rename app/views/{ => contributions}/donations/index.html.erb (73%) create mode 100644 app/views/contributions/projects/index.html.erb delete mode 100644 app/views/donations/index.json.jbuilder create mode 100644 app/views/shared/_tabnav_contributions.html.erb diff --git a/app/components/main_with_tabnav_component.html.erb b/app/components/main_with_tabnav_component.html.erb new file mode 100644 index 0000000..40829db --- /dev/null +++ b/app/components/main_with_tabnav_component.html.erb @@ -0,0 +1,14 @@ +
+
+
+
+ +
+
+
+ <%= content %> +
+
+
diff --git a/app/components/main_with_tabnav_component.rb b/app/components/main_with_tabnav_component.rb new file mode 100644 index 0000000..73816cc --- /dev/null +++ b/app/components/main_with_tabnav_component.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class MainWithTabnavComponent < ViewComponent::Base + def initialize(tabnav_partial:) + @tabnav_partial = tabnav_partial + end +end diff --git a/app/components/tabnav_link_component.html.erb b/app/components/tabnav_link_component.html.erb new file mode 100644 index 0000000..f01d622 --- /dev/null +++ b/app/components/tabnav_link_component.html.erb @@ -0,0 +1,3 @@ +<%= link_to @path, class: @link_class do %> + <%= @name %> +<% end %> diff --git a/app/components/tabnav_link_component.rb b/app/components/tabnav_link_component.rb new file mode 100644 index 0000000..9994d8d --- /dev/null +++ b/app/components/tabnav_link_component.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class TabnavLinkComponent < ViewComponent::Base + def initialize(name:, path:, active: false, disabled: false) + @name = name + @path = path + @active = active + @disabled = disabled + @link_class = class_names_link(path) + end + + def class_names_link(path) + if @active + "border-indigo-500 text-indigo-600 w-1/2 py-4 px-1 text-center border-b-2" + elsif @disabled + "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 w-1/2 py-4 px-1 text-center border-b-2" + else + "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 w-1/2 py-4 px-1 text-center border-b-2" + end + end +end diff --git a/app/controllers/donations_controller.rb b/app/controllers/contributions/donations_controller.rb similarity index 74% rename from app/controllers/donations_controller.rb rename to app/controllers/contributions/donations_controller.rb index 7800e09..5839030 100644 --- a/app/controllers/donations_controller.rb +++ b/app/controllers/contributions/donations_controller.rb @@ -1,4 +1,4 @@ -class DonationsController < ApplicationController +class Contributions::DonationsController < ApplicationController before_action :require_user_signed_in # GET /donations diff --git a/app/controllers/contributions/projects_controller.rb b/app/controllers/contributions/projects_controller.rb new file mode 100644 index 0000000..77e9fdf --- /dev/null +++ b/app/controllers/contributions/projects_controller.rb @@ -0,0 +1,8 @@ +class Contributions::ProjectsController < ApplicationController + before_action :require_user_signed_in + + # GET /contributions + def index + @current_section = :contributions + end +end diff --git a/app/views/donations/index.html.erb b/app/views/contributions/donations/index.html.erb similarity index 73% rename from app/views/donations/index.html.erb rename to app/views/contributions/donations/index.html.erb index bbb4f3c..6217149 100644 --- a/app/views/donations/index.html.erb +++ b/app/views/contributions/donations/index.html.erb @@ -1,6 +1,6 @@ -<%= render HeaderComponent.new(title: "Donations") %> +<%= render HeaderComponent.new(title: "Contributions") %> -<%= render MainSimpleComponent.new do %> +<%= render MainWithTabnavComponent.new(tabnav_partial: "shared/tabnav_contributions") do %>

Your financial contributions to the development and upkeep of Kosmos @@ -34,7 +34,9 @@ <% else %>

- No donations to show. + The donation process is not automated yet. Please + contact us + if you'd like to contribute this way right now.

<% end %>
diff --git a/app/views/contributions/projects/index.html.erb b/app/views/contributions/projects/index.html.erb new file mode 100644 index 0000000..b13d7c9 --- /dev/null +++ b/app/views/contributions/projects/index.html.erb @@ -0,0 +1,16 @@ +<%= render HeaderComponent.new(title: "Contributions") %> + +<%= render MainWithTabnavComponent.new(tabnav_partial: "shared/tabnav_contributions") do %> +
+

+ Project contributions are how we develop and run all Kosmos software and + services. Everything we create and provide is free and open-source + software, even the page you're looking at right now! +

+

+ Soon you will find a summary of your contributions here. Until then, + please refer to the + Kredits dashboard. +

+
+<% end %> diff --git a/app/views/donations/index.json.jbuilder b/app/views/donations/index.json.jbuilder deleted file mode 100644 index 9df428c..0000000 --- a/app/views/donations/index.json.jbuilder +++ /dev/null @@ -1 +0,0 @@ -json.array! @donations, partial: "donations/donation", as: :donation diff --git a/app/views/shared/_main_nav.html.erb b/app/views/shared/_main_nav.html.erb index 2e49a05..90e4428 100644 --- a/app/views/shared/_main_nav.html.erb +++ b/app/views/shared/_main_nav.html.erb @@ -1,9 +1,9 @@ <%= link_to "Services", root_path, class: main_nav_class(@current_section, :dashboard) %> +<%= link_to "Contributions", contributions_donations_path, + class: main_nav_class(@current_section, :contributions) %> <%= link_to "Invitations", invitations_path, class: main_nav_class(@current_section, :invitations) %> -<%= link_to "Donations", donations_path, - class: main_nav_class(@current_section, :contributions) %> <%= link_to "Wallet", wallet_path, class: main_nav_class(@current_section, :wallet) %> <%= link_to "Settings", security_path, diff --git a/app/views/shared/_tabnav_contributions.html.erb b/app/views/shared/_tabnav_contributions.html.erb new file mode 100644 index 0000000..ac75cba --- /dev/null +++ b/app/views/shared/_tabnav_contributions.html.erb @@ -0,0 +1,8 @@ +<%= render TabnavLinkComponent.new( + name: "Donations", path: contributions_donations_path, + active: current_page?(contributions_donations_path) +) %> +<%= render TabnavLinkComponent.new( + name: "Projects", path: contributions_projects_path, + active: current_page?(contributions_projects_path) +) %> diff --git a/config/routes.rb b/config/routes.rb index b0cf70e..5791972 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,9 +15,13 @@ Rails.application.routes.draw do get 'security', to: 'security#index' - resources :invitations, only: ['index', 'show', 'create', 'destroy'] + namespace :contributions do + root to: 'donations#index' + get 'projects', to: 'projects#index' + resources :donations, only: ['index'] + end - resources :donations + resources :invitations, only: ['index', 'show', 'create', 'destroy'] get 'wallet', to: 'wallet#index' get 'wallet/transactions', to: 'wallet#transactions' From b37a0c25a428f9e0738f8d904ccca330edbb8fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 12 Dec 2022 14:06:56 +0100 Subject: [PATCH 03/21] Wording --- app/views/invitations/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index a65f3ff..7ca0699 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -22,8 +22,8 @@ <% else %>

- You do not have any invitations to give away yet. All good - things come in time. + You do not have any invitations to give away yet. We will notify you, + as soon as you can invite others.

<% end %> From 70fa43f5d2a320cd51f607305bd0e2fe489c5aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 12 Dec 2022 14:10:46 +0100 Subject: [PATCH 04/21] Use tabnav component for wallet view --- .../main_with_tabnav_component.html.erb | 6 +----- .../shared/_tabnav_contributions.html.erb | 20 +++++++++++-------- app/views/shared/_tabnav_wallet.html.erb | 14 +++++++++++++ app/views/wallet/index.html.erb | 9 +-------- app/views/wallet/transactions.html.erb | 9 +-------- 5 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 app/views/shared/_tabnav_wallet.html.erb diff --git a/app/components/main_with_tabnav_component.html.erb b/app/components/main_with_tabnav_component.html.erb index 40829db..6c578a9 100644 --- a/app/components/main_with_tabnav_component.html.erb +++ b/app/components/main_with_tabnav_component.html.erb @@ -1,11 +1,7 @@
-
- -
+ <%= render partial: @tabnav_partial %>
<%= content %> diff --git a/app/views/shared/_tabnav_contributions.html.erb b/app/views/shared/_tabnav_contributions.html.erb index ac75cba..96db0db 100644 --- a/app/views/shared/_tabnav_contributions.html.erb +++ b/app/views/shared/_tabnav_contributions.html.erb @@ -1,8 +1,12 @@ -<%= render TabnavLinkComponent.new( - name: "Donations", path: contributions_donations_path, - active: current_page?(contributions_donations_path) -) %> -<%= render TabnavLinkComponent.new( - name: "Projects", path: contributions_projects_path, - active: current_page?(contributions_projects_path) -) %> +
+ +
diff --git a/app/views/shared/_tabnav_wallet.html.erb b/app/views/shared/_tabnav_wallet.html.erb new file mode 100644 index 0000000..abdc5ad --- /dev/null +++ b/app/views/shared/_tabnav_wallet.html.erb @@ -0,0 +1,14 @@ +
+
+ +
+
diff --git a/app/views/wallet/index.html.erb b/app/views/wallet/index.html.erb index 406bd60..6288567 100644 --- a/app/views/wallet/index.html.erb +++ b/app/views/wallet/index.html.erb @@ -3,14 +3,7 @@ <%= render MainSimpleComponent.new do %> <%= render WalletSummaryComponent.new(balance: @balance) %> -
-
- -
-
+ <%= render partial: "shared/tabnav_wallet" %>

Lightning Address

diff --git a/app/views/wallet/transactions.html.erb b/app/views/wallet/transactions.html.erb index c7c495e..9228d48 100644 --- a/app/views/wallet/transactions.html.erb +++ b/app/views/wallet/transactions.html.erb @@ -3,14 +3,7 @@ <%= render MainSimpleComponent.new do %> <%= render WalletSummaryComponent.new(balance: @balance) %> -
-
- -
-
+ <%= render partial: "shared/tabnav_wallet" %>
From cf48f7655357fde0a50fd5b99ca34fb4f7eb50ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 21 Dec 2022 17:25:02 +0700 Subject: [PATCH 05/21] Fix web container start when offline --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 3e8df2b..0eead4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ COPY Gemfile /akkounts/Gemfile COPY Gemfile.lock /akkounts/Gemfile.lock COPY package.json /akkounts/package.json RUN bundle install +RUN gem install foreman RUN npm install -g yarn RUN yarn install From 445a1c80a696249149bd9d42456bed5da592c7d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 21 Dec 2022 18:10:50 +0700 Subject: [PATCH 06/21] Refactor settings routes and menu Use sub controllers/routes for the sections --- app/controllers/settings/profile_controller.rb | 6 ++++++ app/controllers/settings/security_controller.rb | 13 +++++++++++++ app/controllers/settings_controller.rb | 10 +++++----- app/views/settings/index.html.erb | 1 - app/views/settings/profile/index.html.erb | 9 +++++++++ app/views/{ => settings}/security/index.html.erb | 0 app/views/shared/_main_nav.html.erb | 4 ++-- app/views/shared/_sidenav_settings.html.erb | 7 ++++--- config/routes.rb | 9 +++++---- 9 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 app/controllers/settings/profile_controller.rb create mode 100644 app/controllers/settings/security_controller.rb delete mode 100644 app/views/settings/index.html.erb create mode 100644 app/views/settings/profile/index.html.erb rename app/views/{ => settings}/security/index.html.erb (100%) diff --git a/app/controllers/settings/profile_controller.rb b/app/controllers/settings/profile_controller.rb new file mode 100644 index 0000000..23bdee5 --- /dev/null +++ b/app/controllers/settings/profile_controller.rb @@ -0,0 +1,6 @@ +class Settings::ProfileController < SettingsController + + def index + end + +end diff --git a/app/controllers/settings/security_controller.rb b/app/controllers/settings/security_controller.rb new file mode 100644 index 0000000..2ae0bb7 --- /dev/null +++ b/app/controllers/settings/security_controller.rb @@ -0,0 +1,13 @@ +class Settings::SecurityController < SettingsController + + def index + end + + def reset_password + current_user.send_reset_password_instructions + sign_out current_user + msg = "We have sent you an email with a link to reset your password." + redirect_to check_your_email_path, notice: msg + end + +end diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index ba639d2..d2fc3e5 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -1,13 +1,13 @@ class SettingsController < ApplicationController before_action :require_user_signed_in + before_action :set_current_section def index end - def reset_password - current_user.send_reset_password_instructions - sign_out current_user - msg = "We have sent you an email with a link to reset your password." - redirect_to check_your_email_path, notice: msg + private + + def set_current_section + @current_section = :settings end end diff --git a/app/views/settings/index.html.erb b/app/views/settings/index.html.erb deleted file mode 100644 index c8c990b..0000000 --- a/app/views/settings/index.html.erb +++ /dev/null @@ -1 +0,0 @@ -

Settings

diff --git a/app/views/settings/profile/index.html.erb b/app/views/settings/profile/index.html.erb new file mode 100644 index 0000000..b6cc307 --- /dev/null +++ b/app/views/settings/profile/index.html.erb @@ -0,0 +1,9 @@ +<%= render HeaderComponent.new(title: "Settings") %> + +<%= render MainWithSidenavComponent.new(sidenav_partial: 'shared/sidenav_settings') do %> +
+

Profile

+

+

+
+<% end %> diff --git a/app/views/security/index.html.erb b/app/views/settings/security/index.html.erb similarity index 100% rename from app/views/security/index.html.erb rename to app/views/settings/security/index.html.erb diff --git a/app/views/shared/_main_nav.html.erb b/app/views/shared/_main_nav.html.erb index 90e4428..de5b8eb 100644 --- a/app/views/shared/_main_nav.html.erb +++ b/app/views/shared/_main_nav.html.erb @@ -6,5 +6,5 @@ class: main_nav_class(@current_section, :invitations) %> <%= link_to "Wallet", wallet_path, class: main_nav_class(@current_section, :wallet) %> -<%= link_to "Settings", security_path, - class: main_nav_class(@current_section, :security) %> +<%= link_to "Settings", settings_profile_path, + class: main_nav_class(@current_section, :settings) %> diff --git a/app/views/shared/_sidenav_settings.html.erb b/app/views/shared/_sidenav_settings.html.erb index c57c90b..ff32ae8 100644 --- a/app/views/shared/_sidenav_settings.html.erb +++ b/app/views/shared/_sidenav_settings.html.erb @@ -1,9 +1,10 @@ <%= render SidenavLinkComponent.new( - name: "Account", path: "#", icon: "user", disabled: true + name: "Profile", path: settings_profile_path, icon: "user", + active: current_page?(settings_profile_path) ) %> <%= render SidenavLinkComponent.new( - name: "Password", path: security_path, icon: "key", - active: current_page?(security_path) + name: "Security", path: settings_security_path, icon: "key", + active: current_page?(settings_security_path) ) %> <%= render SidenavLinkComponent.new( name: "Security", path: "#", icon: "shield", disabled: true diff --git a/config/routes.rb b/config/routes.rb index 5791972..222408b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,10 +10,11 @@ Rails.application.routes.draw do match 'signup/:step', to: 'signup#steps', as: :signup_steps, via: [:get, :post] post 'signup_validate', to: 'signup#validate' - get 'settings', to: 'settings#index' - post 'settings_reset_password', to: 'settings#reset_password' - - get 'security', to: 'security#index' + namespace :settings do + get 'profile', to: 'profile#index' + get 'security', to: 'security#index' + post 'reset_password', to: 'security#reset_password' + end namespace :contributions do root to: 'donations#index' From 0492b42327a592d4cae350234c1f60576e4dc2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 21 Dec 2022 18:24:23 +0700 Subject: [PATCH 07/21] Improve button style --- app/assets/stylesheets/components/buttons.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/components/buttons.css b/app/assets/stylesheets/components/buttons.css index a89203b..a0cd22e 100644 --- a/app/assets/stylesheets/components/buttons.css +++ b/app/assets/stylesheets/components/buttons.css @@ -6,7 +6,7 @@ .btn-md { @apply btn; - @apply py-2.5 px-5 shadow-md; + @apply py-3 px-6; } .btn-sm { From aba49306966571f0f22dba01f71ba0f9e830013b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 21 Dec 2022 18:24:49 +0700 Subject: [PATCH 08/21] Set a minimum height for content with sidenav --- app/components/main_with_sidenav_component.html.erb | 2 +- app/views/settings/security/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/main_with_sidenav_component.html.erb b/app/components/main_with_sidenav_component.html.erb index efdc28b..86225ff 100644 --- a/app/components/main_with_sidenav_component.html.erb +++ b/app/components/main_with_sidenav_component.html.erb @@ -1,6 +1,6 @@
-
+
<% end %> From c756528d32b977484d675cc9f3b127890cd5f04a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 10 Jan 2023 13:15:40 +0800 Subject: [PATCH 17/21] Allow to copy invitation URLs via button --- app/views/invitations/index.html.erb | 36 ++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index 7ca0699..a606b1c 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -3,23 +3,29 @@ <%= render MainSimpleComponent.new do %>
<% if @invitations_unused.any? %> -

+

Invite your friends to a Kosmos account by sharing an invitation URL with them:

- - - - - - - - <% @invitations_unused.each do |invitation| %> - - - - <% end %> - -
URL
<%= invitation_url(invitation.token) %>
+
    + <% @invitations_unused.each do |invitation| %> +
  • + + +
  • + <% end %> +
<% else %>

You do not have any invitations to give away yet. We will notify you, From 15b63eee73ad1b00966026774ea84e9c8a4186d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 10 Jan 2023 13:18:57 +0800 Subject: [PATCH 18/21] Add coming-soon note to disabled settings nav items --- app/components/sidenav_link_component.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/sidenav_link_component.html.erb b/app/components/sidenav_link_component.html.erb index 2d27b29..a49bbab 100644 --- a/app/components/sidenav_link_component.html.erb +++ b/app/components/sidenav_link_component.html.erb @@ -1,4 +1,4 @@ -<%= link_to @path, class: @link_class do %> +<%= link_to @path, class: @link_class, title: (@disabled ? "Coming soon" : nil) do %> <%= render partial: "icons/#{@icon}", locals: { custom_class: @icon_class } %> <%= @name %> <% end %> From ee74c4847f2c90a22f97856d58fe58d8f047f1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 10 Jan 2023 13:45:46 +0800 Subject: [PATCH 19/21] Make invitation page prettier when it's empty --- app/components/main_simple_component.html.erb | 2 +- app/views/invitations/index.html.erb | 15 +++++++++++---- .../img/illustrations/undraw_loading_re_5axr.svg | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 public/img/illustrations/undraw_loading_re_5axr.svg diff --git a/app/components/main_simple_component.html.erb b/app/components/main_simple_component.html.erb index b72b31d..beacf7b 100644 --- a/app/components/main_simple_component.html.erb +++ b/app/components/main_simple_component.html.erb @@ -1,5 +1,5 @@

-
+
<%= content %>
diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index a606b1c..5517a47 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -27,10 +27,17 @@ <% end %> <% else %> -

- You do not have any invitations to give away yet. We will notify you, - as soon as you can invite others. -

+
+

+ <%= image_tag("/img/illustrations/undraw_loading_re_5axr.svg", class: 'h-48') %> +

+

+ No invitations available yet +

+

+ We will notify you, as soon as you can invite others. +

+
<% end %>
diff --git a/public/img/illustrations/undraw_loading_re_5axr.svg b/public/img/illustrations/undraw_loading_re_5axr.svg new file mode 100644 index 0000000..a5ce075 --- /dev/null +++ b/public/img/illustrations/undraw_loading_re_5axr.svg @@ -0,0 +1 @@ + \ No newline at end of file From 99dc36f13aaee2b630377244dcffe04484d793af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 10 Jan 2023 13:56:17 +0800 Subject: [PATCH 20/21] Make empty donations page prettier --- .../contributions/donations/index.html.erb | 26 ++++++++++++------- .../illustrations/undraw_savings_re_eq4w.svg | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 public/img/illustrations/undraw_savings_re_eq4w.svg diff --git a/app/views/contributions/donations/index.html.erb b/app/views/contributions/donations/index.html.erb index 6217149..e885055 100644 --- a/app/views/contributions/donations/index.html.erb +++ b/app/views/contributions/donations/index.html.erb @@ -2,11 +2,11 @@ <%= render MainWithTabnavComponent.new(tabnav_partial: "shared/tabnav_contributions") do %>
-

- Your financial contributions to the development and upkeep of Kosmos - software and services. -

<% if @donations.any? %> +

+ Your financial contributions to the development and upkeep of Kosmos + software and services. +

    <% @donations.each do |donation| %>
  • @@ -33,11 +33,19 @@ <% end %>
<% else %> -

- The donation process is not automated yet. Please - contact us - if you'd like to contribute this way right now. -

+
+

+ <%= image_tag("/img/illustrations/undraw_savings_re_eq4w.svg", class: 'h-48') %> +

+

+ No donations yet +

+

+ The donation process is not automated yet.
Please + contact us + if you'd like to contribute this way right now. +

+
<% end %>
<% end %> diff --git a/public/img/illustrations/undraw_savings_re_eq4w.svg b/public/img/illustrations/undraw_savings_re_eq4w.svg new file mode 100644 index 0000000..9b0f97b --- /dev/null +++ b/public/img/illustrations/undraw_savings_re_eq4w.svg @@ -0,0 +1 @@ + \ No newline at end of file From 86dc44d0968556c0778b322f3189e67d8a27cc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 12 Jan 2023 16:21:40 +0800 Subject: [PATCH 21/21] Add empty state for wallet transactions view --- app/views/wallet/transactions.html.erb | 14 +++++++++++--- .../illustrations/undraw_digital_currency_qpak.svg | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 public/img/illustrations/undraw_digital_currency_qpak.svg diff --git a/app/views/wallet/transactions.html.erb b/app/views/wallet/transactions.html.erb index 9228d48..44859e3 100644 --- a/app/views/wallet/transactions.html.erb +++ b/app/views/wallet/transactions.html.erb @@ -42,9 +42,17 @@ <% end %> <% else %> -

- No transactions yet. As soon as you start receiving sats, you will find some entries here. -

+
+

+ <%= image_tag("/img/illustrations/undraw_digital_currency_qpak.svg", class: 'h-48') %> +

+

+ No transactions yet +

+

+ As soon as you start receiving sats, you will find some entries here. +

+
<% end %>
<% end %> diff --git a/public/img/illustrations/undraw_digital_currency_qpak.svg b/public/img/illustrations/undraw_digital_currency_qpak.svg new file mode 100644 index 0000000..acbbfc6 --- /dev/null +++ b/public/img/illustrations/undraw_digital_currency_qpak.svg @@ -0,0 +1 @@ +digital currency \ No newline at end of file