1
0
Fork 0
This commit is contained in:
Kitteh 2021-05-05 17:03:00 +01:00
parent c1d0bb0331
commit fb2478705a
3 changed files with 4 additions and 1 deletions

View file

@ -136,6 +136,7 @@ export function setTitleElement(pageState) {
tag: "a", tag: "a",
text: secretPath + " ", text: secretPath + " ",
onclick: _ => { onclick: _ => {
pageState.currentSecretVersion = "0";
if (pageState.currentMountType.startsWith("kv")) { if (pageState.currentMountType.startsWith("kv")) {
pageState.currentSecretPath = secretPaths.slice(0, index + 1); pageState.currentSecretPath = secretPaths.slice(0, index + 1);
changePage("KEY_VALUE_VIEW"); changePage("KEY_VALUE_VIEW");

View file

@ -15,7 +15,6 @@ export class KeyValueSecretPage extends Page {
if (pageState.currentSecretVersion != "0") { if (pageState.currentSecretVersion != "0") {
pageState.currentSecretVersion = "0"; pageState.currentSecretVersion = "0";
changePage("KEY_VALUE_VERSIONS"); changePage("KEY_VALUE_VERSIONS");
} else { } else {
pageState.currentSecret = ""; pageState.currentSecret = "";
changePage("KEY_VALUE_VIEW"); changePage("KEY_VALUE_VIEW");

View file

@ -10,6 +10,9 @@ export class KeyValueVersionsPage extends Page {
super(); super();
} }
goBack() { goBack() {
if (pageState.currentSecretVersion != "0") {
pageState.currentSecretVersion = "0";
}
changePage("KEY_VALUE_SECRET"); changePage("KEY_VALUE_SECRET");
} }
async render() { async render() {