mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 06:08:10 +00:00
multiple changes
WW-26 - render and update methods are now arrow functions WW-18 - created history page for listing transactions WW-12 - list wallets on menu
This commit is contained in:
@@ -24,28 +24,21 @@ class MenuLayoutElement extends BaseLayoutElement {
|
||||
get isAuth() {
|
||||
const _hasToken = this.appMain?.isAuth;
|
||||
const _hasData = this.appMain?.authStore?.user;
|
||||
return _hasData && _hasToken;
|
||||
return _hasToken;
|
||||
}
|
||||
|
||||
updateAuth = () => {
|
||||
this.update();
|
||||
};
|
||||
|
||||
render() {
|
||||
render = () => {
|
||||
return html`
|
||||
${this.isAuth &&
|
||||
html`<div>
|
||||
<app-link data-go-back="true" data-title="Go back"></app-link>
|
||||
</div>`}
|
||||
<app-menu></app-menu>
|
||||
<app-slot data-target="menu-layout.appSlot"></app-slot>
|
||||
`;
|
||||
}
|
||||
};
|
||||
|
||||
update = () => {
|
||||
render(this.render(), this);
|
||||
const _appSlot = this._appSlot;
|
||||
if (_appSlot && this.appSlot) {
|
||||
this.appSlot.innerHTML = _appSlot;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user