-
-
![My Happy SVG]()
-
-
-
-
-
-
+
+
+
+
+
+ No results found
+
+
+
+ { if (item.type === 'note') openNote(item.data); else handleActionSelect(item.data); }"
+ />
+
+
+
\ No newline at end of file
+
+.search-container-list {
+ display: flex;
+ flex-direction: column;
+ padding: 4px;
+}
+
+.search-empty {
+ padding: 16px;
+ text-align: center;
+ opacity: 0.5;
+ font-size: 14px;
+}
+
diff --git a/frontend/app/components/windows/NewFolderWindow.vue b/frontend/app/components/windows/NewFolderWindow.vue
new file mode 100644
index 0000000..f891ce4
--- /dev/null
+++ b/frontend/app/components/windows/NewFolderWindow.vue
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
{{ creating ? 'Rename Folder' : 'New Folder' }}
+
+
+
+
+
+
diff --git a/frontend/app/components/windows/RenameNoteWindow.vue b/frontend/app/components/windows/RenameNoteWindow.vue
new file mode 100644
index 0000000..82bca1d
--- /dev/null
+++ b/frontend/app/components/windows/RenameNoteWindow.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
diff --git a/frontend/app/services/ActionRegistry.js b/frontend/app/services/ActionRegistry.js
new file mode 100644
index 0000000..642569a
--- /dev/null
+++ b/frontend/app/services/ActionRegistry.js
@@ -0,0 +1,54 @@
+import { ref } from 'vue';
+
+const actions = ref([]);
+
+function register(action) {
+ if (!action.id || !action.execute) {
+ console.warn('[ActionRegistry] Action missing id or execute:', action);
+ return;
+ }
+
+ const existingIndex = actions.value.findIndex(a => a.id === action.id);
+ if (existingIndex !== -1) {
+ actions.value[existingIndex] = action;
+ } else {
+ actions.value.push(action);
+ }
+}
+
+function unregister(id) {
+ actions.value = actions.value.filter(a => a.id !== id);
+}
+
+function search(query) {
+ if (!query || query.trim() === '') return [];
+
+ const q = query.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
+ if (q === '') return [];
+
+ return actions.value.filter(action => {
+ if (typeof action.isActive === 'function' && !action.isActive()) {
+ return false;
+ }
+ const label = (action.label || '').normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
+ const description = (action.description || '').normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
+ return label.includes(q) || description.includes(q);
+ }).sort((a, b) => {
+ const aLabel = (a.label || '').toLowerCase();
+ const bLabel = (b.label || '').toLowerCase();
+ const qLower = q;
+ const aStarts = aLabel.startsWith(qLower) ? 0 : 1;
+ const bStarts = bLabel.startsWith(qLower) ? 0 : 1;
+ return aStarts - bStarts || aLabel.localeCompare(bLabel);
+ });
+}
+
+function execute(id, params = {}) {
+ const action = actions.value.find(a => a.id === id);
+ if (action && action.execute) {
+ action.execute(params);
+ }
+}
+
+export { register, unregister, search, execute };
+export default { register, unregister, search, execute };
diff --git a/frontend/app/services/Marker.js b/frontend/app/services/Marker.js
index 90ffe27..a93dd03 100644
--- a/frontend/app/services/Marker.js
+++ b/frontend/app/services/Marker.js
@@ -94,7 +94,7 @@ const linkExtension = {
},
renderer(token) {
- return `
`;
+ return `
Link`;
},
};
diff --git a/frontend/app/services/WindowDefinitions.js b/frontend/app/services/WindowDefinitions.js
index 0362232..2fe9e6e 100644
--- a/frontend/app/services/WindowDefinitions.js
+++ b/frontend/app/services/WindowDefinitions.js
@@ -34,6 +34,18 @@ const defWindows = {
component: () => import('~/components/windows/CreateCampaignWindow.vue'),
close: () => ClearWindow({type: 'create_campaign'}),
movable: true
+ },
+ rename_note: {
+ title: "Rename Note",
+ component: () => import('~/components/windows/RenameNoteWindow.vue'),
+ close: () => ClearWindow({type: 'rename_note'}),
+ movable: true
+ },
+ new_folder: {
+ title: "New Folder",
+ component: () => import('~/components/windows/NewFolderWindow.vue'),
+ close: () => ClearWindow({type: 'new_folder'}),
+ movable: true
}
}
diff --git a/frontend/app/services/Windows.js b/frontend/app/services/Windows.js
index a3eddb7..4cc4e05 100644
--- a/frontend/app/services/Windows.js
+++ b/frontend/app/services/Windows.js
@@ -189,6 +189,7 @@ function GetPosition(id) {
function ResetPosition(id, pos) {
let win = GetWindowWithId(id);
+ if (!win) return;
let data = { x: win.x, y: win.y };
if (data.x && data.y) {