1
0
Fork 0

Add typing to KeyValueVersions.ts.

This commit is contained in:
Kitteh 2021-05-08 02:58:04 +01:00
parent 489792fb8d
commit c50252a77d
2 changed files with 8 additions and 8 deletions

View file

@ -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";

View file

@ -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<void> {
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");
}
}