diff --git a/src/allPages.ts b/src/allPages.ts index 76cd416..90f7862 100644 --- a/src/allPages.ts +++ b/src/allPages.ts @@ -1,4 +1,11 @@ +// So that we dont get `PageType not found in 'z-pagerouter' import/named` +/* eslint-disable */ +import { PageType } from "z-pagerouter"; +/* eslint-enable */ + import { AccessHomePage } from "./pages/Access/AccessHome"; +import { AuthHomePage } from "./pages/Access/Auth/AuthHome"; +import { AuthViewConfigPage } from "./pages/Access/Auth/AuthViewConfig"; import { HomePage } from "./pages/Home"; import { KeyValueDeletePage } from "./pages/Secrets/KeyValue/KeyValueDelete"; import { KeyValueNewPage } from "./pages/Secrets/KeyValue/KeyValueNew"; @@ -26,14 +33,8 @@ import { TransitRewrapPage } from "./pages/Secrets/Transit/TransitRewrap"; import { TransitViewPage } from "./pages/Secrets/Transit/TransitView"; import { TransitViewSecretPage } from "./pages/Secrets/Transit/TransitViewSecret"; import { UnsealPage } from "./pages/Unseal"; -import { getObjectKeys } from "./utils"; - -/* eslint-disable */ -import { AuthHomePage } from "./pages/Access/Auth/AuthHome"; -import { AuthViewConfigPage } from "./pages/Access/Auth/AuthViewConfig"; -import { PageType } from "z-pagerouter"; import { UserPassUsersListPage } from "./pages/Access/Auth/userpass/UserPassUsersList"; -/* eslint-enable */ +import { getObjectKeys } from "./utils"; type pagesList = { [key: string]: Page; diff --git a/src/pages/Secrets/KeyValue/KeyValueSecret.ts b/src/pages/Secrets/KeyValue/KeyValueSecret.ts index 9450ef8..50f986f 100644 --- a/src/pages/Secrets/KeyValue/KeyValueSecret.ts +++ b/src/pages/Secrets/KeyValue/KeyValueSecret.ts @@ -56,10 +56,7 @@ export class KeyValueSecretPage extends Page { let deleteButtonText = i18next.t("kv_secret_delete_btn"); if (this.state.secretMountType == "kv-v2" && this.state.secretVersion == null) { deleteButtonText = i18next.t("kv_secret_delete_all_btn"); - } else if ( - this.state.secretMountType == "kv-v2" && - this.state.secretVersion != null - ) { + } else if (this.state.secretMountType == "kv-v2" && this.state.secretVersion != null) { deleteButtonText = i18next.t("kv_secret_delete_version_btn", { version: this.state.secretVersion, }); diff --git a/src/pages/Secrets/SecretsHome.ts b/src/pages/Secrets/SecretsHome.ts index ca1446b..f056e9a 100644 --- a/src/pages/Secrets/SecretsHome.ts +++ b/src/pages/Secrets/SecretsHome.ts @@ -55,7 +55,8 @@ export class SecretsHomePage extends Page { if (!("type" in mount)) return; if (!["kv", "totp", "transit", "cubbyhole"].includes(mount.type)) return; - const secretMountType = mount.type == "kv" ? "kv-v" + String(mount.options.version) : mount.type; + const secretMountType = + mount.type == "kv" ? "kv-v" + String(mount.options.version) : mount.type; let linkText = ""; let linkPage: string;