Add typing to Page.ts.
This commit is contained in:
parent
ac7372029d
commit
c1455c25a4
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "./types/Page.js";
|
||||
import { Page } from "./types/Page";
|
||||
import { allPages } from "./allPages"
|
||||
import {
|
||||
getKeyByObjectPropertyValue,
|
||||
|
|
|
@ -8,6 +8,7 @@ import { KeyValueViewPage } from "./pages/KeyValue/KeyValueView.js";
|
|||
import { LoginPage } from "./pages/Login.js";
|
||||
import { MePage } from "./pages/Me.js";
|
||||
import { NewTOTPPage } from "./pages/TOTP/NewTOTP.js";
|
||||
import { Page } from "./types/Page";
|
||||
import { PwGenPage } from "./pages/PwGen.js";
|
||||
import { SetLanguagePage } from "./pages/SetLanguage.js";
|
||||
import { SetVaultURLPage } from "./pages/SetVaultURL.js";
|
||||
|
@ -17,7 +18,6 @@ import { TransitEncryptPage } from "./pages/Transit/TransitEncrypt.js";
|
|||
import { TransitViewPage } from "./pages/Transit/TransitView.js";
|
||||
import { TransitViewSecretPage } from "./pages/Transit/TransitViewSecret.js";
|
||||
import { UnsealPage } from "./pages/Unseal.js";
|
||||
import { Page } from "./types/Page.js";
|
||||
|
||||
type pagesList = {
|
||||
[key: string]: Page
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { changePage, prePageChecks, setErrorText } from "../pageUtils";
|
||||
import { getMounts } from "../api/getMounts";
|
||||
import { lookupSelf } from "../api/lookupSelf";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { deleteSecret } from "../../api/deleteSecret";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setErrorText, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { createOrUpdateSecret } from "../../api/createOrUpdateSecret";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { CopyableInputBox } from "../../elements/CopyableInputBox.js";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { getCapabilities } from "../../api/getCapabilities";
|
||||
import { getSecret } from "../../api/getSecret";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { CodeJar } from "codejar";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setErrorText, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { createOrUpdateSecret } from "../../api/createOrUpdateSecret.js";
|
||||
import { getSecret } from "../../api/getSecret.js";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { getSecretMetadata } from "../../api/getSecretMetadata.js";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { DoesNotExistError } from "../../types/internalErrors.js";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setErrorText, setTitleElement } from "../../pageUtils";
|
||||
import { getSecrets } from "../../api/getSecrets";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Margin } from "../elements/Margin.js";
|
||||
import { MarginInline } from "../elements/MarginInline.js";
|
||||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { changePage, setErrorText, setPageContent } from "../pageUtils";
|
||||
import { lookupSelf } from "../api/lookupSelf";
|
||||
import { makeElement } from "../htmlUtils";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { addClipboardNotifications, changePage, prePageChecks, setErrorText, setPageContent } from "../pageUtils";
|
||||
import { getCapabilitiesPath } from "../api/getCapabilities.js";
|
||||
import { makeElement } from "../htmlUtils";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { CopyableInputBox } from "../elements/CopyableInputBox.js";
|
||||
import { Margin } from "../elements/Margin.js";
|
||||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { makeElement } from "../htmlUtils";
|
||||
import { setPageContent } from "../pageUtils";
|
||||
import i18next from 'i18next';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Margin } from "../elements/Margin.js";
|
||||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { changePage, setPageContent } from "../pageUtils";
|
||||
import { makeElement } from "../htmlUtils";
|
||||
import { pageState } from "../globalPageState.ts";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { changePage, setPageContent } from "../pageUtils";
|
||||
import { makeElement } from "../htmlUtils";
|
||||
import { pageState } from "../globalPageState.ts";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Margin } from "../../elements/Margin.js";
|
||||
import { MarginInline } from "../../elements/MarginInline.js";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { addNewTOTP } from "../../api/addNewTOTP";
|
||||
import { changePage, setErrorText, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { CopyableInputBox } from "../../elements/CopyableInputBox.js";
|
||||
import { DoesNotExistError } from "../../types/internalErrors.js";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setErrorText, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { getTOTPCode } from "../../api/getTOTPCode";
|
||||
import { getTOTPKeys } from "../../api/getTOTPKeys";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { changePage, setPageContent, setTitleElement } from "../pageUtils";
|
||||
import { makeElement } from "../htmlUtils";
|
||||
import { pageState } from "../globalPageState.ts";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { CopyableModal } from "../../elements/CopyableModal.js";
|
||||
import { Margin } from "../../elements/Margin.js";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setErrorText, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
import { pageState } from "../../globalPageState.ts";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { CopyableModal } from "../../elements/CopyableModal.js";
|
||||
import { Margin } from "../../elements/Margin.js";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setErrorText, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
import { pageState } from "../../globalPageState.ts";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { DoesNotExistError } from "../../types/internalErrors.js";
|
||||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setErrorText, setTitleElement } from "../../pageUtils";
|
||||
import { getTransitKeys } from "../../api/getTransitKeys";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Page } from "../../types/Page.js";
|
||||
import { Page } from "../../types/Page";
|
||||
import { changePage, setPageContent, setTitleElement } from "../../pageUtils";
|
||||
import { makeElement } from "../../htmlUtils";
|
||||
import { pageState } from "../../globalPageState.ts";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { MarginInline } from "../elements/MarginInline.js";
|
||||
import { Page } from "../types/Page.js";
|
||||
import { Page } from "../types/Page";
|
||||
import { QRScanner } from "../elements/QRScanner.js";
|
||||
import { changePage, setErrorText, setPageContent } from "../pageUtils";
|
||||
import { getSealStatus } from "../api/getSealStatus.js";
|
||||
|
|
|
@ -4,19 +4,19 @@ export class Page {
|
|||
constructor() {
|
||||
// Do Nothing
|
||||
}
|
||||
render() {
|
||||
render(): any {
|
||||
// Do Nothing
|
||||
}
|
||||
get name() {
|
||||
get name(): string {
|
||||
return "Page";
|
||||
}
|
||||
get titleSuffix() {
|
||||
get titleSuffix(): string {
|
||||
return "";
|
||||
}
|
||||
goBack() {
|
||||
goBack(): void {
|
||||
changePage("HOME");
|
||||
}
|
||||
cleanup() {
|
||||
cleanup(): void {
|
||||
// Do Nothing
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue