1
0
Fork 0

run linterFormatter

This commit is contained in:
ChaotiCryptidz 2022-03-03 14:28:43 +00:00
parent bf3b952f21
commit f5937896d8
No known key found for this signature in database
2 changed files with 12 additions and 14 deletions

View file

@ -53,7 +53,7 @@ export class KVKeysList extends Component<KVKeysListProps, KVKeysListState> {
async componentDidMount() {
this.setState({
searchQuery: ""
searchQuery: "",
});
try {
@ -98,7 +98,7 @@ export class KVKeysList extends Component<KVKeysListProps, KVKeysListState> {
) {
this.setState({
dataLoaded: false,
searchQuery: ""
searchQuery: "",
});
void this.loadData();
}

View file

@ -1,11 +1,13 @@
import { Button } from "../../../elements/Button";
import { CapabilitiesType } from "../../../../api/types/capabilities";
import { Component, createRef, JSX } from "preact";
import { Component, JSX, createRef } from "preact";
import { CopyableInputBox } from "../../../elements/CopyableInputBox";
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
import { Grid, GridSizes } from "../../../elements/Grid";
import { Margin } from "../../../elements/Margin";
import { MarginInline } from "../../../elements/MarginInline";
import { SecretTitleElement } from "../SecretTitleElement";
import { TextInput } from "../../../elements/forms/TextInput";
import {
delSecretsEngineURL,
totpDeleteURL,
@ -14,9 +16,7 @@ import {
} from "../../pageLinks";
import { removeDoubleSlash } from "../../../../utils";
import { sendErrorNotification } from "../../../elements/ErrorMessage";
import i18next, { t } from "i18next";
import { Margin } from "../../../elements/Margin";
import { TextInput } from "../../../elements/forms/TextInput";
import i18next from "i18next";
type TOTPGridItemProps = DefaultPageProps & {
baseMount: string;
@ -76,17 +76,17 @@ type TOTPItem = {
type TOTPListViewProps = DefaultPageProps & {
totpItems: TOTPItem[];
}
};
type TOTPListViewState = {
searchQuery: string;
}
};
export class TOTPListView extends Component<TOTPListViewProps, TOTPListViewState> {
constructor() {
super();
this.state = {
searchQuery: ""
searchQuery: "",
};
}
@ -94,13 +94,13 @@ export class TOTPListView extends Component<TOTPListViewProps, TOTPListViewState
componentDidMount(): void {
this.setState({
searchQuery: ""
searchQuery: "",
});
}
render() {
if (this.props.totpItems.length == 0) {
return <p>{i18next.t("totp_list_empty")}</p>
return <p>{i18next.t("totp_list_empty")}</p>;
}
return (
@ -133,11 +133,10 @@ export class TOTPListView extends Component<TOTPListViewProps, TOTPListViewState
);
})}
</>
)
);
}
}
type TOTPListState = {
capabilities?: CapabilitiesType;
totpItems: TOTPItem[];
@ -149,7 +148,6 @@ export class TOTPList extends Component<DefaultPageProps, TOTPListState> {
this.state = { capabilities: null, totpItems: [] };
}
async doApiFetches() {
const api = this.props.api;
const baseMount = this.props.matches["baseMount"];