integrate context with window.history API

This commit is contained in:
marlon-erler
2026-04-14 17:19:35 +00:00
parent 77fac64879
commit 9e9ede570d
13 changed files with 150 additions and 90 deletions
+7 -3
View File
@@ -54,14 +54,18 @@ export default class StorageViewModel extends Context {
this.isShowingStorageModal.value = true;
};
hideStorageModal = (): void => {
// exit
close = (): void => {
this.coreViewModel.closeContext(this.contextId);
};
handleContextClose = (): void => {
if (this.didMakeChanges.value == true) {
window.location.reload();
return;
}
this.isShowingStorageModal.value = false;
};
}
// init
constructor(public readonly coreViewModel: CoreViewModel) {
@@ -77,6 +81,6 @@ export default class StorageViewModel extends Context {
);
// keystrokes
this.registerKeyStroke(CommonKeys.CloseOrCancel, this.hideStorageModal);
this.registerKeyStroke(CommonKeys.CloseOrCancel, this.close);
}
}