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:
Fran Jurmanović
2021-05-31 18:23:39 +02:00
parent 53c27718a9
commit 551543a9e7
19 changed files with 262 additions and 64 deletions

View File

@@ -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;
}
};
}