From 8b0512a3ecf8cdfb23bd93aee42a492265209401 Mon Sep 17 00:00:00 2001 From: Kitteh Date: Sat, 8 May 2021 03:11:09 +0100 Subject: [PATCH] Add typing to KeyValueDelete.ts. --- src/allPages.ts | 2 +- .../KeyValue/{KeyValueDelete.js => KeyValueDelete.ts} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/pages/KeyValue/{KeyValueDelete.js => KeyValueDelete.ts} (90%) diff --git a/src/allPages.ts b/src/allPages.ts index 9986a23..736fe0e 100644 --- a/src/allPages.ts +++ b/src/allPages.ts @@ -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"; diff --git a/src/pages/KeyValue/KeyValueDelete.js b/src/pages/KeyValue/KeyValueDelete.ts similarity index 90% rename from src/pages/KeyValue/KeyValueDelete.js rename to src/pages/KeyValue/KeyValueDelete.ts index e48706c..74bcd03 100644 --- a/src/pages/KeyValue/KeyValueDelete.js +++ b/src/pages/KeyValue/KeyValueDelete.ts @@ -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"); } } \ No newline at end of file