Add turbo frame for wallet balance
This commit is contained in:
parent
84de5b8177
commit
4b11641834
@ -1,6 +1,6 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li><%= link_to 'Home', root_path %></li>
|
||||
<li><%= link_to 'Home', root_path, data: { turbo: false } %></li>
|
||||
<li><%= link_to 'Doodads', doodads_path %></li>
|
||||
<% if !request.base_url.match(/pin|my|fireside/) %>
|
||||
<% if policy(:table).index? %>
|
||||
|
||||
@ -12,6 +12,8 @@
|
||||
%br= current_user.icid
|
||||
Principal
|
||||
%br= current_user.principal
|
||||
= turbo_frame_tag "icp_balance_turbo_frame" do
|
||||
= link_to "Show Balance", "/wallet"
|
||||
-# Balance:
|
||||
-# %br= current_user.icp_balance
|
||||
-# = "#{currency_balance(current_user.principal, "TENDY")} TENDY"
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
<h2>Sign up</h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= simple_form_for(resource, as: resource_name,
|
||||
url: registration_path(resource_name),
|
||||
html: {
|
||||
data: { turbo: false}
|
||||
}) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
|
||||
13
app/views/visitors/wallet.html.haml
Normal file
13
app/views/visitors/wallet.html.haml
Normal file
@ -0,0 +1,13 @@
|
||||
= turbo_frame_tag "icp_balance_turbo_frame" do
|
||||
= link_to "Refresh Balance", "/wallet"
|
||||
= current_user.icp_balance
|
||||
%br= "#{currency_balance(current_user.principal, "TENDY")} TENDY"
|
||||
%br= "#{currency_balance(current_user.principal, "ICYPEES")} ICYPEES"
|
||||
%br= "#{currency_balance(current_user.principal, "SPICE")} SPICE"
|
||||
%br= "#{currency_balance(current_user.principal, "CZECH")} CZECH"
|
||||
%br= "#{currency_balance(current_user.principal, "GONGO")} GONGO"
|
||||
-# %br= "#{currency_balance(current_user.principal, "GONGO")} GONGO"
|
||||
%br= "#{currency_balance(current_user.principal, "DKP")} DKP"
|
||||
%br= "#{currency_balance(current_user.principal, "SNS-1")} SNS-1"
|
||||
%br= "#{currency_balance(current_user.principal, "SNEED")} SNEED"
|
||||
= "#{currency_balance(current_user.principal, "ETH", current_user.soft_token)} ETH"
|
||||
@ -54,6 +54,7 @@ Rails.application.routes.draw do
|
||||
get '/loaderio-456644f4db1fcd1e8578be882d2fc476.txt', to: redirect('/assets/loaderio-456644f4db1fcd1e8578be882d2fc476.txt')
|
||||
get '/loaderio-eb4afd672bf5b9af467fbadcba243f26.txt', to: redirect('/assets/loaderio-eb4afd672bf5b9af467fbadcba243f26.txt')
|
||||
get '/calls', to: 'calls#root'
|
||||
get '/wallet', to: 'visitors#wallet'
|
||||
resources :calls, only: :create
|
||||
mount ActionCable.server, at: '/cable'
|
||||
resources :rooms, only: [:new, :create, :show]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user