File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22< html lang ="en ">
33< head >
44 < meta charset ="UTF-8 " />
5- < link rel ="icon " type ="image/svg+xml " href ="/vite.svg " />
5+ < link rel ="shortcut icon " type ="image/vnd.microsoft.icon " href ="/favicon.ico " />
66 < meta content ="default-src 'self'; script-src 'self'; connect-src *; img-src *; style-src * 'unsafe-inline'; " http-equiv ="Content-Security-Policy " />
77 < meta content ="width=device-width, initial-scale=1.0 " name ="viewport " />
88 < script type ="module " src ="/src/main.tsx "> </ script >
Original file line number Diff line number Diff line change 1+ import LBRY from "./LBRY" ;
2+
3+ function WalletPage ( ) {
4+ LBRY . rpc ( 'wallet_balance' ) . then ( json => {
5+ if ( json . error ) {
6+ document . getElementById ( 'wallet' ) . innerHTML = json . error . message ;
7+ return ;
8+ }
9+ } ) ;
10+
11+ LBRY . rpc ( 'txo_list' ) . then ( json => {
12+ if ( json . error ) {
13+ document . getElementById ( 'transactions' ) . innerHTML = json . error . message ;
14+ return ;
15+ }
16+ } ) ;
17+
18+ return (
19+ < >
20+ < h1 > Wallet</ h1 >
21+ < div id = "wallet" > </ div >
22+ < h2 > Transactions</ h2 >
23+ < div id = "transactions" > </ div >
24+ </ >
25+ ) ;
26+ }
27+
28+ export default WalletPage ;
Original file line number Diff line number Diff line change @@ -18,6 +18,12 @@ header #header-name{
1818 padding : 0 16px ;
1919}
2020
21+ header # header-wallet {
22+ float : right;
23+ line-height : 60px ;
24+ padding : 0 16px ;
25+ }
26+
2127header # header-settings {
2228 float : right;
2329 line-height : 60px ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import NotFound from './NotFound';
88
99import './main.css' ;
1010import SettingsPage from "./SettingsPage" ;
11+ import WalletPage from "./WalletPage" ;
1112
1213const root : Root = createRoot ( document . getElementById ( 'root' ) ) ;
1314
@@ -21,12 +22,16 @@ root.render(
2122 < Link to = "/settings" id = "header-settings" >
2223 < button > Settings</ button >
2324 </ Link >
25+ < Link to = "/wallet" id = "header-wallet" >
26+ < button > Wallet</ button >
27+ </ Link >
2428 { /*<div id="header-settings"><b>LBRY Web</b></div>*/ }
2529 </ header >
2630 < main >
2731 < Routes >
2832 < Route index path = "/" element = { < App /> } />
2933 < Route path = "/about" element = { < App /> } />
34+ < Route path = "/wallet" element = { < WalletPage /> } />
3035 < Route path = "/settings" element = { < SettingsPage /> } />
3136 < Route path = "*" element = { < NotFound /> } />
3237 </ Routes >
You can’t perform that action at this time.
0 commit comments