make linter happy
This commit is contained in:
parent
96ca59c94c
commit
b66078511d
|
@ -21,6 +21,7 @@
|
||||||
"BUILD_STRING": "writable"
|
"BUILD_STRING": "writable"
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"import/no-named-as-default-member": "off",
|
||||||
"no-unused-vars": ["off"],
|
"no-unused-vars": ["off"],
|
||||||
"@typescript-eslint/no-unused-vars": [
|
"@typescript-eslint/no-unused-vars": [
|
||||||
"error",
|
"error",
|
||||||
|
@ -48,6 +49,7 @@
|
||||||
"root": true,
|
"root": true,
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"settings": {
|
"settings": {
|
||||||
|
"import/ignore": ["preact"],
|
||||||
"import/resolver": {
|
"import/resolver": {
|
||||||
"node": {
|
"node": {
|
||||||
"extensions": [".js", ".ts", ".tsx"]
|
"extensions": [".js", ".ts", ".tsx"]
|
||||||
|
|
22
package.json
22
package.json
|
@ -13,38 +13,38 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
||||||
"@typescript-eslint/parser": "^5.9.0",
|
"@typescript-eslint/parser": "^5.9.0",
|
||||||
"babel-loader": "^8.2.3",
|
"babel-loader": "^8.2.3",
|
||||||
"clipboard": "^2.0.8",
|
|
||||||
"codejar": "^3.5.0",
|
|
||||||
"core-js": "^3.20.2",
|
|
||||||
"css-loader": "^6.5.1",
|
"css-loader": "^6.5.1",
|
||||||
"css-minimizer-webpack-plugin": "^3.3.1",
|
"css-minimizer-webpack-plugin": "^3.3.1",
|
||||||
"date-fns": "^2.28.0",
|
|
||||||
"eslint": "^8.6.0",
|
"eslint": "^8.6.0",
|
||||||
"eslint-config-prettier": "^8.3.0",
|
"eslint-config-prettier": "^8.3.0",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.25.4",
|
||||||
"eslint-plugin-prettier": "^4.0.0",
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
|
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
|
||||||
"file-saver": "^2.0.5",
|
|
||||||
"git-revision-webpack-plugin": "^5.0.0",
|
"git-revision-webpack-plugin": "^5.0.0",
|
||||||
"html-webpack-plugin": "^5.5.0",
|
"html-webpack-plugin": "^5.5.0",
|
||||||
"i18next": "^21.6.5",
|
"i18next": "^21.6.5",
|
||||||
"mini-css-extract-plugin": "^2.4.5",
|
"mini-css-extract-plugin": "^2.4.5",
|
||||||
"node-sass": "^7.0.1",
|
"node-sass": "^7.0.1",
|
||||||
"normalize.css": "^8.0.1",
|
|
||||||
"preact": "^10.6.4",
|
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"prismjs": "^1.25.0",
|
|
||||||
"qr-scanner": "^1.3.0",
|
|
||||||
"raw-loader": "^4.0.2",
|
"raw-loader": "^4.0.2",
|
||||||
"sass-loader": "^12.4.0",
|
"sass-loader": "^12.4.0",
|
||||||
"ts-loader": "^9.2.6",
|
"ts-loader": "^9.2.6",
|
||||||
"typescript": "^4.5.4",
|
"typescript": "^4.5.4",
|
||||||
"uikit": "^3.9.4",
|
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.65.0",
|
||||||
"webpack-cli": "^4.9.1",
|
"webpack-cli": "^4.9.1",
|
||||||
"webpack-dev-server": "^4.7.2"
|
"webpack-dev-server": "^4.7.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"preact-router": "^4.0.0"
|
"preact-router": "^4.0.0",
|
||||||
|
"uikit": "^3.9.4",
|
||||||
|
"preact": "^10.6.4",
|
||||||
|
"prismjs": "^1.25.0",
|
||||||
|
"qr-scanner": "^1.3.0",
|
||||||
|
"normalize.css": "^8.0.1",
|
||||||
|
"file-saver": "^2.0.5",
|
||||||
|
"clipboard": "^2.0.8",
|
||||||
|
"codejar": "^3.5.0",
|
||||||
|
"core-js": "^3.20.2",
|
||||||
|
"date-fns": "^2.28.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
npx eslint --cache -c .eslintrc.json "$@" --ext .js,.ts,.tsx
|
npx eslint --cache -c .eslintrc.json "$@" --ext .js,.ts,.tsx
|
|
@ -1,12 +1,6 @@
|
||||||
import { Settings } from "../settings/Settings";
|
|
||||||
import { DoesNotExistError } from "../types/internalErrors";
|
|
||||||
import { removeDoubleSlash } from "../utils";
|
|
||||||
import { BaseAPIResponse } from "./types/api";
|
|
||||||
import { AuthListAPIType, AuthListType } from "./types/auth";
|
import { AuthListAPIType, AuthListType } from "./types/auth";
|
||||||
|
import { BaseAPIResponse } from "./types/api";
|
||||||
import { CapabilitiesType } from "./types/capabilities";
|
import { CapabilitiesType } from "./types/capabilities";
|
||||||
import { MountsType, MountType, NewMountParams } from "./types/mount";
|
|
||||||
import { SealStatusType } from "./types/seal";
|
|
||||||
import { TokenInfo } from "./types/token";
|
|
||||||
import {
|
import {
|
||||||
DecryptionPayload,
|
DecryptionPayload,
|
||||||
DecryptionResult,
|
DecryptionResult,
|
||||||
|
@ -16,7 +10,14 @@ import {
|
||||||
RewrapResult,
|
RewrapResult,
|
||||||
TransitKeyType,
|
TransitKeyType,
|
||||||
} from "./types/transit";
|
} from "./types/transit";
|
||||||
|
import { DoesNotExistError } from "../types/internalErrors";
|
||||||
|
import { MountType, MountsType, NewMountParams } from "./types/mount";
|
||||||
|
import { SealStatusType } from "./types/seal";
|
||||||
|
import { SecretMetadataType } from "./types/secret";
|
||||||
|
import { Settings } from "../settings/Settings";
|
||||||
|
import { TokenInfo } from "./types/token";
|
||||||
import { UserType, UserTypeAPIResp } from "./types/user";
|
import { UserType, UserTypeAPIResp } from "./types/user";
|
||||||
|
import { removeDoubleSlash } from "../utils";
|
||||||
|
|
||||||
async function checkResponse(resp: Response): Promise<void> {
|
async function checkResponse(resp: Response): Promise<void> {
|
||||||
if (resp.ok) return;
|
if (resp.ok) return;
|
||||||
|
@ -352,7 +353,6 @@ export class API {
|
||||||
|
|
||||||
async deleteSecret(baseMount: string, secretPath: string[], name: string): Promise<void> {
|
async deleteSecret(baseMount: string, secretPath: string[], name: string): Promise<void> {
|
||||||
let secretURL = "";
|
let secretURL = "";
|
||||||
let request;
|
|
||||||
|
|
||||||
const mountInfo = await this.getMount(baseMount);
|
const mountInfo = await this.getMount(baseMount);
|
||||||
if (mountInfo.options.version == "2") {
|
if (mountInfo.options.version == "2") {
|
||||||
|
@ -361,7 +361,7 @@ export class API {
|
||||||
secretURL = `/v1/${baseMount}/${secretPath.join("/")}/${name}`;
|
secretURL = `/v1/${baseMount}/${secretPath.join("/")}/${name}`;
|
||||||
}
|
}
|
||||||
secretURL = removeDoubleSlash(secretURL).replace(/\/$/, "");
|
secretURL = removeDoubleSlash(secretURL).replace(/\/$/, "");
|
||||||
request = new Request(this.appendAPIURL(secretURL), {
|
const request = new Request(this.appendAPIURL(secretURL), {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: this.getHeaders(),
|
headers: this.getHeaders(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
type SecretMetadataType = {
|
export type SecretMetadataType = {
|
||||||
versions: Record<string, unknown>;
|
versions: Record<string, unknown>;
|
||||||
};
|
};
|
||||||
|
|
10
src/main.tsx
10
src/main.tsx
|
@ -24,14 +24,14 @@ import translations from "./translations/index.mjs";
|
||||||
// Actual Imports
|
// Actual Imports
|
||||||
import { formatDistance } from "./formatDistance";
|
import { formatDistance } from "./formatDistance";
|
||||||
//import { pageList } from "./allPages";
|
//import { pageList } from "./allPages";
|
||||||
import { render } from "preact";
|
import { Main } from "./pages";
|
||||||
import { NavBar } from "./ui/elements/NavBar";
|
import { NavBar } from "./ui/elements/NavBar";
|
||||||
import { api } from "./globalAPI";
|
import { api } from "./globalAPI";
|
||||||
import { settings } from "./globalSettings";
|
|
||||||
import { playground } from "./playground";
|
|
||||||
import i18next from "i18next";
|
|
||||||
import { Main } from "./pages";
|
|
||||||
import { getCurrentUrl, route } from "preact-router";
|
import { getCurrentUrl, route } from "preact-router";
|
||||||
|
import { playground } from "./playground";
|
||||||
|
import { render } from "preact";
|
||||||
|
import { settings } from "./globalSettings";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
async function onLoad(): Promise<void> {
|
async function onLoad(): Promise<void> {
|
||||||
document.documentElement.dir = settings.pageDirection;
|
document.documentElement.dir = settings.pageDirection;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
import { API } from "./api/API";
|
||||||
import { Settings } from "./settings/Settings";
|
import { Settings } from "./settings/Settings";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import ClipboardJS from "clipboard";
|
import ClipboardJS from "clipboard";
|
||||||
import UIkit from "uikit";
|
import UIkit from "uikit";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { API } from "./api/API";
|
|
||||||
|
|
||||||
async function prePageChecksReal(api: API, settings: Settings) {
|
async function prePageChecksReal(api: API, settings: Settings) {
|
||||||
if (settings.language.length == 0) {
|
if (settings.language.length == 0) {
|
||||||
|
|
|
@ -1,47 +1,47 @@
|
||||||
import Router from "preact-router";
|
|
||||||
import { settings } from "./globalSettings";
|
|
||||||
import { api } from "./globalAPI";
|
import { api } from "./globalAPI";
|
||||||
|
import { settings } from "./globalSettings";
|
||||||
|
import Router from "preact-router";
|
||||||
|
|
||||||
|
import { AccessHomePage } from "./ui/pages/Access/AccessHome";
|
||||||
|
import { AuthHome } from "./ui/pages/Access/Auth/AuthHome";
|
||||||
|
import { AuthViewConfig } from "./ui/pages/Access/Auth/AuthViewConfig";
|
||||||
import { DeleteSecretsEngine } from "./ui/pages/Secrets/DeleteSecretsEngine";
|
import { DeleteSecretsEngine } from "./ui/pages/Secrets/DeleteSecretsEngine";
|
||||||
import { Home } from "./ui/pages/Home";
|
import { Home } from "./ui/pages/Home";
|
||||||
import { KeyValueDelete } from "./ui/pages/Secrets/KeyValue/KeyValueDelete";
|
import { KeyValueDelete } from "./ui/pages/Secrets/KeyValue/KeyValueDelete";
|
||||||
import { KeyValueView } from "./ui/pages/Secrets/KeyValue/KeyValueView";
|
|
||||||
import { KeyValueEdit } from "./ui/pages/Secrets/KeyValue/KeyValueEdit";
|
import { KeyValueEdit } from "./ui/pages/Secrets/KeyValue/KeyValueEdit";
|
||||||
import { KeyValueList } from "./ui/pages/Secrets/KeyValue/KeyValueList";
|
import { KeyValueList } from "./ui/pages/Secrets/KeyValue/KeyValueList";
|
||||||
|
import { KeyValueNew } from "./ui/pages/Secrets/KeyValue/KeyValueNew";
|
||||||
|
import { KeyValueView } from "./ui/pages/Secrets/KeyValue/KeyValueView";
|
||||||
import { Login } from "./ui/pages/Login";
|
import { Login } from "./ui/pages/Login";
|
||||||
import { Me } from "./ui/pages/Me";
|
import { Me } from "./ui/pages/Me";
|
||||||
import { NewKVEngine } from "./ui/pages/Secrets/NewEngines/NewKVEngine";
|
import { NewKVEngine } from "./ui/pages/Secrets/NewEngines/NewKVEngine";
|
||||||
import { NewSecretsEngine } from "./ui/pages/Secrets/NewSecretsEngine";
|
import { NewSecretsEngine } from "./ui/pages/Secrets/NewSecretsEngine";
|
||||||
import { NewTOTPEngine } from "./ui/pages/Secrets/NewEngines/NewTOTPEngine";
|
import { NewTOTPEngine } from "./ui/pages/Secrets/NewEngines/NewTOTPEngine";
|
||||||
import { NewTransitEngine } from "./ui/pages/Secrets/NewEngines/NewTransitEngine";
|
import { NewTransitEngine } from "./ui/pages/Secrets/NewEngines/NewTransitEngine";
|
||||||
import { TransitNew } from "./ui/pages/Secrets/Transit/TransitNew";
|
|
||||||
import { PasswordGenerator } from "./ui/pages/PwGen";
|
import { PasswordGenerator } from "./ui/pages/PwGen";
|
||||||
|
import { PoliciesHome } from "./ui/pages/Policies/PoliciesHome";
|
||||||
|
import { PolicyDelete } from "./ui/pages/Policies/PolicyDelete";
|
||||||
|
import { PolicyEdit } from "./ui/pages/Policies/PolicyEdit";
|
||||||
|
import { PolicyNew } from "./ui/pages/Policies/PolicyNew";
|
||||||
|
import { PolicyView } from "./ui/pages/Policies/PolicyView";
|
||||||
import { Secrets } from "./ui/pages/Secrets/SecretsHome";
|
import { Secrets } from "./ui/pages/Secrets/SecretsHome";
|
||||||
import { SetLanguage } from "./ui/pages/SetLanguage";
|
import { SetLanguage } from "./ui/pages/SetLanguage";
|
||||||
import { SetVaultURL } from "./ui/pages/SetVaultURL";
|
import { SetVaultURL } from "./ui/pages/SetVaultURL";
|
||||||
import { TOTPDelete } from "./ui/pages/Secrets/TOTP/TOTPDelete";
|
import { TOTPDelete } from "./ui/pages/Secrets/TOTP/TOTPDelete";
|
||||||
import { TOTPNew } from "./ui/pages/Secrets/TOTP/TOTPNew";
|
|
||||||
import { TOTPList } from "./ui/pages/Secrets/TOTP/TOTPList";
|
import { TOTPList } from "./ui/pages/Secrets/TOTP/TOTPList";
|
||||||
import { TransitList } from "./ui/pages/Secrets/Transit/TransitList";
|
import { TOTPNew } from "./ui/pages/Secrets/TOTP/TOTPNew";
|
||||||
import { TransitView } from "./ui/pages/Secrets/Transit/TransitView";
|
|
||||||
import { Unseal } from "./ui/pages/Unseal";
|
|
||||||
import { KeyValueNew } from "./ui/pages/Secrets/KeyValue/KeyValueNew";
|
|
||||||
import { TransitDecrypt } from "./ui/pages/Secrets/Transit/TransitDecrypt";
|
import { TransitDecrypt } from "./ui/pages/Secrets/Transit/TransitDecrypt";
|
||||||
import { TransitEncrypt } from "./ui/pages/Secrets/Transit/TransitEncrypt";
|
import { TransitEncrypt } from "./ui/pages/Secrets/Transit/TransitEncrypt";
|
||||||
|
import { TransitList } from "./ui/pages/Secrets/Transit/TransitList";
|
||||||
|
import { TransitNew } from "./ui/pages/Secrets/Transit/TransitNew";
|
||||||
import { TransitRewrap } from "./ui/pages/Secrets/Transit/TransitRewrap";
|
import { TransitRewrap } from "./ui/pages/Secrets/Transit/TransitRewrap";
|
||||||
import { PoliciesHome } from "./ui/pages/Policies/PoliciesHome";
|
import { TransitView } from "./ui/pages/Secrets/Transit/TransitView";
|
||||||
import { PolicyView } from "./ui/pages/Policies/PolicyView";
|
import { Unseal } from "./ui/pages/Unseal";
|
||||||
import { PolicyNew } from "./ui/pages/Policies/PolicyNew";
|
|
||||||
import { PolicyDelete } from "./ui/pages/Policies/PolicyDelete";
|
|
||||||
import { PolicyEdit } from "./ui/pages/Policies/PolicyEdit";
|
|
||||||
import { AuthHome } from "./ui/pages/Access/Auth/AuthHome";
|
|
||||||
import { AccessHomePage } from "./ui/pages/Access/AccessHome";
|
|
||||||
import { AuthViewConfig } from "./ui/pages/Access/Auth/AuthViewConfig";
|
|
||||||
import { UserPassUsersList } from "./ui/pages/Access/Auth/userpass/UserPassUsersList";
|
|
||||||
import { UserPassUserDelete } from "./ui/pages/Access/Auth/userpass/UserPassUserDelete";
|
import { UserPassUserDelete } from "./ui/pages/Access/Auth/userpass/UserPassUserDelete";
|
||||||
import { UserPassUserView } from "./ui/pages/Access/Auth/userpass/UserPassUserView";
|
|
||||||
import { UserPassUserNew } from "./ui/pages/Access/Auth/userpass/UserPassUserNew";
|
|
||||||
import { UserPassUserEdit } from "./ui/pages/Access/Auth/userpass/UserPassUserEdit";
|
import { UserPassUserEdit } from "./ui/pages/Access/Auth/userpass/UserPassUserEdit";
|
||||||
|
import { UserPassUserNew } from "./ui/pages/Access/Auth/userpass/UserPassUserNew";
|
||||||
|
import { UserPassUserView } from "./ui/pages/Access/Auth/userpass/UserPassUserView";
|
||||||
|
import { UserPassUsersList } from "./ui/pages/Access/Auth/userpass/UserPassUsersList";
|
||||||
|
|
||||||
export const Main = () => (
|
export const Main = () => (
|
||||||
<Router>
|
<Router>
|
||||||
|
|
|
@ -10,8 +10,7 @@ export type CopyableInputBoxProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export class CopyableInputBox extends Component<CopyableInputBoxProps, unknown> {
|
export class CopyableInputBox extends Component<CopyableInputBoxProps, unknown> {
|
||||||
copyIconRef = createRef();
|
copyIconRef = createRef<HTMLAnchorElement>();
|
||||||
inputBoxRef = createRef();
|
|
||||||
|
|
||||||
componentDidMount(): void {
|
componentDidMount(): void {
|
||||||
const clipboard = new ClipboardJS(this.copyIconRef.current);
|
const clipboard = new ClipboardJS(this.copyIconRef.current);
|
||||||
|
@ -32,13 +31,7 @@ export class CopyableInputBox extends Component<CopyableInputBoxProps, unknown>
|
||||||
aria-label={i18next.t("copy_input_box_copy_icon_text")}
|
aria-label={i18next.t("copy_input_box_copy_icon_text")}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<input
|
<input class="uk-input uk-input-copyable" type="text" value={this.props.text} readonly />
|
||||||
ref={this.inputBoxRef}
|
|
||||||
class="uk-input uk-input-copyable"
|
|
||||||
type="text"
|
|
||||||
value={this.props.text}
|
|
||||||
readonly
|
|
||||||
/>
|
|
||||||
</MarginInline>
|
</MarginInline>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -12,7 +12,7 @@ export type CopyableModalProps = {
|
||||||
|
|
||||||
export class CopyableModal extends Component<CopyableModalProps, unknown> {
|
export class CopyableModal extends Component<CopyableModalProps, unknown> {
|
||||||
ref = createRef();
|
ref = createRef();
|
||||||
copyButtonRef = createRef();
|
copyButtonRef = createRef<HTMLButtonElement>();
|
||||||
|
|
||||||
saveAsFile(): void {
|
saveAsFile(): void {
|
||||||
const blob = new Blob([this.props.contentString], {
|
const blob = new Blob([this.props.contentString], {
|
||||||
|
|
|
@ -6,7 +6,7 @@ export type FormProps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export class Form extends Component<FormProps, unknown> {
|
export class Form extends Component<FormProps, unknown> {
|
||||||
ref = createRef();
|
ref = createRef<HTMLFormElement>();
|
||||||
|
|
||||||
render(): JSX.Element {
|
render(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
/* eslint-disable import/no-unresolved */
|
/* eslint-disable import/no-unresolved */
|
||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import qrScannerWorkerSource from "!!raw-loader!qr-scanner/qr-scanner-worker.min.js";
|
import qrScannerWorkerSource from "!!raw-loader!qr-scanner/qr-scanner-worker.min.js";
|
||||||
QrScanner.WORKER_PATH = URL.createObjectURL(new Blob([qrScannerWorkerSource]));
|
QrScanner.WORKER_PATH = URL.createObjectURL(new Blob([qrScannerWorkerSource]));
|
||||||
// end ignore
|
// end ignore
|
||||||
|
/* eslint-enable */
|
||||||
|
|
||||||
import { Component, JSX, createRef } from "preact";
|
import { Component, JSX, createRef } from "preact";
|
||||||
import { Margin } from "./Margin";
|
import { Margin } from "./Margin";
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
import { Grid, GridSizes } from "../../elements/Grid";
|
import { Grid, GridSizes } from "../../elements/Grid";
|
||||||
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
import { Tile } from "../../elements/Tile";
|
import { Tile } from "../../elements/Tile";
|
||||||
import { notImplemented, prePageChecks } from "../../../pageUtils";
|
import { notImplemented, prePageChecks } from "../../../pageUtils";
|
||||||
import { Component } from "preact";
|
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class AccessHomePage extends Component<DefaultPageProps> {
|
export class AccessHomePage extends Component<DefaultPageProps> {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { AuthMethod } from "../../../../api/types/auth";
|
import { AuthMethod } from "../../../../api/types/auth";
|
||||||
import { Component, JSX } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
import { notImplemented } from "../../../../pageUtils";
|
|
||||||
import { objectToMap } from "../../../../utils";
|
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { PageTitle } from "../../../elements/PageTitle";
|
import { PageTitle } from "../../../elements/PageTitle";
|
||||||
import { route } from "preact-router";
|
|
||||||
import { authViewConfigURL, userPassUserListURL } from "../../pageLinks";
|
import { authViewConfigURL, userPassUserListURL } from "../../pageLinks";
|
||||||
|
import { notImplemented } from "../../../../pageUtils";
|
||||||
|
import { objectToMap } from "../../../../utils";
|
||||||
|
import { route } from "preact-router";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export type AuthListElementProps = {
|
export type AuthListElementProps = {
|
||||||
path: string;
|
path: string;
|
||||||
|
@ -49,7 +49,7 @@ export function AuthListElement(props: AuthListElementProps): JSX.Element {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AuthHome extends Component<DefaultPageProps, { authList: Map<String, AuthMethod> }> {
|
export class AuthHome extends Component<DefaultPageProps, { authList: Map<string, AuthMethod> }> {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
const authList = objectToMap(await this.props.api.listAuth()) as Map<string, AuthMethod>;
|
const authList = objectToMap(await this.props.api.listAuth()) as Map<string, AuthMethod>;
|
||||||
this.setState({ authList });
|
this.setState({ authList });
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { AuthMethod } from "../../../../api/types/auth";
|
import { AuthMethod } from "../../../../api/types/auth";
|
||||||
import { HeaderAndContent } from "../../../elements/HeaderAndContent";
|
|
||||||
import { objectToMap, toStr } from "../../../../utils";
|
|
||||||
import { Component } from "preact";
|
import { Component } from "preact";
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
|
import { HeaderAndContent } from "../../../elements/HeaderAndContent";
|
||||||
import { PageTitle } from "../../../elements/PageTitle";
|
import { PageTitle } from "../../../elements/PageTitle";
|
||||||
|
import { objectToMap, toStr } from "../../../../utils";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class AuthViewConfig extends Component<DefaultPageProps, { authMethod: AuthMethod }> {
|
export class AuthViewConfig extends Component<DefaultPageProps, { authMethod: AuthMethod }> {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Component } from "preact";
|
import { Component } from "preact";
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
||||||
import { PageTitle } from "../../../../elements/PageTitle";
|
import { PageTitle } from "../../../../elements/PageTitle";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { userPassUserListURL } from "../../../pageLinks";
|
import { userPassUserListURL } from "../../../pageLinks";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class UserPassUserDelete extends Component<DefaultPageProps> {
|
export class UserPassUserDelete extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../../elements/Form";
|
import { Form } from "../../../../elements/Form";
|
||||||
import { InputWithTitle } from "../../../../elements/InputWithTitle";
|
import { InputWithTitle } from "../../../../elements/InputWithTitle";
|
||||||
import { Margin } from "../../../../elements/Margin";
|
import { Margin } from "../../../../elements/Margin";
|
||||||
import { MarginInline } from "../../../../elements/MarginInline";
|
import { MarginInline } from "../../../../elements/MarginInline";
|
||||||
|
import { PageTitle } from "../../../../elements/PageTitle";
|
||||||
import { UserType } from "../../../../../api/types/user";
|
import { UserType } from "../../../../../api/types/user";
|
||||||
import { Component } from "preact";
|
import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../../../../pageUtils";
|
import { setErrorText } from "../../../../../pageUtils";
|
||||||
import { toStr } from "../../../../../utils";
|
import { toStr } from "../../../../../utils";
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
|
||||||
import { PageTitle } from "../../../../elements/PageTitle";
|
|
||||||
import { route } from "preact-router";
|
|
||||||
import { userPassUserViewURL } from "../../../pageLinks";
|
import { userPassUserViewURL } from "../../../pageLinks";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
const removeEmptyStrings = (arr: string[]) => arr.filter((e) => e.length > 0);
|
const removeEmptyStrings = (arr: string[]) => arr.filter((e) => e.length > 0);
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../../elements/Form";
|
import { Form } from "../../../../elements/Form";
|
||||||
import { Margin } from "../../../../elements/Margin";
|
import { Margin } from "../../../../elements/Margin";
|
||||||
import { MarginInline } from "../../../../elements/MarginInline";
|
import { MarginInline } from "../../../../elements/MarginInline";
|
||||||
import { UserType } from "../../../../../api/types/user";
|
|
||||||
import { Component } from "preact";
|
|
||||||
import { setErrorText } from "../../../../../pageUtils";
|
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
|
||||||
import { PageTitle } from "../../../../elements/PageTitle";
|
import { PageTitle } from "../../../../elements/PageTitle";
|
||||||
|
import { UserType } from "../../../../../api/types/user";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
|
import { setErrorText } from "../../../../../pageUtils";
|
||||||
import { userPassUserViewURL } from "../../../pageLinks";
|
import { userPassUserViewURL } from "../../../pageLinks";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class UserPassUserNew extends Component<DefaultPageProps> {
|
export class UserPassUserNew extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
||||||
import { HeaderAndContent } from "../../../../elements/HeaderAndContent";
|
import { HeaderAndContent } from "../../../../elements/HeaderAndContent";
|
||||||
import { Margin } from "../../../../elements/Margin";
|
import { Margin } from "../../../../elements/Margin";
|
||||||
import { Component } from "preact";
|
|
||||||
import { toStr } from "../../../../../utils";
|
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
|
||||||
import { UserType } from "../../../../../api/types/user";
|
|
||||||
import { PageTitle } from "../../../../elements/PageTitle";
|
import { PageTitle } from "../../../../elements/PageTitle";
|
||||||
|
import { UserType } from "../../../../../api/types/user";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
|
import { toStr } from "../../../../../utils";
|
||||||
import { userPassUserDeleteURL, userPassUserEditURL } from "../../../pageLinks";
|
import { userPassUserDeleteURL, userPassUserEditURL } from "../../../pageLinks";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class UserPassUserView extends Component<DefaultPageProps, { user_data: UserType }> {
|
export class UserPassUserView extends Component<DefaultPageProps, { user_data: UserType }> {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Component } from "preact";
|
import { Component } from "preact";
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../../types/DefaultPageProps";
|
||||||
|
import { PageTitle } from "../../../../elements/PageTitle";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { userPassUserNewURL, userPassUserViewURL } from "../../../pageLinks";
|
import { userPassUserNewURL, userPassUserViewURL } from "../../../pageLinks";
|
||||||
import { PageTitle } from "../../../../elements/PageTitle";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class UserPassUsersList extends Component<DefaultPageProps, { users: string[] }> {
|
export class UserPassUsersList extends Component<DefaultPageProps, { users: string[] }> {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, JSX, render } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
||||||
import { Grid, GridSizes } from "../elements/Grid";
|
import { Grid, GridSizes } from "../elements/Grid";
|
||||||
import { Margin } from "../elements/Margin";
|
import { Margin } from "../elements/Margin";
|
||||||
import { PageTitle } from "../elements/PageTitle";
|
import { PageTitle } from "../elements/PageTitle";
|
||||||
|
@ -7,7 +8,6 @@ import { TokenInfo } from "../../api/types/token";
|
||||||
import { prePageChecks, setErrorText } from "../../pageUtils";
|
import { prePageChecks, setErrorText } from "../../pageUtils";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
type HomeState = {
|
type HomeState = {
|
||||||
selfTokenInfo: TokenInfo;
|
selfTokenInfo: TokenInfo;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, JSX, render } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
||||||
import { Form } from "../elements/Form";
|
import { Form } from "../elements/Form";
|
||||||
import { Margin } from "../elements/Margin";
|
import { Margin } from "../elements/Margin";
|
||||||
|
|
|
@ -7,7 +7,7 @@ import ClipboardJS from "clipboard";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class CopyLink extends Component<{ text: string; data: string }, unknown> {
|
export class CopyLink extends Component<{ text: string; data: string }, unknown> {
|
||||||
linkRef = createRef();
|
linkRef = createRef<HTMLAnchorElement>();
|
||||||
|
|
||||||
componentDidMount(): void {
|
componentDidMount(): void {
|
||||||
const clipboard = new ClipboardJS(this.linkRef.current);
|
const clipboard = new ClipboardJS(this.linkRef.current);
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { Margin } from "../../elements/Margin";
|
|
||||||
import { prePageChecks } from "../../../pageUtils";
|
|
||||||
import { Component } from "preact";
|
import { Component } from "preact";
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
|
import { Margin } from "../../elements/Margin";
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
import { route } from "preact-router";
|
|
||||||
import { policyNewURL, policyViewURL } from "../pageLinks";
|
import { policyNewURL, policyViewURL } from "../pageLinks";
|
||||||
|
import { prePageChecks } from "../../../pageUtils";
|
||||||
|
import { route } from "preact-router";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class PoliciesHome extends Component<DefaultPageProps, { policies: string[] }> {
|
export class PoliciesHome extends Component<DefaultPageProps, { policies: string[] }> {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Component } from "preact";
|
import { Component } from "preact";
|
||||||
import { setErrorText } from "../../../pageUtils";
|
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
|
import { setErrorText } from "../../../pageUtils";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class PolicyDelete extends Component<DefaultPageProps> {
|
export class PolicyDelete extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import { CodeEditor } from "../../elements/CodeEditor";
|
import { CodeEditor } from "../../elements/CodeEditor";
|
||||||
import { Component, JSX, render } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
import { Margin } from "../../elements/Margin";
|
import { Margin } from "../../elements/Margin";
|
||||||
import { MarginInline } from "../../elements/MarginInline";
|
import { MarginInline } from "../../elements/MarginInline";
|
||||||
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
|
import { policyViewURL } from "../pageLinks";
|
||||||
|
import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../../pageUtils";
|
import { setErrorText } from "../../../pageUtils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
|
||||||
import { route } from "preact-router";
|
|
||||||
import { policyViewURL } from "../pageLinks";
|
|
||||||
|
|
||||||
type PolicyEditorProps = DefaultPageProps & {
|
type PolicyEditorProps = DefaultPageProps & {
|
||||||
policyName: string;
|
policyName: string;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../elements/Form";
|
import { Form } from "../../elements/Form";
|
||||||
import { Margin } from "../../elements/Margin";
|
import { Margin } from "../../elements/Margin";
|
||||||
import { Component } from "preact";
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
|
import { policyViewURL } from "../pageLinks";
|
||||||
|
import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../../pageUtils";
|
import { setErrorText } from "../../../pageUtils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
|
||||||
import { route } from "preact-router";
|
|
||||||
import { policyViewURL } from "../pageLinks";
|
|
||||||
|
|
||||||
export class PolicyNew extends Component<DefaultPageProps> {
|
export class PolicyNew extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { CodeBlock } from "../../elements/CodeBlock";
|
import { CodeBlock } from "../../elements/CodeBlock";
|
||||||
import { Margin } from "../../elements/Margin";
|
|
||||||
import { prePageChecks } from "../../../pageUtils";
|
|
||||||
import { Component } from "preact";
|
import { Component } from "preact";
|
||||||
import i18next from "i18next";
|
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
|
import { Margin } from "../../elements/Margin";
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
import { route } from "preact-router";
|
|
||||||
import { policyDeleteURL, policyEditURL } from "../pageLinks";
|
import { policyDeleteURL, policyEditURL } from "../pageLinks";
|
||||||
|
import { prePageChecks } from "../../../pageUtils";
|
||||||
|
import { route } from "preact-router";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class PolicyView extends Component<
|
export class PolicyView extends Component<
|
||||||
DefaultPageProps,
|
DefaultPageProps,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Component, JSX, createRef, render } from "preact";
|
import { Component, JSX, createRef } from "preact";
|
||||||
import { CopyableInputBox } from "../elements/CopyableInputBox";
|
import { CopyableInputBox } from "../elements/CopyableInputBox";
|
||||||
|
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
||||||
import { Form } from "../elements/Form";
|
import { Form } from "../elements/Form";
|
||||||
import { Margin } from "../elements/Margin";
|
import { Margin } from "../elements/Margin";
|
||||||
import { PageTitle } from "../elements/PageTitle";
|
import { PageTitle } from "../elements/PageTitle";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
const passwordLengthMin = 1;
|
const passwordLengthMin = 1;
|
||||||
const passwordLengthMax = 64;
|
const passwordLengthMax = 64;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../elements/Form";
|
import { Form } from "../../elements/Form";
|
||||||
import { MarginInline } from "../../elements/MarginInline";
|
import { MarginInline } from "../../elements/MarginInline";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
|
@ -43,7 +43,7 @@ export class KVEditor extends Component<KVEditProps, KVEditState> {
|
||||||
this.props.baseMount,
|
this.props.baseMount,
|
||||||
this.props.secretPath.map((e) => e + "/"),
|
this.props.secretPath.map((e) => e + "/"),
|
||||||
this.props.secretItem,
|
this.props.secretItem,
|
||||||
JSON.parse(editorContent),
|
JSON.parse(editorContent) as unknown as Record<string, unknown>,
|
||||||
);
|
);
|
||||||
window.history.back();
|
window.history.back();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, JSX, createRef, render } from "preact";
|
import { Component, JSX, createRef } from "preact";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { DoesNotExistError } from "../../../../types/internalErrors";
|
import { DoesNotExistError } from "../../../../types/internalErrors";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { CodeBlock } from "../../../elements/CodeBlock";
|
import { CodeBlock } from "../../../elements/CodeBlock";
|
||||||
import { Component, JSX, render } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
import { CopyableInputBox } from "../../../elements/CopyableInputBox";
|
import { CopyableInputBox } from "../../../elements/CopyableInputBox";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Grid, GridSizes } from "../../../elements/Grid";
|
import { Grid, GridSizes } from "../../../elements/Grid";
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
import { MarginInline } from "../../../elements/MarginInline";
|
import { MarginInline } from "../../../elements/MarginInline";
|
||||||
|
@ -7,7 +8,6 @@ import { kvListURL } from "../../pageLinks";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../../../pageUtils";
|
import { setErrorText } from "../../../../pageUtils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
export class NewKVEngine extends Component<DefaultPageProps> {
|
export class NewKVEngine extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
import { MarginInline } from "../../../elements/MarginInline";
|
import { MarginInline } from "../../../elements/MarginInline";
|
||||||
|
@ -7,7 +8,6 @@ import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../../../pageUtils";
|
import { setErrorText } from "../../../../pageUtils";
|
||||||
import { totpListURL } from "../../pageLinks";
|
import { totpListURL } from "../../pageLinks";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
export class NewTOTPEngine extends Component<DefaultPageProps> {
|
export class NewTOTPEngine extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
import { MarginInline } from "../../../elements/MarginInline";
|
import { MarginInline } from "../../../elements/MarginInline";
|
||||||
|
@ -6,7 +7,6 @@ import { PageTitle } from "../../../elements/PageTitle";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../../../pageUtils";
|
import { setErrorText } from "../../../../pageUtils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
export class NewTransitEngine extends Component<DefaultPageProps> {
|
export class NewTransitEngine extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
import { Grid, GridSizes } from "../../elements/Grid";
|
import { Grid, GridSizes } from "../../elements/Grid";
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
import { Tile } from "../../elements/Tile";
|
import { Tile } from "../../elements/Tile";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
export class NewSecretsEngine extends Component<DefaultPageProps> {
|
export class NewSecretsEngine extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { Component, JSX, render } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../types/DefaultPageProps";
|
||||||
|
import { MountType } from "../../../api/types/mount";
|
||||||
import { PageTitle } from "../../elements/PageTitle";
|
import { PageTitle } from "../../elements/PageTitle";
|
||||||
import { prePageChecks } from "../../../pageUtils";
|
import { prePageChecks } from "../../../pageUtils";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { sortedObjectMap } from "../../../utils";
|
import { sortedObjectMap } from "../../../utils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { MountType } from "../../../api/types/mount";
|
|
||||||
|
|
||||||
const supportedMountTypes = ["kv", "totp", "transit", "cubbyhole"];
|
const supportedMountTypes = ["kv", "totp", "transit", "cubbyhole"];
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { CapabilitiesType } from "../../../../api/types/capabilities";
|
||||||
import { Component, JSX } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
import { CopyableInputBox } from "../../../elements/CopyableInputBox";
|
import { CopyableInputBox } from "../../../elements/CopyableInputBox";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
|
@ -10,7 +11,6 @@ import { removeDoubleSlash } from "../../../../utils";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../../../pageUtils";
|
import { setErrorText } from "../../../../pageUtils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { CapabilitiesType } from "../../../../api/types/capabilities";
|
|
||||||
|
|
||||||
type TOTPGridItemProps = DefaultPageProps & {
|
type TOTPGridItemProps = DefaultPageProps & {
|
||||||
baseMount: string;
|
baseMount: string;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, JSX, createRef, render } from "preact";
|
import { Component, JSX, createRef } from "preact";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
|
import { Component, render } from "preact";
|
||||||
import { CopyableModal } from "../../../elements/CopyableModal";
|
import { CopyableModal } from "../../../elements/CopyableModal";
|
||||||
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { FileUploadInput } from "../../../elements/FileUploadInput";
|
import { FileUploadInput } from "../../../elements/FileUploadInput";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { InputWithTitle } from "../../../elements/InputWithTitle";
|
import { InputWithTitle } from "../../../elements/InputWithTitle";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
import { fileToBase64 } from "../../../../htmlUtils";
|
import { fileToBase64 } from "../../../../htmlUtils";
|
||||||
import { Component, render } from "preact";
|
|
||||||
import { setErrorText } from "../../../../pageUtils";
|
import { setErrorText } from "../../../../pageUtils";
|
||||||
import UIkit from "uikit";
|
import UIkit from "uikit";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
export class TransitDecrypt extends Component<DefaultPageProps> {
|
export class TransitDecrypt extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
|
import { Component, render } from "preact";
|
||||||
import { CopyableModal } from "../../../elements/CopyableModal";
|
import { CopyableModal } from "../../../elements/CopyableModal";
|
||||||
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { FileUploadInput } from "../../../elements/FileUploadInput";
|
import { FileUploadInput } from "../../../elements/FileUploadInput";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { InputWithTitle } from "../../../elements/InputWithTitle";
|
import { InputWithTitle } from "../../../elements/InputWithTitle";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
import { fileToBase64 } from "../../../../htmlUtils";
|
import { fileToBase64 } from "../../../../htmlUtils";
|
||||||
import { Component, render } from "preact";
|
|
||||||
import { setErrorText } from "../../../../pageUtils";
|
import { setErrorText } from "../../../../pageUtils";
|
||||||
import UIkit from "uikit";
|
import UIkit from "uikit";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
|
||||||
|
|
||||||
export class TransitEncrypt extends Component<DefaultPageProps> {
|
export class TransitEncrypt extends Component<DefaultPageProps> {
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import { CapabilitiesType } from "../../../../api/types/capabilities";
|
||||||
import { Component, JSX } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
import { delSecretsEngineURL, transitNewSecretURL, transitViewSecretURL } from "../../pageLinks";
|
import { delSecretsEngineURL, transitNewSecretURL, transitViewSecretURL } from "../../pageLinks";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { CapabilitiesType } from "../../../../api/types/capabilities";
|
|
||||||
|
|
||||||
type TransitViewListState = {
|
type TransitViewListState = {
|
||||||
contentLoaded: boolean;
|
contentLoaded: boolean;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
|
import { Component, render } from "preact";
|
||||||
import { CopyableModal } from "../../../elements/CopyableModal";
|
import { CopyableModal } from "../../../elements/CopyableModal";
|
||||||
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Form } from "../../../elements/Form";
|
import { Form } from "../../../elements/Form";
|
||||||
import { Margin } from "../../../elements/Margin";
|
import { Margin } from "../../../elements/Margin";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
|
import { TransitKeyType } from "../../../../api/types/transit";
|
||||||
import { objectToMap } from "../../../../utils";
|
import { objectToMap } from "../../../../utils";
|
||||||
import { Component, render } from "preact";
|
|
||||||
import { setErrorText } from "../../../../pageUtils";
|
import { setErrorText } from "../../../../pageUtils";
|
||||||
import UIkit from "uikit";
|
import UIkit from "uikit";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
|
||||||
import { TransitKeyType } from "../../../../api/types/transit";
|
|
||||||
|
|
||||||
type versionOption = { version: string; label: string };
|
type versionOption = { version: string; label: string };
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import { Component, render } from "preact";
|
import { Component } from "preact";
|
||||||
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
import { DefaultPageProps } from "../../../../types/DefaultPageProps";
|
||||||
import { Grid, GridSizes } from "../../../elements/Grid";
|
import { Grid, GridSizes } from "../../../elements/Grid";
|
||||||
import { SecretTitleElement } from "../SecretTitleElement";
|
import { SecretTitleElement } from "../SecretTitleElement";
|
||||||
import { Tile } from "../../../elements/Tile";
|
import { Tile } from "../../../elements/Tile";
|
||||||
import { TransitKeyType } from "../../../../api/types/transit";
|
import { TransitKeyType } from "../../../../api/types/transit";
|
||||||
import i18next from "i18next";
|
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import {
|
import {
|
||||||
transitDecryptSecretURL,
|
transitDecryptSecretURL,
|
||||||
transitEncryptSecretURL,
|
transitEncryptSecretURL,
|
||||||
transitRewrapSecretURL,
|
transitRewrapSecretURL,
|
||||||
} from "../../pageLinks";
|
} from "../../pageLinks";
|
||||||
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class TransitView extends Component<DefaultPageProps, { transitKey: TransitKeyType }> {
|
export class TransitView extends Component<DefaultPageProps, { transitKey: TransitKeyType }> {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import translations from "../../translations/index.mjs";
|
||||||
// ts-unignore
|
// ts-unignore
|
||||||
|
|
||||||
import { Component } from "preact";
|
import { Component } from "preact";
|
||||||
import { DefaultPageProps } from "../../types/DefaultPageProps.js";
|
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
||||||
import { Form } from "../elements/Form";
|
import { Form } from "../elements/Form";
|
||||||
import { Margin } from "../elements/Margin";
|
import { Margin } from "../elements/Margin";
|
||||||
import { MarginInline } from "../elements/MarginInline";
|
import { MarginInline } from "../elements/MarginInline";
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Component, JSX, render } from "preact";
|
import { Component, JSX } from "preact";
|
||||||
|
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
||||||
import { Form } from "../elements/Form";
|
import { Form } from "../elements/Form";
|
||||||
import { MarginInline } from "../elements/MarginInline";
|
import { MarginInline } from "../elements/MarginInline";
|
||||||
import { QRScanner } from "../elements/QRScanner";
|
|
||||||
import { DefaultPageProps } from "../../types/DefaultPageProps";
|
|
||||||
import { PageTitle } from "../elements/PageTitle";
|
import { PageTitle } from "../elements/PageTitle";
|
||||||
|
import { QRScanner } from "../elements/QRScanner";
|
||||||
import { route } from "preact-router";
|
import { route } from "preact-router";
|
||||||
import { setErrorText } from "../../pageUtils";
|
import { setErrorText } from "../../pageUtils";
|
||||||
import { toStr } from "../../utils";
|
import { toStr } from "../../utils";
|
||||||
|
|
|
@ -12,4 +12,4 @@
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"jsxImportSource": "preact",
|
"jsxImportSource": "preact",
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue