mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 14:18:08 +00:00
added page titles
This commit is contained in:
@@ -23,12 +23,6 @@ class AppFormElement extends BaseComponentElement {
|
||||
this.update();
|
||||
};
|
||||
|
||||
public keyUp = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
this.onSubmit(e);
|
||||
}
|
||||
};
|
||||
|
||||
public onSubmit = (e) => {
|
||||
e.preventDefault();
|
||||
if (!this.valid) {
|
||||
|
||||
@@ -44,7 +44,10 @@ class AppLinkElement extends BaseComponentElement {
|
||||
};
|
||||
|
||||
get disabled(): boolean {
|
||||
return isTrue(this.goBack) && this.routerService.emptyState;
|
||||
if (isTrue(this.goBack)) {
|
||||
return this.routerService.emptyState;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
render = (): TemplateResult => {
|
||||
@@ -56,7 +59,7 @@ class AppLinkElement extends BaseComponentElement {
|
||||
>${this.title}</a
|
||||
>`
|
||||
: html`<a
|
||||
class="btn btn-link btn-disabled"
|
||||
class="btn btn-link"
|
||||
data-target="app-link.main"
|
||||
data-action="click:app-link#goTo"
|
||||
href="${this.to}"
|
||||
|
||||
@@ -126,6 +126,11 @@ class AppMainElement extends HTMLElement {
|
||||
this.dispatchEvent(this.domEvents.walletupdate);
|
||||
};
|
||||
|
||||
public setTitle = (title: string): void => {
|
||||
if (!title) title = __CONFIG__.appName;
|
||||
window.document.title = title;
|
||||
};
|
||||
|
||||
private createAppModal = () => {
|
||||
const _appModal = document.createElement("app-modal");
|
||||
_appModal.setAttribute("data-target", "app-main.appModal");
|
||||
|
||||
@@ -120,7 +120,7 @@ class AppPaginationElement extends BaseComponentElement {
|
||||
return html`
|
||||
<div>
|
||||
<button
|
||||
class="btn btn-blue btn-squared ${page <= 1
|
||||
class="btn btn-primary btn-squared ${page <= 1
|
||||
? "disabled"
|
||||
: ""}"
|
||||
data-action="click:app-pagination#pageBack"
|
||||
@@ -128,7 +128,8 @@ class AppPaginationElement extends BaseComponentElement {
|
||||
Prev
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-blue btn-squared ${page >= pageRange
|
||||
class="btn btn-primary btn-squared ${page >=
|
||||
pageRange
|
||||
? "disabled"
|
||||
: ""}"
|
||||
data-action="click:app-pagination#pageNext"
|
||||
|
||||
@@ -105,7 +105,6 @@ class InputFieldElement extends BaseComponentElement {
|
||||
data-target="input-field.inp"
|
||||
data-action="
|
||||
input:input-field#inputChange
|
||||
keyup:app-form#keyUp
|
||||
blur:input-field#validateDisplay
|
||||
"
|
||||
/>`;
|
||||
|
||||
Reference in New Issue
Block a user