1
0
Fork 0

Move some files around.

This commit is contained in:
ChaotiCryptidz - 2021-11-21 11:06:10 +00:00
parent 0239a619e7
commit 5d98b64730
59 changed files with 206 additions and 206 deletions

View file

@ -1,47 +1,47 @@
import { PageType } from "./pagerouter/PageType"; import { PageType } from "./pagerouter/PageType";
import { AccessHomePage } from "./pages/Access/AccessHome"; import { AccessHomePage } from "./ui/pages/Access/AccessHome";
import { AuthHomePage } from "./pages/Access/Auth/AuthHome"; import { AuthHomePage } from "./ui/pages/Access/Auth/AuthHome";
import { AuthViewConfigPage } from "./pages/Access/Auth/AuthViewConfig"; import { AuthViewConfigPage } from "./ui/pages/Access/Auth/AuthViewConfig";
import { DeleteSecretsEnginePage } from "./pages/Secrets/DeleteSecretsEngine"; import { DeleteSecretsEnginePage } from "./ui/pages/Secrets/DeleteSecretsEngine";
import { HomePage } from "./pages/Home"; import { HomePage } from "./ui/pages/Home";
import { KeyValueDeletePage } from "./pages/Secrets/KeyValue/KeyValueDelete"; import { KeyValueDeletePage } from "./ui/pages/Secrets/KeyValue/KeyValueDelete";
import { KeyValueNewPage } from "./pages/Secrets/KeyValue/KeyValueNew"; import { KeyValueNewPage } from "./ui/pages/Secrets/KeyValue/KeyValueNew";
import { KeyValueSecretEditPage } from "./pages/Secrets/KeyValue/KeyValueSecretsEdit"; import { KeyValueSecretEditPage } from "./ui/pages/Secrets/KeyValue/KeyValueSecretsEdit";
import { KeyValueSecretPage } from "./pages/Secrets/KeyValue/KeyValueSecret"; import { KeyValueSecretPage } from "./ui/pages/Secrets/KeyValue/KeyValueSecret";
import { KeyValueVersionsPage } from "./pages/Secrets/KeyValue/KeyValueVersions"; import { KeyValueVersionsPage } from "./ui/pages/Secrets/KeyValue/KeyValueVersions";
import { KeyValueViewPage } from "./pages/Secrets/KeyValue/KeyValueView"; import { KeyValueViewPage } from "./ui/pages/Secrets/KeyValue/KeyValueView";
import { LoginPage } from "./pages/Login"; import { LoginPage } from "./ui/pages/Login";
import { MePage } from "./pages/Me"; import { MePage } from "./ui/pages/Me";
import { NewKVEnginePage } from "./pages/Secrets/NewEngines/NewKVEngine"; import { NewKVEnginePage } from "./ui/pages/Secrets/NewEngines/NewKVEngine";
import { NewSecretsEnginePage } from "./pages/Secrets/NewSecretsEngine"; import { NewSecretsEnginePage } from "./ui/pages/Secrets/NewSecretsEngine";
import { NewTOTPEnginePage } from "./pages/Secrets/NewEngines/NewTOTPEngine"; import { NewTOTPEnginePage } from "./ui/pages/Secrets/NewEngines/NewTOTPEngine";
import { NewTransitEnginePage } from "./pages/Secrets/NewEngines/NewTransitEngine"; import { NewTransitEnginePage } from "./ui/pages/Secrets/NewEngines/NewTransitEngine";
import { NewTransitKeyPage } from "./pages/Secrets/Transit/NewTransitKey"; import { NewTransitKeyPage } from "./ui/pages/Secrets/Transit/NewTransitKey";
import { Page } from "./types/Page"; import { Page } from "./types/Page";
import { PoliciesHomePage } from "./pages/Policies/PoliciesHome"; import { PoliciesHomePage } from "./ui/pages/Policies/PoliciesHome";
import { PolicyDeletePage } from "./pages/Policies/PolicyDelete"; import { PolicyDeletePage } from "./ui/pages/Policies/PolicyDelete";
import { PolicyEditPage } from "./pages/Policies/PolicyEdit"; import { PolicyEditPage } from "./ui/pages/Policies/PolicyEdit";
import { PolicyNewPage } from "./pages/Policies/PolicyNew"; import { PolicyNewPage } from "./ui/pages/Policies/PolicyNew";
import { PolicyViewPage } from "./pages/Policies/PolicyView"; import { PolicyViewPage } from "./ui/pages/Policies/PolicyView";
import { PwGenPage } from "./pages/PwGen"; import { PwGenPage } from "./ui/pages/PwGen";
import { SecretsHomePage } from "./pages/Secrets/SecretsHome"; import { SecretsHomePage } from "./ui/pages/Secrets/SecretsHome";
import { SetLanguagePage } from "./pages/SetLanguage"; import { SetLanguagePage } from "./ui/pages/SetLanguage";
import { SetVaultURLPage } from "./pages/SetVaultURL"; import { SetVaultURLPage } from "./ui/pages/SetVaultURL";
import { TOTPDeletePage } from "./pages/Secrets/TOTP/TOTPDelete"; import { TOTPDeletePage } from "./ui/pages/Secrets/TOTP/TOTPDelete";
import { TOTPNewPage } from "./pages/Secrets/TOTP/TOTPNew"; import { TOTPNewPage } from "./ui/pages/Secrets/TOTP/TOTPNew";
import { TOTPViewPage } from "./pages/Secrets/TOTP/TOTPView"; import { TOTPViewPage } from "./ui/pages/Secrets/TOTP/TOTPView";
import { TransitDecryptPage } from "./pages/Secrets/Transit/TransitDecrypt"; import { TransitDecryptPage } from "./ui/pages/Secrets/Transit/TransitDecrypt";
import { TransitEncryptPage } from "./pages/Secrets/Transit/TransitEncrypt"; import { TransitEncryptPage } from "./ui/pages/Secrets/Transit/TransitEncrypt";
import { TransitRewrapPage } from "./pages/Secrets/Transit/TransitRewrap"; import { TransitRewrapPage } from "./ui/pages/Secrets/Transit/TransitRewrap";
import { TransitViewPage } from "./pages/Secrets/Transit/TransitView"; import { TransitViewPage } from "./ui/pages/Secrets/Transit/TransitView";
import { TransitViewSecretPage } from "./pages/Secrets/Transit/TransitViewSecret"; import { TransitViewSecretPage } from "./ui/pages/Secrets/Transit/TransitViewSecret";
import { UnsealPage } from "./pages/Unseal"; import { UnsealPage } from "./ui/pages/Unseal";
import { UserPassUserDeletePage } from "./pages/Access/Auth/userpass/UserPassUserDelete"; import { UserPassUserDeletePage } from "./ui/pages/Access/Auth/userpass/UserPassUserDelete";
import { UserPassUserEditPage } from "./pages/Access/Auth/userpass/UserPassUserEdit"; import { UserPassUserEditPage } from "./ui/pages/Access/Auth/userpass/UserPassUserEdit";
import { UserPassUserNewPage } from "./pages/Access/Auth/userpass/UserPassUserNew"; import { UserPassUserNewPage } from "./ui/pages/Access/Auth/userpass/UserPassUserNew";
import { UserPassUserViewPage } from "./pages/Access/Auth/userpass/UserPassUserView"; import { UserPassUserViewPage } from "./ui/pages/Access/Auth/userpass/UserPassUserView";
import { UserPassUsersListPage } from "./pages/Access/Auth/userpass/UserPassUsersList"; import { UserPassUsersListPage } from "./ui/pages/Access/Auth/userpass/UserPassUsersList";
import { getObjectKeys } from "./utils"; import { getObjectKeys } from "./utils";
type pagesList = { type pagesList = {

View file

@ -28,7 +28,7 @@ import { getSealStatus } from "./api/sys/getSealStatus";
import { pageList } from "./allPages"; import { pageList } from "./allPages";
import { pageState } from "./globalPageState"; import { pageState } from "./globalPageState";
import { playground } from "./playground"; import { playground } from "./playground";
import { reloadNavBar } from "./elements/NavBar"; import { reloadNavBar } from "./ui/elements/NavBar";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -53,10 +53,10 @@ export class PageState {
} }
get baseMount(): string { get baseMount(): string {
return this.storage.getItem("baseMount") || ""; return sessionStorage.getItem("baseMount") || "";
} }
set baseMount(value: string) { set baseMount(value: string) {
this.storage.setItem("baseMount", value); sessionStorage.setItem("baseMount", value);
} }
// Since this is a array we can't act directly on it so we need // Since this is a array we can't act directly on it so we need
@ -74,60 +74,60 @@ export class PageState {
} }
get secretPath(): string[] { get secretPath(): string[] {
return JSON.parse(this.storage.getItem("secretPath") || "[]") as string[]; return JSON.parse(sessionStorage.getItem("secretPath") || "[]") as string[];
} }
set secretPath(value: string[]) { set secretPath(value: string[]) {
this.storage.setItem("secretPath", JSON.stringify(value)); sessionStorage.setItem("secretPath", JSON.stringify(value));
} }
get secretVersion(): string | null { get secretVersion(): string | null {
const result = this.storage.getItem("secretVersion"); const result = sessionStorage.getItem("secretVersion");
return result != "null" ? result || null : null; return result != "null" ? result || null : null;
} }
set secretVersion(value: string) { set secretVersion(value: string) {
this.storage.setItem("secretVersion", String(value)); sessionStorage.setItem("secretVersion", String(value));
} }
get secretItem(): string { get secretItem(): string {
return this.storage.getItem("secretItem") || ""; return sessionStorage.getItem("secretItem") || "";
} }
set secretItem(value: string) { set secretItem(value: string) {
this.storage.setItem("secretItem", value); sessionStorage.setItem("secretItem", value);
} }
get secretMountType(): string { get secretMountType(): string {
return this.storage.getItem("secretMountType") || ""; return sessionStorage.getItem("secretMountType") || "";
} }
set secretMountType(value: string) { set secretMountType(value: string) {
this.storage.setItem("secretMountType", value); sessionStorage.setItem("secretMountType", value);
} }
get policyItem(): string { get policyItem(): string {
return this.storage.getItem("policyItem") || ""; return sessionStorage.getItem("policyItem") || "";
} }
set policyItem(value: string) { set policyItem(value: string) {
this.storage.setItem("policyItem", value); sessionStorage.setItem("policyItem", value);
} }
get authPath(): string { get authPath(): string {
return this.storage.getItem("authPath") || ""; return sessionStorage.getItem("authPath") || "";
} }
set authPath(value: string) { set authPath(value: string) {
this.storage.setItem("authPath", value); sessionStorage.setItem("authPath", value);
} }
get userPassUser(): string { get userPassUser(): string {
return this.storage.getItem("userPassUser") || ""; return sessionStorage.getItem("userPassUser") || "";
} }
set userPassUser(value: string) { set userPassUser(value: string) {
this.storage.setItem("userPassUser", value); sessionStorage.setItem("userPassUser", value);
} }
get currentPage(): string { get currentPage(): string {
const curPage = this.storage.getItem("currentPage") || "HOME"; const curPage = sessionStorage.getItem("currentPage") || "HOME";
return curPage; return curPage;
} }
set currentPage(value: string) { set currentPage(value: string) {
this.storage.setItem("currentPage", value); sessionStorage.setItem("currentPage", value);
} }
} }

