aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/templates/duplicate-rooms.html
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-03 20:53:00 -0400
committerhistoria <[not public]>2026-07-03 20:53:00 -0400
commita5d4ead1795882d25da7eda53680d2a84590693d (patch)
tree747a0516e03f22fdf511e55ee4c4809d4a1acd78 /internal/admin/templates/duplicate-rooms.html
parent0dfd7bf19e800b67e03726c18cfa00e623d6b121 (diff)
downloadthehouseoficarus-a5d4ead1795882d25da7eda53680d2a84590693d.tar.gz
feat: admin map can add new and rename areas. works with empty directories now.
Diffstat (limited to 'internal/admin/templates/duplicate-rooms.html')
-rw-r--r--internal/admin/templates/duplicate-rooms.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/admin/templates/duplicate-rooms.html b/internal/admin/templates/duplicate-rooms.html
index 4e603bb..9533460 100644
--- a/internal/admin/templates/duplicate-rooms.html
+++ b/internal/admin/templates/duplicate-rooms.html
@@ -64,9 +64,9 @@ function checkDups() {
}
function deleteDupFile(path) {
- if (!confirm('Delete this file?\n\n' + path)) return;
API.post('/api/rooms/resolve-duplicate', {path: path, action: 'delete'}).then(function() {
notify('Deleted', 'success');
+ updateUndoBar();
checkDups();
}).catch(function(e) {
notify('Delete failed: ' + e.message, 'error');
@@ -77,9 +77,9 @@ function renameDupFile(path, inputId) {
var el = document.getElementById(inputId);
var newID = parseInt(el.value, 10);
if (!newID || newID <= 0) { notify('Enter a valid new room ID', 'error'); return; }
- if (!confirm('Rename this file to ID ' + newID + '?\n\n' + path)) return;
API.post('/api/rooms/resolve-duplicate', {path: path, action: 'rename', new_id: newID}).then(function() {
notify('Renamed to ' + newID, 'success');
+ updateUndoBar();
checkDups();
}).catch(function(e) {
notify('Rename failed: ' + e.message, 'error');
@@ -89,5 +89,6 @@ function renameDupFile(path, inputId) {
function esc(s) { return String(s || '').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); }
function escAttr(s) { return String(s || '').replace(/&/g,'&amp;').replace(/"/g,'&quot;'); }
checkDups();
+window.refreshPage = checkDups;
</script>
{{end}}