mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 07:45:13 +08:00
🎨 Sync 2026-10-01 18:52:09
This commit is contained in:
1 parent
e58f3357cb
commit
870d391c5d
12 files changed
+30
-45
No files matched your search
@@ -19,10 +19,7 @@ return baseclass.extend({
|
||||
this.dynamicMenuTargets = {};
|
||||
|
||||
this.syncConditionalMenuCache()
|
||||
.then(L.bind(function(reloading) {
|
||||
if (reloading)
|
||||
return;
|
||||
|
||||
.then(L.bind(function() {
|
||||
return this.resolveDynamicMenuTargets()
|
||||
.then(L.bind(function() {
|
||||
return ui.menu.load().then(L.bind(this.render, this));
|
||||
@@ -70,13 +67,6 @@ return baseclass.extend({
|
||||
return L.url(url, child.name);
|
||||
},
|
||||
|
||||
reloadPageWithMenuFlush: function() {
|
||||
var url = new URL(window.location.href);
|
||||
|
||||
url.searchParams.set('menu', 'flush');
|
||||
window.location.replace(url.toString());
|
||||
},
|
||||
|
||||
getFileListStamp: function(path, suffix) {
|
||||
return L.resolveDefault(fs.list(path), []).then(function(entries) {
|
||||
return entries.filter(function(entry) {
|
||||
@@ -126,12 +116,11 @@ return baseclass.extend({
|
||||
if (previousStamp === stamp)
|
||||
return false;
|
||||
|
||||
window.localStorage.setItem(storageKey, stamp);
|
||||
|
||||
return this.flushBackendMenuCache().then(L.bind(function() {
|
||||
this.reloadPageWithMenuFlush();
|
||||
return true;
|
||||
}, this));
|
||||
return this.flushBackendMenuCache().then(function() {
|
||||
// Reload only the menu: navigating here can abort form saves.
|
||||
ui.menu.menu = null;
|
||||
window.localStorage.setItem(storageKey, stamp);
|
||||
});
|
||||
}, this));
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user