View file

@ -1,6 +1,6 @@
import { Component, JSX, createRef } from "preact"; import { Component, JSX, createRef } from "preact";
import { MarginInline } from "./MarginInline"; import { MarginInline } from "./MarginInline";
import { addClipboardNotifications } from "../pageUtils"; import { addClipboardNotifications } from "../../pageUtils";
import ClipboardJS from "clipboard"; import ClipboardJS from "clipboard";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,5 +1,5 @@
import { Component, JSX, createRef } from "preact"; import { Component, JSX, createRef } from "preact";
import { addClipboardNotifications } from "../pageUtils"; import { addClipboardNotifications } from "../../pageUtils";
import ClipboardJS from "clipboard"; import ClipboardJS from "clipboard";
import FileSaver from "file-saver"; import FileSaver from "file-saver";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,5 +1,5 @@
import { JSX, render } from "preact"; import { JSX, render } from "preact";
import { PageRouter } from "../pagerouter/PageRouter"; import { PageRouter } from "../../pagerouter/PageRouter";
import i18next from "i18next"; import i18next from "i18next";
export type NavBarProps = { export type NavBarProps = {

View file

@ -1,7 +1,7 @@
import { Grid, GridSizes } from "../../elements/Grid"; import { Grid, GridSizes } from "../../elements/Grid";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { Tile } from "../../elements/Tile"; import { Tile } from "../../elements/Tile";
import { notImplemented, prePageChecks } from "../../pageUtils"; import { notImplemented, prePageChecks } from "../../../pageUtils";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,9 +1,9 @@
import { AuthMethod } from "../../../api/types/auth"; import { AuthMethod } from "../../../../api/types/auth";
import { JSX, render } from "preact"; import { JSX, render } from "preact";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { listAuth } from "../../../api/auth/listAuth"; import { listAuth } from "../../../../api/auth/listAuth";
import { notImplemented } from "../../../pageUtils"; import { notImplemented } from "../../../../pageUtils";
import { objectToMap } from "../../../utils"; import { objectToMap } from "../../../../utils";
import i18next from "i18next"; import i18next from "i18next";
export type AuthListElementProps = { export type AuthListElementProps = {

View file

@ -1,8 +1,8 @@
import { AuthMethod } from "../../../api/types/auth"; import { AuthMethod } from "../../../../api/types/auth";
import { HeaderAndContent } from "../../../elements/HeaderAndContent"; import { HeaderAndContent } from "../../../elements/HeaderAndContent";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { listAuth } from "../../../api/auth/listAuth"; import { listAuth } from "../../../../api/auth/listAuth";
import { objectToMap, toStr } from "../../../utils"; import { objectToMap, toStr } from "../../../../utils";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,5 +1,5 @@
import { Page } from "../../../../types/Page"; import { Page } from "../../../../../types/Page";
import { deleteUserPassUser } from "../../../../api/auth/userpass/deleteUserPassUser"; import { deleteUserPassUser } from "../../../../../api/auth/userpass/deleteUserPassUser";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -2,13 +2,13 @@ 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 { Page } from "../../../../types/Page"; import { Page } from "../../../../../types/Page";
import { UserType } from "../../../../api/types/userpass/user"; import { UserType } from "../../../../../api/types/userpass/user";
import { createOrUpdateUserPassUser } from "../../../../api/auth/userpass/createOrUpdateUserPassUser"; import { createOrUpdateUserPassUser } from "../../../../../api/auth/userpass/createOrUpdateUserPassUser";
import { getUserPassUser } from "../../../../api/auth/userpass/getUserPassUser"; import { getUserPassUser } from "../../../../../api/auth/userpass/getUserPassUser";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../../pageUtils"; import { setErrorText } from "../../../../../pageUtils";
import { toStr } from "../../../../utils"; import { toStr } from "../../../../../utils";
import i18next from "i18next"; import i18next from "i18next";
const removeEmptyStrings = (arr: string[]) => arr.filter((e) => e.length > 0); const removeEmptyStrings = (arr: string[]) => arr.filter((e) => e.length > 0);

View file

@ -1,11 +1,11 @@
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 { Page } from "../../../../types/Page"; import { Page } from "../../../../../types/Page";
import { UserType } from "../../../../api/types/userpass/user"; import { UserType } from "../../../../../api/types/userpass/user";
import { createOrUpdateUserPassUser } from "../../../../api/auth/userpass/createOrUpdateUserPassUser"; import { createOrUpdateUserPassUser } from "../../../../../api/auth/userpass/createOrUpdateUserPassUser";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../../pageUtils"; import { setErrorText } from "../../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class UserPassUserNewPage extends Page { export class UserPassUserNewPage extends Page {

View file

@ -1,9 +1,9 @@
import { HeaderAndContent } from "../../../../elements/HeaderAndContent"; import { HeaderAndContent } from "../../../../elements/HeaderAndContent";
import { Margin } from "../../../../elements/Margin"; import { Margin } from "../../../../elements/Margin";
import { Page } from "../../../../types/Page"; import { Page } from "../../../../../types/Page";
import { getUserPassUser } from "../../../../api/auth/userpass/getUserPassUser"; import { getUserPassUser } from "../../../../../api/auth/userpass/getUserPassUser";
import { render } from "preact"; import { render } from "preact";
import { toStr } from "../../../../utils"; import { toStr } from "../../../../../utils";
import i18next from "i18next"; import i18next from "i18next";
export class UserPassUserViewPage extends Page { export class UserPassUserViewPage extends Page {

View file

@ -1,5 +1,5 @@
import { Page } from "../../../../types/Page"; import { Page } from "../../../../../types/Page";
import { listUserPassUsers } from "../../../../api/auth/userpass/listUserPassUsers"; import { listUserPassUsers } from "../../../../../api/auth/userpass/listUserPassUsers";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,11 +1,11 @@
import { Grid, GridSizes } from "../elements/Grid"; import { Grid, GridSizes } from "../elements/Grid";
import { Margin } from "../elements/Margin"; import { Margin } from "../elements/Margin";
import { Page } from "../types/Page"; import { Page } from "../../types/Page";
import { Tile } from "../elements/Tile"; import { Tile } from "../elements/Tile";
import { TokenInfo } from "../api/types/token"; import { TokenInfo } from "../../api/types/token";
import { getCapabilitiesPath } from "../api/sys/getCapabilities"; import { getCapabilitiesPath } from "../../api/sys/getCapabilities";
import { lookupSelf } from "../api/sys/lookupSelf"; import { lookupSelf } from "../../api/sys/lookupSelf";
import { prePageChecks, setErrorText } from "../pageUtils"; import { prePageChecks, setErrorText } from "../../pageUtils";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -2,10 +2,10 @@ import { Component, JSX, render } from "preact";
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 { Page } from "../types/Page"; import { Page } from "../../types/Page";
import { lookupSelf } from "../api/sys/lookupSelf"; import { lookupSelf } from "../../api/sys/lookupSelf";
import { setErrorText } from "../pageUtils"; import { setErrorText } from "../../pageUtils";
import { usernameLogin } from "../api/auth/usernameLogin"; import { usernameLogin } from "../../api/auth/usernameLogin";
import i18next from "i18next"; import i18next from "i18next";
export class TokenLoginForm extends Component<{ page: Page }, unknown> { export class TokenLoginForm extends Component<{ page: Page }, unknown> {

View file

@ -1,9 +1,9 @@
import { Component, JSX, createRef, render } from "preact"; import { Component, JSX, createRef, render } from "preact";
import { Page } from "../types/Page"; import { Page } from "../../types/Page";
import { addClipboardNotifications, prePageChecks, setErrorText } from "../pageUtils"; import { addClipboardNotifications, prePageChecks, setErrorText } from "../../pageUtils";
import { getCapsPath } from "../api/sys/getCapabilities"; import { getCapsPath } from "../../api/sys/getCapabilities";
import { renewSelf } from "../api/sys/renewSelf"; import { renewSelf } from "../../api/sys/renewSelf";
import { sealVault } from "../api/sys/sealVault"; import { sealVault } from "../../api/sys/sealVault";
import ClipboardJS from "clipboard"; import ClipboardJS from "clipboard";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,7 +1,7 @@
import { Margin } from "../../elements/Margin"; import { Margin } from "../../elements/Margin";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { getPolicies } from "../../api/sys/policies/getPolicies"; import { getPolicies } from "../../../api/sys/policies/getPolicies";
import { prePageChecks } from "../../pageUtils"; import { prePageChecks } from "../../../pageUtils";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,7 +1,7 @@
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { deletePolicy } from "../../api/sys/policies/deletePolicy"; import { deletePolicy } from "../../../api/sys/policies/deletePolicy";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../pageUtils"; import { setErrorText } from "../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class PolicyDeletePage extends Page { export class PolicyDeletePage extends Page {

View file

@ -2,10 +2,10 @@ import { CodeEditor } from "../../elements/CodeEditor";
import { Component, JSX, render } from "preact"; import { Component, JSX, render } from "preact";
import { Margin } from "../../elements/Margin"; import { Margin } from "../../elements/Margin";
import { MarginInline } from "../../elements/MarginInline"; import { MarginInline } from "../../elements/MarginInline";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { createOrUpdatePolicy } from "../../api/sys/policies/createOrUpdatePolicy"; import { createOrUpdatePolicy } from "../../../api/sys/policies/createOrUpdatePolicy";
import { getPolicy } from "../../api/sys/policies/getPolicy"; import { getPolicy } from "../../../api/sys/policies/getPolicy";
import { setErrorText } from "../../pageUtils"; import { setErrorText } from "../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
type PolicyEditorProps = { type PolicyEditorProps = {

View file

@ -1,10 +1,10 @@
import { Form } from "../../elements/Form"; import { Form } from "../../elements/Form";
import { Margin } from "../../elements/Margin"; import { Margin } from "../../elements/Margin";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { createOrUpdatePolicy } from "../../api/sys/policies/createOrUpdatePolicy"; import { createOrUpdatePolicy } from "../../../api/sys/policies/createOrUpdatePolicy";
import { getPolicies } from "../../api/sys/policies/getPolicies"; import { getPolicies } from "../../../api/sys/policies/getPolicies";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../pageUtils"; import { setErrorText } from "../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class PolicyNewPage extends Page { export class PolicyNewPage extends Page {

View file

@ -1,8 +1,8 @@
import { CodeBlock } from "../../elements/CodeBlock"; import { CodeBlock } from "../../elements/CodeBlock";
import { Margin } from "../../elements/Margin"; import { Margin } from "../../elements/Margin";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { getPolicy } from "../../api/sys/policies/getPolicy"; import { getPolicy } from "../../../api/sys/policies/getPolicy";
import { prePageChecks } from "../../pageUtils"; import { prePageChecks } from "../../../pageUtils";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -2,7 +2,7 @@ import { Component, JSX, createRef, render } from "preact";
import { CopyableInputBox } from "../elements/CopyableInputBox"; import { CopyableInputBox } from "../elements/CopyableInputBox";
import { Form } from "../elements/Form"; import { Form } from "../elements/Form";
import { Margin } from "../elements/Margin"; import { Margin } from "../elements/Margin";
import { Page } from "../types/Page"; import { Page } from "../../types/Page";
import i18next from "i18next"; import i18next from "i18next";
const passwordLengthMin = 1; const passwordLengthMin = 1;

View file

@ -1,9 +1,9 @@
import { Form } from "../../elements/Form"; import { Form } from "../../elements/Form";
import { MarginInline } from "../../elements/MarginInline"; import { MarginInline } from "../../elements/MarginInline";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { deleteMount } from "../../api/sys/deleteMount"; import { deleteMount } from "../../../api/sys/deleteMount";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../pageUtils"; import { setErrorText } from "../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class DeleteSecretsEnginePage extends Page { export class DeleteSecretsEnginePage extends Page {

View file

@ -1,6 +1,6 @@
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { deleteSecret } from "../../../api/kv/deleteSecret"; import { deleteSecret } from "../../../../api/kv/deleteSecret";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,10 +1,10 @@
import { Form } from "../../../elements/Form"; import { Form } from "../../../elements/Form";
import { Margin } from "../../../elements/Margin"; import { Margin } from "../../../elements/Margin";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { createOrUpdateSecret } from "../../../api/kv/createOrUpdateSecret"; import { createOrUpdateSecret } from "../../../../api/kv/createOrUpdateSecret";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class KeyValueNewPage extends Page { export class KeyValueNewPage extends Page {

View file

@ -2,12 +2,12 @@ import { CodeBlock } from "../../../elements/CodeBlock";
import { Component, JSX, render } from "preact"; import { Component, JSX, render } from "preact";
import { CopyableInputBox } from "../../../elements/CopyableInputBox"; import { CopyableInputBox } from "../../../elements/CopyableInputBox";
import { Grid, GridSizes } from "../../../elements/Grid"; import { Grid, GridSizes } from "../../../elements/Grid";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { getCapabilities } from "../../../api/sys/getCapabilities"; import { getCapabilities } from "../../../../api/sys/getCapabilities";
import { getSecret } from "../../../api/kv/getSecret"; import { getSecret } from "../../../../api/kv/getSecret";
import { sortedObjectMap } from "../../../utils"; import { sortedObjectMap } from "../../../../utils";
import { undeleteSecret } from "../../../api/kv/undeleteSecret"; import { undeleteSecret } from "../../../../api/kv/undeleteSecret";
import i18next from "i18next"; import i18next from "i18next";
export type KVSecretViewProps = { export type KVSecretViewProps = {

View file

@ -1,11 +1,11 @@
import { CodeEditor } from "../../../elements/CodeEditor"; import { CodeEditor } from "../../../elements/CodeEditor";
import { Component, JSX, render } from "preact"; import { Component, JSX, render } from "preact";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { createOrUpdateSecret } from "../../../api/kv/createOrUpdateSecret"; import { createOrUpdateSecret } from "../../../../api/kv/createOrUpdateSecret";
import { getSecret } from "../../../api/kv/getSecret"; import { getSecret } from "../../../../api/kv/getSecret";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import { sortedObjectMap, verifyJSONString } from "../../../utils"; import { sortedObjectMap, verifyJSONString } from "../../../../utils";
import i18next from "i18next"; import i18next from "i18next";
//import { highlightElement } from "prismjs"; //import { highlightElement } from "prismjs";

View file

@ -1,7 +1,7 @@
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { getSecretMetadata } from "../../../api/kv/getSecretMetadata"; import { getSecretMetadata } from "../../../../api/kv/getSecretMetadata";
import { objectToMap } from "../../../utils"; import { objectToMap } from "../../../../utils";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,10 +1,10 @@
import { Component, JSX, render } from "preact"; import { Component, JSX, render } from "preact";
import { DoesNotExistError } from "../../../types/internalErrors"; import { DoesNotExistError } from "../../../../types/internalErrors";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { getCapabilitiesPath } from "../../../api/sys/getCapabilities"; import { getCapabilitiesPath } from "../../../../api/sys/getCapabilities";
import { getSecrets } from "../../../api/kv/getSecrets"; import { getSecrets } from "../../../../api/kv/getSecrets";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export type KVKeysListProps = { export type KVKeysListProps = {

View file

@ -1,10 +1,10 @@
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 { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { newMount } from "../../../api/sys/newMount"; import { newMount } from "../../../../api/sys/newMount";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class NewKVEnginePage extends Page { export class NewKVEnginePage extends Page {

View file

@ -1,10 +1,10 @@
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 { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { newMount } from "../../../api/sys/newMount"; import { newMount } from "../../../../api/sys/newMount";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class NewTOTPEnginePage extends Page { export class NewTOTPEnginePage extends Page {

View file

@ -1,10 +1,10 @@
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 { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { newMount } from "../../../api/sys/newMount"; import { newMount } from "../../../../api/sys/newMount";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class NewTransitEnginePage extends Page { export class NewTransitEnginePage extends Page {

View file

@ -1,5 +1,5 @@
import { Grid, GridSizes } from "../../elements/Grid"; import { Grid, GridSizes } from "../../elements/Grid";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { Tile } from "../../elements/Tile"; import { Tile } from "../../elements/Tile";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,5 +1,5 @@
import { JSX } from "preact/jsx-runtime"; import { JSX } from "preact/jsx-runtime";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
function currentTitleSecretText(page: Page): string { function currentTitleSecretText(page: Page): string {
let secretItemText = page.state.secretItem; let secretItemText = page.state.secretItem;

View file

@ -1,9 +1,9 @@
import { JSX, render } from "preact"; import { JSX, render } from "preact";
import { MountType, getMounts } from "../../api/sys/getMounts"; import { MountType, getMounts } from "../../../api/sys/getMounts";
import { Page } from "../../types/Page"; import { Page } from "../../../types/Page";
import { getCapsPath } from "../../api/sys/getCapabilities"; import { getCapsPath } from "../../../api/sys/getCapabilities";
import { prePageChecks } from "../../pageUtils"; import { prePageChecks } from "../../../pageUtils";
import { sortedObjectMap } from "../../utils"; import { sortedObjectMap } from "../../../utils";
import i18next from "i18next"; import i18next from "i18next";
export type MountLinkProps = { export type MountLinkProps = {

View file

@ -1,6 +1,6 @@
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { deleteTOTP } from "../../../api/totp/deleteTOTP"; import { deleteTOTP } from "../../../../api/totp/deleteTOTP";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -2,11 +2,11 @@ import { Component, JSX, createRef, render } from "preact";
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 { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { QRScanner } from "../../../elements/QRScanner"; import { QRScanner } from "../../../elements/QRScanner";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { addNewTOTP } from "../../../api/totp/addNewTOTP"; import { addNewTOTP } from "../../../../api/totp/addNewTOTP";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
function replaceAll(str: string, replace: string, replaceWith: string): string { function replaceAll(str: string, replace: string, replaceWith: string): string {

View file

@ -1,15 +1,15 @@
import { Component, JSX, render } from "preact"; import { Component, JSX, render } from "preact";
import { CopyableInputBox } from "../../../elements/CopyableInputBox"; import { CopyableInputBox } from "../../../elements/CopyableInputBox";
import { DoesNotExistError } from "../../../types/internalErrors"; import { DoesNotExistError } from "../../../../types/internalErrors";
import { Grid, GridSizes } from "../../../elements/Grid"; import { Grid, GridSizes } from "../../../elements/Grid";
import { MarginInline } from "../../../elements/MarginInline"; import { MarginInline } from "../../../elements/MarginInline";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { getCapabilitiesPath, getCapsPath } from "../../../api/sys/getCapabilities"; import { getCapabilitiesPath, getCapsPath } from "../../../../api/sys/getCapabilities";
import { getTOTPCode } from "../../../api/totp/getTOTPCode"; import { getTOTPCode } from "../../../../api/totp/getTOTPCode";
import { getTOTPKeys } from "../../../api/totp/getTOTPKeys"; import { getTOTPKeys } from "../../../../api/totp/getTOTPKeys";
import { removeDoubleSlash } from "../../../utils"; import { removeDoubleSlash } from "../../../../utils";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class RefreshingTOTPGridItem extends Component< export class RefreshingTOTPGridItem extends Component<

View file

@ -1,11 +1,11 @@
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 { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { newTransitKey } from "../../../api/transit/newTransitKey"; import { newTransitKey } from "../../../../api/transit/newTransitKey";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import i18next from "i18next"; import i18next from "i18next";
export class NewTransitKeyPage extends Page { export class NewTransitKeyPage extends Page {

View file

@ -3,12 +3,12 @@ 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 { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { fileToBase64 } from "../../../htmlUtils"; import { fileToBase64 } from "../../../../htmlUtils";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import { transitDecrypt } from "../../../api/transit/transitDecrypt"; import { transitDecrypt } from "../../../../api/transit/transitDecrypt";
import UIkit from "uikit"; import UIkit from "uikit";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -3,12 +3,12 @@ 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 { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { fileToBase64 } from "../../../htmlUtils"; import { fileToBase64 } from "../../../../htmlUtils";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import { transitEncrypt } from "../../../api/transit/transitEncrypt"; import { transitEncrypt } from "../../../../api/transit/transitEncrypt";
import UIkit from "uikit"; import UIkit from "uikit";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,13 +1,13 @@
import { CopyableModal } from "../../../elements/CopyableModal"; import { CopyableModal } from "../../../elements/CopyableModal";
import { Form } from "../../../elements/Form"; import { Form } from "../../../elements/Form";
import { Margin } from "../../../elements/Margin"; import { Margin } from "../../../elements/Margin";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { getTransitKey } from "../../../api/transit/getTransitKey"; import { getTransitKey } from "../../../../api/transit/getTransitKey";
import { objectToMap } from "../../../utils"; import { objectToMap } from "../../../../utils";
import { render } from "preact"; import { render } from "preact";
import { setErrorText } from "../../../pageUtils"; import { setErrorText } from "../../../../pageUtils";
import { transitRewrap } from "../../../api/transit/transitRewrap"; import { transitRewrap } from "../../../../api/transit/transitRewrap";
import UIkit from "uikit"; import UIkit from "uikit";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,8 +1,8 @@
import { Component, JSX, render } from "preact"; import { Component, JSX, render } from "preact";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { getCapabilitiesPath } from "../../../api/sys/getCapabilities"; import { getCapabilitiesPath } from "../../../../api/sys/getCapabilities";
import { getTransitKeys } from "../../../api/transit/getTransitKeys"; import { getTransitKeys } from "../../../../api/transit/getTransitKeys";
import i18next from "i18next"; import i18next from "i18next";
type TransitViewListState = { type TransitViewListState = {

View file

@ -1,8 +1,8 @@
import { Grid, GridSizes } from "../../../elements/Grid"; import { Grid, GridSizes } from "../../../elements/Grid";
import { Page } from "../../../types/Page"; import { Page } from "../../../../types/Page";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { Tile } from "../../../elements/Tile"; import { Tile } from "../../../elements/Tile";
import { getTransitKey } from "../../../api/transit/getTransitKey"; import { getTransitKey } from "../../../../api/transit/getTransitKey";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,11 +1,11 @@
// @ts-ignore // @ts-ignore
import translations from "../translations/index.mjs"; import translations from "../../translations/index.mjs";
// ts-unignore // ts-unignore
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 { Page } from "../types/Page"; import { Page } from "../../types/Page";
import { reloadNavBar } from "../elements/NavBar"; import { reloadNavBar } from "../elements/NavBar";
import { render } from "preact"; import { render } from "preact";
import i18next from "i18next"; import i18next from "i18next";

View file

@ -1,6 +1,6 @@
import { Form } from "../elements/Form"; import { Form } from "../elements/Form";
import { Margin } from "../elements/Margin"; import { Margin } from "../elements/Margin";
import { Page } from "../types/Page"; import { Page } from "../../types/Page";
import { render } from "preact"; import { render } from "preact";
export class SetVaultURLPage extends Page { export class SetVaultURLPage extends Page {

View file

@ -1,13 +1,13 @@
import { Component, JSX, render } from "preact"; import { Component, JSX, render } from "preact";
import { Form } from "../elements/Form"; import { Form } from "../elements/Form";
import { MarginInline } from "../elements/MarginInline"; import { MarginInline } from "../elements/MarginInline";
import { Page } from "../types/Page"; import { Page } from "../../types/Page";
import { QRScanner } from "../elements/QRScanner"; import { QRScanner } from "../elements/QRScanner";
import { getSealStatus } from "../api/sys/getSealStatus"; import { getSealStatus } from "../../api/sys/getSealStatus";
import { setErrorText } from "../pageUtils"; import { setErrorText } from "../../pageUtils";
import { submitUnsealKey } from "../api/sys/submitUnsealKey"; import { submitUnsealKey } from "../../api/sys/submitUnsealKey";
import { toStr } from "../utils"; import { toStr } from "../../utils";
import i18next from "i18next"; import i18next from "i18next";
const UnsealInputModes = { const UnsealInputModes = {