diff --git a/src/allPages.ts b/src/allPages.ts index 38666dc..7b30c27 100644 --- a/src/allPages.ts +++ b/src/allPages.ts @@ -3,7 +3,7 @@ import { KeyValueDeletePage } from "./pages/KeyValue/KeyValueDelete.js"; import { KeyValueNewPage } from "./pages/KeyValue/KeyValueNew.js"; import { KeyValueSecretEditPage } from "./pages/KeyValue/KeyValueSecretsEdit.js"; import { KeyValueSecretPage } from "./pages/KeyValue/KeyValueSecret.js"; -import { KeyValueVersionsPage } from "./pages/KeyValue/KeyValueVersions.js"; +import { KeyValueVersionsPage } from "./pages/KeyValue/KeyValueVersions"; import { KeyValueViewPage } from "./pages/KeyValue/KeyValueView.js"; import { LoginPage } from "./pages/Login"; import { MePage } from "./pages/Me"; diff --git a/src/pages/KeyValue/KeyValueVersions.js b/src/pages/KeyValue/KeyValueVersions.ts similarity index 84% rename from src/pages/KeyValue/KeyValueVersions.js rename to src/pages/KeyValue/KeyValueVersions.ts index e11de82..f113eaf 100644 --- a/src/pages/KeyValue/KeyValueVersions.js +++ b/src/pages/KeyValue/KeyValueVersions.ts @@ -3,7 +3,7 @@ import { changePage, setPageContent, setTitleElement } from "../../pageUtils"; import { getSecretMetadata } from "../../api/getSecretMetadata"; import { makeElement } from "../../htmlUtils"; import { objectToMap } from "../../utils"; -import { pageState } from "../../globalPageState.ts"; +import { pageState } from "../../globalPageState"; import i18next from 'i18next'; @@ -11,23 +11,23 @@ export class KeyValueVersionsPage extends Page { constructor() { super(); } - goBack() { + goBack(): void { if (pageState.currentSecretVersion != null) { pageState.currentSecretVersion = null; } changePage("KEY_VALUE_SECRET"); } - async render() { + async render(): Promise { setTitleElement(pageState); - let versionsList = makeElement({ + const versionsList = makeElement({ tag: "ul", id: "versionsList", class: ["uk-nav", "uk-nav-default"] }); setPageContent(versionsList); - let metadata = await getSecretMetadata( + const metadata = await getSecretMetadata( pageState.currentBaseMount, pageState.currentSecretPath, pageState.currentSecret @@ -48,11 +48,11 @@ export class KeyValueVersionsPage extends Page { }); } - get titleSuffix() { + get titleSuffix(): string { return i18next.t("kv_sec_versions_suffix"); } - get name() { + get name(): string { return i18next.t("kv_sec_versions_title"); } } \ No newline at end of file