Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix copy id feature

Smaug67393683f32fe5ed
diff --git a/frontend/app/components/Node/NodeContextMenu.vue b/frontend/app/components/Node/NodeContextMenu.vue
index 69af9c77..1b846870 100644
--- a/frontend/app/components/Node/NodeContextMenu.vue
+++ b/frontend/app/components/Node/NodeContextMenu.vue
@@ -8,7 +8,7 @@
<button v-if="nodeStore.hasPermissions(node, 4)" @click="action('manageAccess')"><Icon name="manage_access" />Manage Access</button>
<hr />
<button @click="action('delete')"><Icon name="delete" fill="red" /> Delete</button>
- <button v-if="preferences.get('developerMode').value"><Icon name="snippets" /> Copy ID</button>
+ <button v-if="preferences.get('developerMode').value" @click="action('copyId')"><Icon name="snippets" /> Copy ID</button>
<hr />
<div class="footer">
<p style="display: flex; align-items: center; gap: 8px">
@@ -58,6 +58,9 @@ async function action(name: string) {
case 'manageAccess':
useModal().add(new Modal(shallowRef(NodePermissions), { props: { node: props.node }, size: 'small' }));
break;
+ case 'copyId':
+ navigator.clipboard.writeText(props.node.id);
+ break;
}
emit('close');
}