diff --git a/src/common/pages/BasePageElement/BasePageElement.ts b/src/common/pages/BasePageElement/BasePageElement.ts index c13dedd..b1df69c 100644 --- a/src/common/pages/BasePageElement/BasePageElement.ts +++ b/src/common/pages/BasePageElement/BasePageElement.ts @@ -5,6 +5,7 @@ import { isTrue } from 'core/utils'; class BasePageElement extends BaseElement { public _pageTitle: string = ''; + public hideTitleHead: boolean = false; @attr hidetitle: string; @attr customtitle: string; private _data: any; @@ -13,6 +14,7 @@ class BasePageElement extends BaseElement { if (options?.title) { this._pageTitle = options?.title; } + this.hideTitleHead = options?.hideTitleHead || false; this.connectedCallback = this.connectedCallback.bind(this); this.disconnectedCallback = this.disconnectedCallback.bind(this); } @@ -36,7 +38,9 @@ class BasePageElement extends BaseElement { }; connectedCallback() { - this.appMain.setTitle(this.pageTitle); + if (!this.hideTitleHead) { + this.appMain.setTitle(this.pageTitle); + } super.connectedCallback(); } @@ -53,4 +57,5 @@ export default BasePageElement; export type OptionType = { title?: string; + hideTitleHead?: boolean; }; diff --git a/src/components/app-main/AppMainElement.ts b/src/components/app-main/AppMainElement.ts index fe78527..64b19d0 100644 --- a/src/components/app-main/AppMainElement.ts +++ b/src/components/app-main/AppMainElement.ts @@ -129,9 +129,10 @@ class AppMainElement extends HTMLElement { checkSubscriptions = async () => { if (this.isAuth && !this.subscriptionChecked) { - const checked = await this.transactionsService.check({ sortBy: 'transactionDate asc' }); + const checked = await this.transactionsService.check({ sortBy: 'transactionDate asc', rpp: 10 }); this.createModal('transaction-check', { data: checked, + autoInit: false, }); this.subscriptionChecked = true; this.removeEventListener('routechanged', this.checkSubscriptions); diff --git a/src/pages/history-page/HistoryPageElement.ts b/src/pages/history-page/HistoryPageElement.ts index e54913a..1890809 100644 --- a/src/pages/history-page/HistoryPageElement.ts +++ b/src/pages/history-page/HistoryPageElement.ts @@ -49,6 +49,12 @@ class HistoryPageElement extends BasePageElement { } }; + transactionCheck = () => { + this.appMain.createModal('transaction-check', { + autoInit: true, + }); + }; + render = (): TemplateResult => HistoryPageElementTemplate({ walletId: this.routerService?.routerState?.data?.walletId }); } diff --git a/src/pages/history-page/HistoryPageElementTemplate.ts b/src/pages/history-page/HistoryPageElementTemplate.ts index 17557d4..dedf3d8 100644 --- a/src/pages/history-page/HistoryPageElementTemplate.ts +++ b/src/pages/history-page/HistoryPageElementTemplate.ts @@ -1,16 +1,12 @@ import { html, nothing, TemplateResult } from 'core/utils'; export default (props): TemplateResult => { - const { walletId } = props; - const renderWallet = () => { - if (walletId) { - return html`${walletId}`; - } - return nothing; - }; - return html`