Add typing to KeyValueVersions.ts.
This commit is contained in:
parent
489792fb8d
commit
c50252a77d
|
@ -3,7 +3,7 @@ import { KeyValueDeletePage } from "./pages/KeyValue/KeyValueDelete.js";
|
||||||
import { KeyValueNewPage } from "./pages/KeyValue/KeyValueNew.js";
|
import { KeyValueNewPage } from "./pages/KeyValue/KeyValueNew.js";
|
||||||
import { KeyValueSecretEditPage } from "./pages/KeyValue/KeyValueSecretsEdit.js";
|
import { KeyValueSecretEditPage } from "./pages/KeyValue/KeyValueSecretsEdit.js";
|
||||||
import { KeyValueSecretPage } from "./pages/KeyValue/KeyValueSecret.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 { KeyValueViewPage } from "./pages/KeyValue/KeyValueView.js";
|
||||||
import { LoginPage } from "./pages/Login";
|
import { LoginPage } from "./pages/Login";
|
||||||
import { MePage } from "./pages/Me";
|
import { MePage } from "./pages/Me";
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { changePage, setPageContent, setTitleElement } from "../../pageUtils";
|
||||||
import { getSecretMetadata } from "../../api/getSecretMetadata";
|
import { getSecretMetadata } from "../../api/getSecretMetadata";
|
||||||
import { makeElement } from "../../htmlUtils";
|
import { makeElement } from "../../htmlUtils";
|
||||||
import { objectToMap } from "../../utils";
|
import { objectToMap } from "../../utils";
|
||||||
import { pageState } from "../../globalPageState.ts";
|
import { pageState } from "../../globalPageState";
|
||||||
import i18next from 'i18next';
|
import i18next from 'i18next';
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,23 +11,23 @@ export class KeyValueVersionsPage extends Page {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
goBack() {
|
goBack(): void {
|
||||||
if (pageState.currentSecretVersion != null) {
|
if (pageState.currentSecretVersion != null) {
|
||||||
pageState.currentSecretVersion = null;
|
pageState.currentSecretVersion = null;
|
||||||
}
|
}
|
||||||
changePage("KEY_VALUE_SECRET");
|
changePage("KEY_VALUE_SECRET");
|
||||||
}
|
}
|
||||||
async render() {
|
async render(): Promise<void> {
|
||||||
setTitleElement(pageState);
|
setTitleElement(pageState);
|
||||||
|
|
||||||
let versionsList = makeElement({
|
const versionsList = makeElement({
|
||||||
tag: "ul",
|
tag: "ul",
|
||||||
id: "versionsList",
|
id: "versionsList",
|
||||||
class: ["uk-nav", "uk-nav-default"]
|
class: ["uk-nav", "uk-nav-default"]
|
||||||
});
|
});
|
||||||
setPageContent(versionsList);
|
setPageContent(versionsList);
|
||||||
|
|
||||||
let metadata = await getSecretMetadata(
|
const metadata = await getSecretMetadata(
|
||||||
pageState.currentBaseMount,
|
pageState.currentBaseMount,
|
||||||
pageState.currentSecretPath,
|
pageState.currentSecretPath,
|
||||||
pageState.currentSecret
|
pageState.currentSecret
|
||||||
|
@ -48,11 +48,11 @@ export class KeyValueVersionsPage extends Page {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
get titleSuffix() {
|
get titleSuffix(): string {
|
||||||
return i18next.t("kv_sec_versions_suffix");
|
return i18next.t("kv_sec_versions_suffix");
|
||||||
}
|
}
|
||||||
|
|
||||||
get name() {
|
get name(): string {
|
||||||
return i18next.t("kv_sec_versions_title");
|
return i18next.t("kv_sec_versions_title");
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue