show path of selected item in filebrowser

This commit is contained in:
marlon-erler
2024-07-21 19:44:10 +02:00
parent 593c85a8b9
commit 3824224e85
7 changed files with 78 additions and 19 deletions
+8 -4
View File
@@ -1,22 +1,26 @@
import * as React from "bloatless-react";
import StorageModel from "../Model/storageModel";
import StorageModel, { PATH_COMPONENT_SEPARATOR } from "../Model/storageModel";
export default class StorageViewModel {
storageModel: StorageModel;
// state
isShowingStorageModal: React.State<boolean> = new React.State(false);
selectedPath: React.State<string> = new React.State("\\");
selectedPath: React.State<string> = new React.State(PATH_COMPONENT_SEPARATOR);
didMakeChanges: React.State<boolean> = new React.State(false);
// view methods
showStorageModal = (): void => {
this.isShowingStorageModal.value = true;
}
};
hideStorageModal = (): void => {
if (this.didMakeChanges.value == true) {
window.location.reload();
}
this.isShowingStorageModal.value = false;
}
};
// init
constructor(storageModel: StorageModel) {