1
0
Fork 0

Lint code.

This commit is contained in:
Kitteh 2021-05-20 14:25:06 +01:00
parent 0273793569
commit 7180edf2a3
3 changed files with 11 additions and 12 deletions

View file

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

View file

@ -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,
});

View file

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