File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,24 @@ const Styled = {
106
106
Fluid : styled . div `
107
107
height: 100%;
108
108
` ,
109
+ Versions : styled . div `
110
+ position: absolute;
111
+ font-size: ${ props => props . theme . sizes . xs } ;
112
+ bottom: 0;
113
+ padding: 15px;
114
+ ` ,
115
+ } ;
116
+
117
+ const VersionInfo = ( ) => {
118
+ const { nodeStore } = useStore ( ) ;
119
+ const { Versions } = Styled ;
120
+ const shortVersion = nodeStore . version . split ( ' commit=' ) [ 0 ] ;
121
+
122
+ return (
123
+ < Versions >
124
+ < div title = { nodeStore . version } > { `LND: v${ shortVersion } ` } </ div >
125
+ </ Versions >
126
+ ) ;
109
127
} ;
110
128
111
129
export const Layout : React . FC = ( { children } ) => {
@@ -123,6 +141,7 @@ export const Layout: React.FC = ({ children }) => {
123
141
</ Hamburger >
124
142
< Aside collapsed = { ! settingsStore . sidebarVisible } >
125
143
< Sidebar />
144
+ < VersionInfo />
126
145
</ Aside >
127
146
< Content collapsed = { ! settingsStore . sidebarVisible } fullWidth = { appView . fullWidth } >
128
147
< Fluid className = "container-fluid" > { children } </ Fluid >
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ export default class NodeStore {
18
18
*/
19
19
private _knownTxns : string [ ] = [ ] ;
20
20
21
+ /** the version of the LND node */
22
+ version = '' ;
21
23
/** the pubkey of the LND node */
22
24
pubkey = '' ;
23
25
/** the alias of the LND node */
@@ -71,6 +73,7 @@ export default class NodeStore {
71
73
try {
72
74
const info = await this . _store . api . lnd . getInfo ( ) ;
73
75
runInAction ( ( ) => {
76
+ this . version = info . version ;
74
77
this . pubkey = info . identityPubkey ;
75
78
this . alias = info . alias ;
76
79
this . blockHeight = info . blockHeight ;
You can’t perform that action at this time.
0 commit comments