Rename Wallet to Lightning Network, move to Services
This commit is contained in:
parent
34849b28b0
commit
67a9fc02d7
@ -2,6 +2,6 @@ class DashboardController < ApplicationController
|
|||||||
before_action :require_user_signed_in
|
before_action :require_user_signed_in
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@current_section = :dashboard
|
@current_section = :services
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
require "rqrcode"
|
require "rqrcode"
|
||||||
|
|
||||||
class WalletController < ApplicationController
|
class Services::LightningController < ApplicationController
|
||||||
before_action :require_user_signed_in
|
before_action :require_user_signed_in
|
||||||
before_action :authenticate_with_lndhub
|
before_action :authenticate_with_lndhub
|
||||||
before_action :set_current_section
|
before_action :set_current_section
|
||||||
@ -42,7 +42,7 @@ class WalletController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def set_current_section
|
def set_current_section
|
||||||
@current_section = :wallet
|
@current_section = :services
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_balance
|
def fetch_balance
|
@ -43,9 +43,9 @@
|
|||||||
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
<div class="border border-gray-300 rounded-md hover:border-gray-400
|
||||||
bg-cover bg-center sm:bg-[center_top_-140px] bg-no-repeat
|
bg-cover bg-center sm:bg-[center_top_-140px] bg-no-repeat
|
||||||
bg-[url(/img/logos/icon_lightning.svg)]">
|
bg-[url(/img/logos/icon_lightning.svg)]">
|
||||||
<%= link_to wallet_path,
|
<%= link_to services_lightning_index_path,
|
||||||
class: "block h-full px-6 py-6 rounded-md" do %>
|
class: "block h-full px-6 py-6 rounded-md" do %>
|
||||||
<h3 class="mb-3.5">Wallet</h3>
|
<h3 class="mb-3.5">Lightning Network</h3>
|
||||||
<p class="text-gray-600">
|
<p class="text-gray-600">
|
||||||
Send and receive sats over the Bitcoin Lightning Network
|
Send and receive sats over the Bitcoin Lightning Network
|
||||||
</p>
|
</p>
|
||||||
|
@ -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:
|
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 %>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<%= render HeaderComponent.new(title: "Wallet") %>
|
<%= render HeaderComponent.new(title: "Lightning Network") %>
|
||||||
|
|
||||||
<%= render MainSimpleComponent.new do %>
|
<%= render MainSimpleComponent.new do %>
|
||||||
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
||||||
|
|
||||||
<%= render partial: "shared/tabnav_wallet" %>
|
<%= render partial: "shared/tabnav_lightning" %>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h3>Lightning Address</h3>
|
<h3>Lightning Address</h3>
|
@ -1,9 +1,9 @@
|
|||||||
<%= render HeaderComponent.new(title: "Wallet") %>
|
<%= render HeaderComponent.new(title: "Lightning Network") %>
|
||||||
|
|
||||||
<%= render MainSimpleComponent.new do %>
|
<%= render MainSimpleComponent.new do %>
|
||||||
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
<%= render WalletSummaryComponent.new(balance: @balance) %>
|
||||||
|
|
||||||
<%= render partial: "shared/tabnav_wallet" %>
|
<%= render partial: "shared/tabnav_lightning" %>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h3 class="hidden">Transactions</h3>
|
<h3 class="hidden">Transactions</h3>
|
@ -1,10 +1,8 @@
|
|||||||
<%= link_to "Services", root_path,
|
<%= link_to "Services", root_path,
|
||||||
class: main_nav_class(@current_section, :dashboard) %>
|
class: main_nav_class(@current_section, :services) %>
|
||||||
<%= link_to "Contributions", contributions_donations_path,
|
|
||||||
class: main_nav_class(@current_section, :contributions) %>
|
|
||||||
<%= link_to "Invitations", invitations_path,
|
<%= link_to "Invitations", invitations_path,
|
||||||
class: main_nav_class(@current_section, :invitations) %>
|
class: main_nav_class(@current_section, :invitations) %>
|
||||||
<%= link_to "Wallet", wallet_path,
|
<%= link_to "Contributions", contributions_donations_path,
|
||||||
class: main_nav_class(@current_section, :wallet) %>
|
class: main_nav_class(@current_section, :contributions) %>
|
||||||
<%= link_to "Settings", settings_path,
|
<%= link_to "Settings", settings_path,
|
||||||
class: main_nav_class(@current_section, :settings) %>
|
class: main_nav_class(@current_section, :settings) %>
|
||||||
|
14
app/views/shared/_tabnav_lightning.html.erb
Normal file
14
app/views/shared/_tabnav_lightning.html.erb
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<section>
|
||||||
|
<div class="border-b border-gray-200">
|
||||||
|
<nav class="-mb-px flex" aria-label="Tabs">
|
||||||
|
<%= render TabnavLinkComponent.new(
|
||||||
|
name: "Info", path: services_lightning_index_path,
|
||||||
|
active: current_page?(services_lightning_index_path)
|
||||||
|
) %>
|
||||||
|
<%= render TabnavLinkComponent.new(
|
||||||
|
name: "Transactions", path: transactions_services_lightning_index_path,
|
||||||
|
active: current_page?(transactions_services_lightning_index_path)
|
||||||
|
) %>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</section>
|
@ -1,14 +0,0 @@
|
|||||||
<section>
|
|
||||||
<div class="border-b border-gray-200">
|
|
||||||
<nav class="-mb-px flex" aria-label="Tabs">
|
|
||||||
<%= render TabnavLinkComponent.new(
|
|
||||||
name: "Info", path: wallet_path,
|
|
||||||
active: current_page?(wallet_path)
|
|
||||||
) %>
|
|
||||||
<%= render TabnavLinkComponent.new(
|
|
||||||
name: "Transactions", path: wallet_transactions_path,
|
|
||||||
active: current_page?(wallet_transactions_path)
|
|
||||||
) %>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
@ -21,6 +21,14 @@ Rails.application.routes.draw do
|
|||||||
get 'wallet', to: 'wallet#index'
|
get 'wallet', to: 'wallet#index'
|
||||||
get 'wallet/transactions', to: 'wallet#transactions'
|
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
|
resources :settings, param: 'section', only: ['index', 'show', 'update'] do
|
||||||
collection do
|
collection do
|
||||||
post 'reset_password'
|
post 'reset_password'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user