From a5d4ead1795882d25da7eda53680d2a84590693d Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Fri, 3 Jul 2026 20:53:00 -0400 Subject: feat: admin map can add new and rename areas. works with empty directories now. --- internal/admin/static/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/admin/static/admin.js') 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) { -- cgit v1.2.3