1
0
Fork 0

Add typing to KeyValueDelete.ts.

This commit is contained in:
Kitteh 2021-05-08 03:11:09 +01:00
parent bb6e5a7310
commit 8b0512a3ec
2 changed files with 6 additions and 6 deletions

View file

@ -1,5 +1,5 @@
import { HomePage } from "./pages/Home";
import { KeyValueDeletePage } from "./pages/KeyValue/KeyValueDelete.js";
import { KeyValueDeletePage } from "./pages/KeyValue/KeyValueDelete";
import { KeyValueNewPage } from "./pages/KeyValue/KeyValueNew";
import { KeyValueSecretEditPage } from "./pages/KeyValue/KeyValueSecretsEdit";
import { KeyValueSecretPage } from "./pages/KeyValue/KeyValueSecret";

View file

@ -2,14 +2,14 @@ import { Page } from "../../types/Page";
import { changePage, setPageContent, setTitleElement } from "../../pageUtils";
import { deleteSecret } from "../../api/deleteSecret";
import { makeElement } from "../../htmlUtils";
import { pageState } from "../../globalPageState.ts";
import { pageState } from "../../globalPageState";
import i18next from 'i18next';
export class KeyValueDeletePage extends Page {
constructor() {
super();
}
goBack() {
goBack(): void {
if (pageState.currentSecretVersion != null) {
pageState.currentSecretVersion = null;
changePage("KEY_VALUE_SECRET");
@ -18,7 +18,7 @@ export class KeyValueDeletePage extends Page {
changePage("KEY_VALUE_VIEW");
}
}
render() {
render(): void {
setTitleElement(pageState);
setPageContent(makeElement({
tag: "div",
@ -46,10 +46,10 @@ export class KeyValueDeletePage extends Page {
]
}));
}
get titleSuffix() {
get titleSuffix(): string {
return i18next.t("kv_delete_suffix");
}
get name() {
get name(): string {
return i18next.t("kv_delete_title");
}
}