1
0
Fork 0

change new kv action from view to edit

This commit is contained in:
ChaotiCryptidz 2022-04-24 12:49:47 +01:00
parent 124cdb3a3e
commit cfe0b3e630
No known key found for this signature in database

View file

@ -8,7 +8,7 @@ import { Margin } from "../../../elements/Margin";
import { SecretTitleElement } from "../SecretTitleElement"; import { SecretTitleElement } from "../SecretTitleElement";
import { TextInput } from "../../../elements/forms/TextInput"; import { TextInput } from "../../../elements/forms/TextInput";
import { combineKVPath, splitKVPath } from "./kvPathUtils"; import { combineKVPath, splitKVPath } from "./kvPathUtils";
import { kvViewURL } from "../../pageLinks"; import { kvEditURL } from "../../pageLinks";
import { route } from "preact-router"; import { route } from "preact-router";
import i18next from "i18next"; import i18next from "i18next";
@ -35,7 +35,7 @@ export class KeyValueNew extends Component<DefaultPageProps> {
const combined = combineKVPath(secretPath, path); const combined = combineKVPath(secretPath, path);
route(kvViewURL(baseMount, combined.secretPath, combined.secretItem)); route(kvEditURL(baseMount, combined.secretPath, combined.secretItem));
} catch (e: unknown) { } catch (e: unknown) {
const error = e as Error; const error = e as Error;
this.errorMessageRef.current.setErrorMessage(error.message); this.errorMessageRef.current.setErrorMessage(error.message);