From 2a5a61c23cb6f756d778c591b2b47dfd93588881 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Tue, 18 Jan 2022 12:06:22 +0000 Subject: [PATCH] + ); + } else { + return ( + + ); + } +} diff --git a/src/ui/pages/Access/Auth/AuthHome.tsx b/src/ui/pages/Access/Auth/AuthHome.tsx index 928e570..bcb3954 100644 --- a/src/ui/pages/Access/Auth/AuthHome.tsx +++ b/src/ui/pages/Access/Auth/AuthHome.tsx @@ -1,4 +1,5 @@ import { AuthMethod } from "../../../../api/types/auth"; +import { Button } from "../../../elements/Button"; import { Component, JSX } from "preact"; import { DefaultPageProps } from "../../../../types/DefaultPageProps"; import { PageTitle } from "../../../elements/PageTitle"; @@ -28,26 +29,25 @@ export function AuthListElement(props: AuthListElementProps): JSX.Element { {` (${props.method.accessor})`}
{isViewable && ( - + /> )} - - +
); diff --git a/src/ui/pages/Access/Auth/userpass/UserPassUserDelete.tsx b/src/ui/pages/Access/Auth/userpass/UserPassUserDelete.tsx index 331a3b0..f55e83c 100644 --- a/src/ui/pages/Access/Auth/userpass/UserPassUserDelete.tsx +++ b/src/ui/pages/Access/Auth/userpass/UserPassUserDelete.tsx @@ -1,3 +1,4 @@ +import { Button } from "../../../../elements/Button"; import { Component } from "preact"; import { DefaultPageProps } from "../../../../../types/DefaultPageProps"; import { PageTitle } from "../../../../elements/PageTitle"; @@ -15,15 +16,14 @@ export class UserPassUserDelete extends Component {
{i18next.t("userpass_user_delete_text")}
- + />
); diff --git a/src/ui/pages/Access/Auth/userpass/UserPassUserEdit.tsx b/src/ui/pages/Access/Auth/userpass/UserPassUserEdit.tsx index 177b1a2..afbc669 100644 --- a/src/ui/pages/Access/Auth/userpass/UserPassUserEdit.tsx +++ b/src/ui/pages/Access/Auth/userpass/UserPassUserEdit.tsx @@ -1,3 +1,4 @@ +import { Button } from "../../../../elements/Button"; import { Component } from "preact"; import { DefaultPageProps } from "../../../../../types/DefaultPageProps"; import { Form } from "../../../../elements/Form"; @@ -112,9 +113,7 @@ export class UserPassUserEdit extends Component

- + + - + + + + + + + /> ); diff --git a/src/ui/pages/Policies/PolicyEdit.tsx b/src/ui/pages/Policies/PolicyEdit.tsx index 0fb79f8..a67e521 100644 --- a/src/ui/pages/Policies/PolicyEdit.tsx +++ b/src/ui/pages/Policies/PolicyEdit.tsx @@ -1,3 +1,4 @@ +import { Button } from "../../elements/Button"; import { CodeEditor } from "../../elements/CodeEditor"; import { Component, JSX } from "preact"; import { DefaultPageProps } from "../../../types/DefaultPageProps"; @@ -82,9 +83,11 @@ export class PolicyEditor extends Component - + + + + + + + /> ); diff --git a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx index d2feaef..ec3ad6c 100644 --- a/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx +++ b/src/ui/pages/Secrets/KeyValue/KeyValueEdit.tsx @@ -1,3 +1,4 @@ +import { Button } from "../../../elements/Button"; import { CodeEditor } from "../../../elements/CodeEditor"; import { Component, JSX, createRef } from "preact"; import { DefaultPageProps } from "../../../../types/DefaultPageProps"; @@ -45,7 +46,7 @@ export function validateData(str: string, syntax = "json"): boolean { try { parseData(str, syntax); } catch (e) { - let err = e as Error; + const err = e as Error; setErrorText(err.message); return false; } @@ -169,9 +170,7 @@ export class KVEditor extends Component { code={this.getStringKVData(this.state.kvData)} onUpdate={(code) => this.onCodeUpdate(code)} /> - + + + + + + + + /> )} diff --git a/src/ui/pages/Secrets/NewEngines/NewKVEngine.tsx b/src/ui/pages/Secrets/NewEngines/NewKVEngine.tsx index a6c52c5..f5ae8a8 100644 --- a/src/ui/pages/Secrets/NewEngines/NewKVEngine.tsx +++ b/src/ui/pages/Secrets/NewEngines/NewKVEngine.tsx @@ -1,3 +1,4 @@ +import { Button } from "../../../elements/Button"; import { Component } from "preact"; import { DefaultPageProps } from "../../../../types/DefaultPageProps"; import { Form } from "../../../elements/Form"; @@ -36,9 +37,7 @@ export class NewKVEngine extends Component {

- + + + + + /> ); diff --git a/src/ui/pages/Secrets/TOTP/TOTPList.tsx b/src/ui/pages/Secrets/TOTP/TOTPList.tsx index 84f7f9a..af4d38b 100644 --- a/src/ui/pages/Secrets/TOTP/TOTPList.tsx +++ b/src/ui/pages/Secrets/TOTP/TOTPList.tsx @@ -1,3 +1,4 @@ +import { Button } from "../../../elements/Button"; import { CapabilitiesType } from "../../../../api/types/capabilities"; import { Component, JSX } from "preact"; import { CopyableInputBox } from "../../../elements/CopyableInputBox"; @@ -6,9 +7,13 @@ import { DoesNotExistError } from "../../../../types/internalErrors"; import { Grid, GridSizes } from "../../../elements/Grid"; import { MarginInline } from "../../../elements/MarginInline"; import { SecretTitleElement } from "../SecretTitleElement"; -import { delSecretsEngineURL, totpNewGeneratedURL, totpNewURL } from "../../pageLinks"; +import { + delSecretsEngineURL, + totpDeleteURL, + totpNewGeneratedURL, + totpNewURL, +} from "../../pageLinks"; import { removeDoubleSlash } from "../../../../utils"; -import { route } from "preact-router"; import { setErrorText } from "../../../../pageUtils"; import i18next from "i18next"; @@ -50,14 +55,11 @@ export class RefreshingTOTPGridItem extends Component {this.props.canDelete && ( - + + + + + />

- + + + + + + + + + + + + + /> );