diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index 49c0764..3f9c14e 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -2,6 +2,6 @@ class DashboardController < ApplicationController before_action :require_user_signed_in def index - @current_section = :dashboard + @current_section = :services end end diff --git a/app/controllers/wallet_controller.rb b/app/controllers/services/lightning_controller.rb similarity index 96% rename from app/controllers/wallet_controller.rb rename to app/controllers/services/lightning_controller.rb index 07de29b..a6b7381 100644 --- a/app/controllers/wallet_controller.rb +++ b/app/controllers/services/lightning_controller.rb @@ -1,6 +1,6 @@ require "rqrcode" -class WalletController < ApplicationController +class Services::LightningController < ApplicationController before_action :require_user_signed_in before_action :authenticate_with_lndhub before_action :set_current_section @@ -42,7 +42,7 @@ class WalletController < ApplicationController end def set_current_section - @current_section = :wallet + @current_section = :services end def fetch_balance diff --git a/app/views/dashboard/index.html.erb b/app/views/dashboard/index.html.erb index 9e24f78..8b90fc0 100644 --- a/app/views/dashboard/index.html.erb +++ b/app/views/dashboard/index.html.erb @@ -43,9 +43,9 @@
- <%= link_to wallet_path, + <%= link_to services_lightning_index_path, class: "block h-full px-6 py-6 rounded-md" do %> -

Wallet

+

Lightning Network

Send and receive sats over the Bitcoin Lightning Network

diff --git a/app/views/notification_mailer/lightning_sats_received.text.erb b/app/views/notification_mailer/lightning_sats_received.text.erb index 1e122d4..22becf6 100644 --- a/app/views/notification_mailer/lightning_sats_received.text.erb +++ b/app/views/notification_mailer/lightning_sats_received.text.erb @@ -1,3 +1,3 @@ You just received <%= number_with_delimiter @amount_sats %> sats in your Lightning account (<%= @user.address %>). Check your wallet app, or open the account page for details: -<%= wallet_transactions_url %> +<%= transactions_lightning_index_url %> diff --git a/app/views/wallet/index.html.erb b/app/views/services/lightning/index.html.erb similarity index 97% rename from app/views/wallet/index.html.erb rename to app/views/services/lightning/index.html.erb index 4a4a37f..fda9558 100644 --- a/app/views/wallet/index.html.erb +++ b/app/views/services/lightning/index.html.erb @@ -1,9 +1,9 @@ -<%= render HeaderComponent.new(title: "Wallet") %> +<%= render HeaderComponent.new(title: "Lightning Network") %> <%= render MainSimpleComponent.new do %> <%= render WalletSummaryComponent.new(balance: @balance) %> - <%= render partial: "shared/tabnav_wallet" %> + <%= render partial: "shared/tabnav_lightning" %>

Lightning Address

diff --git a/app/views/wallet/transactions.html.erb b/app/views/services/lightning/transactions.html.erb similarity index 95% rename from app/views/wallet/transactions.html.erb rename to app/views/services/lightning/transactions.html.erb index 5ebc2cc..cba8d3b 100644 --- a/app/views/wallet/transactions.html.erb +++ b/app/views/services/lightning/transactions.html.erb @@ -1,9 +1,9 @@ -<%= render HeaderComponent.new(title: "Wallet") %> +<%= render HeaderComponent.new(title: "Lightning Network") %> <%= render MainSimpleComponent.new do %> <%= render WalletSummaryComponent.new(balance: @balance) %> - <%= render partial: "shared/tabnav_wallet" %> + <%= render partial: "shared/tabnav_lightning" %>
diff --git a/app/views/shared/_main_nav.html.erb b/app/views/shared/_main_nav.html.erb index 7f5ee02..7fb011b 100644 --- a/app/views/shared/_main_nav.html.erb +++ b/app/views/shared/_main_nav.html.erb @@ -1,10 +1,8 @@ <%= 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) %> + class: main_nav_class(@current_section, :services) %> <%= link_to "Invitations", invitations_path, class: main_nav_class(@current_section, :invitations) %> -<%= link_to "Wallet", wallet_path, - class: main_nav_class(@current_section, :wallet) %> +<%= link_to "Contributions", contributions_donations_path, + class: main_nav_class(@current_section, :contributions) %> <%= link_to "Settings", settings_path, class: main_nav_class(@current_section, :settings) %> diff --git a/app/views/shared/_tabnav_lightning.html.erb b/app/views/shared/_tabnav_lightning.html.erb new file mode 100644 index 0000000..b9f6f09 --- /dev/null +++ b/app/views/shared/_tabnav_lightning.html.erb @@ -0,0 +1,14 @@ +
+
+ +
+
diff --git a/app/views/shared/_tabnav_wallet.html.erb b/app/views/shared/_tabnav_wallet.html.erb deleted file mode 100644 index abdc5ad..0000000 --- a/app/views/shared/_tabnav_wallet.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -
-
- -
-
diff --git a/config/routes.rb b/config/routes.rb index fdc8454..be4195b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -21,6 +21,14 @@ Rails.application.routes.draw do get 'wallet', to: 'wallet#index' get 'wallet/transactions', to: 'wallet#transactions' + namespace :services do + resources :lightning, only: [:index] do + collection do + get 'transactions' + end + end + end + resources :settings, param: 'section', only: ['index', 'show', 'update'] do collection do post 'reset_password'