diff --git a/src/pageUtils.js b/src/pageUtils.js index cdee964..b2e996d 100644 --- a/src/pageUtils.js +++ b/src/pageUtils.js @@ -136,6 +136,7 @@ export function setTitleElement(pageState) { tag: "a", text: secretPath + " ", onclick: _ => { + pageState.currentSecretVersion = "0"; if (pageState.currentMountType.startsWith("kv")) { pageState.currentSecretPath = secretPaths.slice(0, index + 1); changePage("KEY_VALUE_VIEW"); diff --git a/src/pages/KeyValue/KeyValueSecret.js b/src/pages/KeyValue/KeyValueSecret.js index d857a6b..871c1bb 100644 --- a/src/pages/KeyValue/KeyValueSecret.js +++ b/src/pages/KeyValue/KeyValueSecret.js @@ -15,7 +15,6 @@ export class KeyValueSecretPage extends Page { if (pageState.currentSecretVersion != "0") { pageState.currentSecretVersion = "0"; changePage("KEY_VALUE_VERSIONS"); - } else { pageState.currentSecret = ""; changePage("KEY_VALUE_VIEW"); diff --git a/src/pages/KeyValue/KeyValueVersions.js b/src/pages/KeyValue/KeyValueVersions.js index 5655c32..510e881 100644 --- a/src/pages/KeyValue/KeyValueVersions.js +++ b/src/pages/KeyValue/KeyValueVersions.js @@ -10,6 +10,9 @@ export class KeyValueVersionsPage extends Page { super(); } goBack() { + if (pageState.currentSecretVersion != "0") { + pageState.currentSecretVersion = "0"; + } changePage("KEY_VALUE_SECRET"); } async render() {