diff options
| author | historia <[not public]> | 2026-07-03 20:53:00 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-03 20:53:00 -0400 |
| commit | a5d4ead1795882d25da7eda53680d2a84590693d (patch) | |
| tree | 747a0516e03f22fdf511e55ee4c4809d4a1acd78 /internal/admin/static/admin.js | |
| parent | 0dfd7bf19e800b67e03726c18cfa00e623d6b121 (diff) | |
| download | thehouseoficarus-a5d4ead1795882d25da7eda53680d2a84590693d.tar.gz | |
feat: admin map can add new and rename areas. works with empty directories now.
Diffstat (limited to 'internal/admin/static/admin.js')
| -rw-r--r-- | internal/admin/static/admin.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/admin/static/admin.js b/internal/admin/static/admin.js index cce3bc9..f8e9d13 100644 --- a/internal/admin/static/admin.js +++ b/internal/admin/static/admin.js @@ -31,11 +31,11 @@ window.updateUndoBar = function() { }; window.doUndo = function() { - API.post('/api/undo/undo').then(function(r) { notify(r.message || 'Undo complete', 'success'); updateUndoBar(); if(window.refreshPage)refreshPage(); }).catch(function(e) { notify('Undo failed: '+e.message, 'error'); }); + API.post('/api/undo/undo').then(function(r) { notify(r.message || 'Undo complete', 'success'); updateUndoBar(); if(r.has_duplicates) { window.location = '/'; return; } if(window.refreshPage)refreshPage(); }).catch(function(e) { notify('Undo failed: '+e.message, 'error'); }); }; window.doRedo = function() { - API.post('/api/undo/redo').then(function(r) { notify(r.message || 'Redo complete', 'success'); updateUndoBar(); if(window.refreshPage)refreshPage(); }).catch(function(e) { notify('Redo failed: '+e.message, 'error'); }); + API.post('/api/undo/redo').then(function(r) { notify(r.message || 'Redo complete', 'success'); updateUndoBar(); if(r.has_duplicates) { window.location = '/'; return; } if(window.refreshPage)refreshPage(); }).catch(function(e) { notify('Redo failed: '+e.message, 'error'); }); }; window.addEventListener('keydown', function(e) { |
