diff --git a/app/templates/local_workspace.html b/app/templates/local_workspace.html
index 9ec2217..ec9e359 100644
--- a/app/templates/local_workspace.html
+++ b/app/templates/local_workspace.html
@@ -944,9 +944,7 @@ window._wsInitData = (function() {
uploadStartTime: 0,
// Path bar
- get pathValue() {
- return '/workspace/' + this.folderStack.filter(function(b){return b.id > 0}).map(function(b){return b.name}).join('/');
- },
+ pathValue: '/workspace/',
async navigateToRoot() {
this.folderStack = [];
@@ -986,8 +984,8 @@ window._wsInitData = (function() {
// Navigation history
navHistory: [],
navIndex: -1,
- get canGoBack() { return this.navIndex > 0; },
- get canGoForward() { return this.navIndex < this.folderStack.length - 1; },
+ canGoBack: false,
+ canGoForward: false,
// Preview popup
previewVisible: false,
@@ -1034,6 +1032,20 @@ window._wsInitData = (function() {
// Load workspace tags
this.loadWorkspaceTags();
} catch(e) { console.error('Tree load error:', e); this.loaded = true; }
+ this._recompute();
+ },
+
+ _recompute() {
+ // Recompute all former getters as plain properties
+ this.canGoBack = this.navIndex > 0;
+ this.canGoForward = this.navIndex < this.folderStack.length - 1;
+ this.pathValue = '/workspace/' + this.folderStack.filter(function(b){return b.id > 0}).map(function(b){return b.name}).join('/');
+ // flatTree
+ var ft = [];
+ this._flattenTree(this.tree, ft);
+ this.flatTree = ft;
+ // filteredTableItems
+ this._computeFilteredTableItems();
},
// ── Pin/Favorite items ──
@@ -1108,11 +1120,7 @@ window._wsInitData = (function() {
},
// ── Table view data ──
- get flatTree() {
- var result = [];
- this._flattenTree(this.tree, result);
- return result;
- },
+ flatTree: [],
_flattenTree(nodes, out) {
for (var i=0; i