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.

Re organize components names

Smaug673993986b3a269b
diff --git a/frontend/app/components/DocumentCard.vue b/frontend/app/components/DocumentCard.vue
index 94b0e245..880b8617 100644
--- a/frontend/app/components/DocumentCard.vue
+++ b/frontend/app/components/DocumentCard.vue
@@ -34,7 +34,7 @@
<script setup lang="ts">
import DeleteDocumentModal from '~/components/Node/DeleteNodeModal.vue';
-import NodeContextMenu from '~/components/Node/NodeContextMenu.vue';
+import NodeContextMenu from '~/components/Node/ContextMenu.vue';
import type { Node } from '~/stores';
const props = defineProps<{ document: Node }>();
diff --git a/frontend/app/components/DocumentLine.vue b/frontend/app/components/DocumentLine.vue
index 197b7c1e..05b181c8 100644
--- a/frontend/app/components/DocumentLine.vue
+++ b/frontend/app/components/DocumentLine.vue
@@ -28,7 +28,7 @@
<script setup lang="ts">
import DeleteDocumentModal from '~/components/Node/DeleteNodeModal.vue';
-import NodeContextMenu from '~/components/Node/NodeContextMenu.vue';
+import NodeContextMenu from '~/components/Node/ContextMenu.vue';
import type { Node } from '~/stores';
const props = defineProps<{ document: Node }>();
diff --git a/frontend/app/components/Kanban/KanbanBoard.vue b/frontend/app/components/Kanban/Board.vue
similarity index 98%
rename from frontend/app/components/Kanban/KanbanBoard.vue
rename to frontend/app/components/Kanban/Board.vue
index 21a5e16b..615fa65b 100644
--- a/frontend/app/components/Kanban/KanbanBoard.vue
+++ b/frontend/app/components/Kanban/Board.vue
@@ -27,7 +27,7 @@
</template>
<script setup lang="ts">
-import KanbanColumn, { type KanbanColumnData } from './KanbanColumn.vue';
+import type { KanbanColumnData } from './Column.vue';
import type { Node } from '~/stores';
export interface KanbanMetadata {
diff --git a/frontend/app/components/Kanban/KanbanCard.vue b/frontend/app/components/Kanban/Card.vue
similarity index 100%
rename from frontend/app/components/Kanban/KanbanCard.vue
rename to frontend/app/components/Kanban/Card.vue
diff --git a/frontend/app/components/Kanban/KanbanColumn.vue b/frontend/app/components/Kanban/Column.vue
similarity index 99%
rename from frontend/app/components/Kanban/KanbanColumn.vue
rename to frontend/app/components/Kanban/Column.vue
index 14ce5dd3..78cb7727 100644
--- a/frontend/app/components/Kanban/KanbanColumn.vue
+++ b/frontend/app/components/Kanban/Column.vue
@@ -67,7 +67,6 @@
</template>
<script setup lang="ts">
-import KanbanCard from './KanbanCard.vue';
import DeleteColumnModal from './DeleteColumn.modal.vue';
import { appColors } from '~/helpers/constants';
import type { Node } from '~/stores';
diff --git a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/app/components/MarkdownEditor/MarkdownEditor.vue
similarity index 100%
rename from frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue
rename to frontend/app/components/MarkdownEditor/MarkdownEditor.vue
diff --git a/frontend/app/components/Node/NodeContextMenu.vue b/frontend/app/components/Node/ContextMenu.vue
similarity index 100%
rename from frontend/app/components/Node/NodeContextMenu.vue
rename to frontend/app/components/Node/ContextMenu.vue
diff --git a/frontend/app/components/NodeDotMenu.vue b/frontend/app/components/Node/DotMenu.vue
similarity index 74%
rename from frontend/app/components/NodeDotMenu.vue
rename to frontend/app/components/Node/DotMenu.vue
index 411f2a23..2646cbb4 100644
--- a/frontend/app/components/NodeDotMenu.vue
+++ b/frontend/app/components/Node/DotMenu.vue
@@ -5,7 +5,6 @@
</template>
<script setup lang="ts">
-import NodeContextMenu from '~/components/Node/NodeContextMenu.vue';
import type { Node } from '~/stores';
defineProps<{ node: Node }>();
diff --git a/frontend/app/components/Node/NodeList.vue b/frontend/app/components/Node/List.vue
similarity index 98%
rename from frontend/app/components/Node/NodeList.vue
rename to frontend/app/components/Node/List.vue
index 1a970f71..d52ced43 100644
--- a/frontend/app/components/Node/NodeList.vue
+++ b/frontend/app/components/Node/List.vue
@@ -71,8 +71,7 @@
<script setup lang="ts">
import NodePermissions from '~/components/Node/NodePermissions.modal.vue';
import RemoveSharedNode from '~/components/Node/RemoveSharedNode.modal.vue';
-import NodeFilter from '~/components/Node/Filter.vue';
-import KanbanBoard, { type KanbanMetadata } from '~/components/Kanban/KanbanBoard.vue';
+import KanbanBoard, { type KanbanMetadata } from '~/components/Kanban/Board.vue';
import NodeMetadataModal from './NodeMetadata.modal.vue';
import ResetBoardModal from '../Kanban/ResetBoard.modal.vue';
import type { ViewMode } from '~/components/ViewSelection.vue';
diff --git a/frontend/app/components/NodeRecentCard.vue b/frontend/app/components/Node/RecentCard.vue
similarity index 100%
rename from frontend/app/components/NodeRecentCard.vue
rename to frontend/app/components/Node/RecentCard.vue
diff --git a/frontend/app/components/NodeWorkspaceCard.vue b/frontend/app/components/Node/WorkspaceCard.vue
similarity index 100%
rename from frontend/app/components/NodeWorkspaceCard.vue
rename to frontend/app/components/Node/WorkspaceCard.vue
diff --git a/frontend/app/components/Sidebar/SidebarItem.vue b/frontend/app/components/Sidebar/SidebarItem.vue
index 4e804b07..18d682ba 100644
--- a/frontend/app/components/Sidebar/SidebarItem.vue
+++ b/frontend/app/components/Sidebar/SidebarItem.vue
@@ -29,7 +29,7 @@
</template>
<script setup lang="ts">
-import NodeContextMenu from '../Node/NodeContextMenu.vue';
+import NodeContextMenu from '../Node/ContextMenu.vue';
import { navigationItems, type DefaultItem } from './helpers';
import type { Node } from '~/stores';
diff --git a/frontend/app/pages/(public)/doc/[id]/edit.vue b/frontend/app/pages/(public)/doc/[id]/edit.vue
index 1e22e384..2127b2fb 100644
--- a/frontend/app/pages/(public)/doc/[id]/edit.vue
+++ b/frontend/app/pages/(public)/doc/[id]/edit.vue
@@ -2,7 +2,6 @@
<MarkdownEditor v-if="document && !error" :doc="document" @save="data => save(data)" @auto-save="data => autoSave(data)" @exit="exit" />
</template>
<script lang="ts" setup>
-import MarkdownEditor from '~/components/MarkdownEditor/LazyMarkdownEditor.vue';
import type { Node } from '~/stores';
const store = useNodesStore();
diff --git a/frontend/app/pages/dashboard.vue b/frontend/app/pages/dashboard.vue
index 8cd1efe7..8aabc671 100644
--- a/frontend/app/pages/dashboard.vue
+++ b/frontend/app/pages/dashboard.vue
@@ -13,7 +13,6 @@
</template>
<script setup lang="ts">
definePageMeta({ breadcrumb: 'Home' });
-useNodesStore().fetch();
-useNodesStore().fetchShared();
+useNodesStore().init();
useUserStore().fetch();
</script>
diff --git a/frontend/app/pages/dashboard/categories/[id]/index.vue b/frontend/app/pages/dashboard/categories/[id]/index.vue
index 23273206..f8144c3c 100644
--- a/frontend/app/pages/dashboard/categories/[id]/index.vue
+++ b/frontend/app/pages/dashboard/categories/[id]/index.vue
@@ -3,7 +3,6 @@
</template>
<script setup lang="ts">
-import NodeList from '~/components/Node/NodeList.vue';
import type { Node } from '~/stores';
definePageMeta({ breadcrumb: () => useNodesStore().getById(useRoute().params.id as string)?.name || '' });
diff --git a/frontend/app/pages/dashboard/docs/[id].vue b/frontend/app/pages/dashboard/docs/[id].vue
index 41daafc9..e10a1b11 100644
--- a/frontend/app/pages/dashboard/docs/[id].vue
+++ b/frontend/app/pages/dashboard/docs/[id].vue
@@ -36,8 +36,8 @@ import TableOfContent from './_components/table-of-content/TableOfContents.vue';
import DocumentCardHeader from './_components/DocumentCardHeader.vue';
import DocumentCardFooter from './_components/DocumentCardFooter.vue';
import DocumentSkeleton from './_components/DocumentSkeleton.vue';
+import NodeContextMenu from '~/components/Node/ContextMenu.vue';
import type { Node } from '~/stores';
-import NodeContextMenu from '~/components/Node/NodeContextMenu.vue';
const route = useRoute();
const documentsStore = useNodesStore();
diff --git a/frontend/app/pages/dashboard/docs/edit/[id].vue b/frontend/app/pages/dashboard/docs/edit/[id].vue
index a7ad3083..386b6aae 100644
--- a/frontend/app/pages/dashboard/docs/edit/[id].vue
+++ b/frontend/app/pages/dashboard/docs/edit/[id].vue
@@ -3,7 +3,6 @@
</template>
<script lang="ts" setup>
import type { Node } from '~/stores';
-import MarkdownEditor from '~/components/MarkdownEditor/LazyMarkdownEditor.vue';
const store = useNodesStore();
const route = useRoute();
diff --git a/frontend/app/pages/dashboard/docs/index.vue b/frontend/app/pages/dashboard/docs/index.vue
index eb48aba6..bcbaaae6 100644
--- a/frontend/app/pages/dashboard/docs/index.vue
+++ b/frontend/app/pages/dashboard/docs/index.vue
@@ -3,7 +3,6 @@
</template>
<script setup lang="ts">
-import NodeList from '~/components/Node/NodeList.vue';
import type { Node } from '~/stores';
const nodesStore = useNodesStore();
diff --git a/frontend/app/pages/dashboard/docs/new.vue b/frontend/app/pages/dashboard/docs/new.vue
index 7d936782..ddd5e52b 100644
--- a/frontend/app/pages/dashboard/docs/new.vue
+++ b/frontend/app/pages/dashboard/docs/new.vue
@@ -2,7 +2,6 @@
<MarkdownEditor :doc="document" @save="data => save(data)" @exit="exit" />
</template>
<script lang="ts" setup>
-import MarkdownEditor from '~/components/MarkdownEditor/LazyMarkdownEditor.vue';
import type { Node } from '~/stores';
const store = useNodesStore();
diff --git a/frontend/app/pages/dashboard/home.vue b/frontend/app/pages/dashboard/home.vue
index 0e551137..1397a992 100644
--- a/frontend/app/pages/dashboard/home.vue
+++ b/frontend/app/pages/dashboard/home.vue
@@ -141,8 +141,8 @@
<script setup lang="ts">
import { resolveIcon, resolveNodeLink, resolveNodeType } from '~/helpers/node';
-import type { Node } from '~/stores';
import CreateCategoryModal from '~/pages/dashboard/categories/_modals/CreateCategoryModal.vue';
+import type { Node } from '~/stores';
const router = useRouter();
const nodesStore = useNodesStore();
diff --git a/frontend/app/stores/nodes.store.ts b/frontend/app/stores/nodes.store.ts
index 69a80662..ab067dc4 100644
--- a/frontend/app/stores/nodes.store.ts
+++ b/frontend/app/stores/nodes.store.ts
@@ -181,6 +181,12 @@ export const useNodesStore = defineStore('nodes', {
},
},
actions: {
+ init() {
+ console.log('[store/nodes] Initializing store');
+ this.clear();
+ this.fetch();
+ this.fetchShared();
+ },
recomputeTags() {
const tags = new Set<string>();
this.nodes.forEach(node => {