@@ -10,11 +10,10 @@ import {
1010 CardTitle ,
1111} from " @/components/ui/card" ;
1212import { useSession } from " ../auth/useSession" ;
13- import PageToolbarActions from " ../spatial/PageToolbarActions.vue" ;
1413import SpatialPageView from " ../spatial/SpatialPageView.vue" ;
1514import { useUserTemplates } from " ../spatial/useUserTemplates" ;
1615import PageEditorBacklinksCard from " ./PageEditorBacklinksCard.vue" ;
17- import PageEditorCollabStatusCard from " ./PageEditorCollabStatusCard .vue" ;
16+ import PageEditorLeftSidebar from " ./PageEditorLeftSidebar .vue" ;
1817import PageEditorManagementCard from " ./PageEditorManagementCard.vue" ;
1918import PageEditorSnapshotsCard from " ./PageEditorSnapshotsCard.vue" ;
2019import NotePropertiesCard from " ../spatial/NotePropertiesCard.vue" ;
@@ -360,17 +359,6 @@ onMounted(() => {
360359 @select-arrow =" selectedArrowId = $event ?.[0 ] ?? null ; selectedArrowModel = $event ?.[1 ] ?? null "
361360 />
362361
363- <!-- === Toolbar actions === -->
364- <template #toolbar-actions >
365- <PageToolbarActions
366- @insert-note =" spatialViewRef ?.insertNoteAtCenter ()"
367- @insert-arrow =" spatialViewRef ?.insertArrowBetweenSelected ()"
368- @zoom-in =" spatialViewRef ?.zoomIn ()"
369- @zoom-out =" spatialViewRef ?.zoomOut ()"
370- @fit-to-screen =" spatialViewRef ?.fitToScreen ()"
371- />
372- </template >
373-
374362 <!-- === Toolbar center: breadcrumb path === -->
375363 <template #toolbar-center >
376364 <nav
@@ -401,61 +389,64 @@ onMounted(() => {
401389
402390 <!-- === Left sidebar === -->
403391 <template #left-sidebar >
404- <div class = " space-y-3 " >
392+ <PageEditorLeftSidebar v-slot = " { activeTab } " >
405393 <!-- Current path -->
406- <Card >
407- <CardHeader class="pb-2">
408- <CardTitle class="text-sm">Path</CardTitle >
409- </CardHeader >
410- <CardContent class="space-y-2 text-xs">
411- <p v-if =" pathLoading" class =" text-muted-foreground" >Loading…</p >
412- <p v-else-if =" pathError" class =" text-destructive" >{{ pathError }}</p >
413- <nav v-else class =" text-muted-foreground flex flex-wrap items-center gap-1" >
414- <template v-for =" (pid , i ) in pathPageIds " :key =" pid " >
415- <span v-if =" i > 0" >/</span >
416- <RouterLink
417- v-if =" i < pathPageIds .length - 1 "
418- class="text-primary hover:underline "
419- :to =" ` /pages/${pid } ` "
394+ <div v-if =" activeTab === 'path'" class =" space-y-3" >
395+ <Card >
396+ <CardHeader class="pb-2">
397+ <CardTitle class="text-sm">Path</CardTitle >
398+ </CardHeader >
399+ <CardContent class="space-y-2 text-xs">
400+ <p v-if =" pathLoading" class =" text-muted-foreground" >Loading…</p >
401+ <p v-else-if =" pathError" class =" text-destructive" >{{ pathError }}</p >
402+ <nav v-else class =" text-muted-foreground flex flex-wrap items-center gap-1" >
403+ <template v-for =" (pid , i ) in pathPageIds " :key =" pid " >
404+ <span v-if =" i > 0" >/</span >
405+ <RouterLink
406+ v-if =" i < pathPageIds .length - 1 "
407+ class="text-primary hover:underline "
408+ :to =" ` /pages/${pid } ` "
409+ >
410+ {{ pagePathLabel(pid, pageLabels) }}
411+ </RouterLink >
412+ <span v-else class =" text-foreground font-medium" >
413+ {{ pagePathLabel(pid, pageLabels) }}
414+ </span >
415+ </template >
416+ </nav >
417+ <div class =" flex flex-wrap gap-1" >
418+ <Button
419+ size="xs"
420+ variant="secondary"
421+ class="h-6 text-[10px]"
422+ :disabled =" pagePrefsLoading "
423+ @click =" bumpAsStarting ()"
420424 >
421- {{ pagePathLabel(pid, pageLabels) }}
422- </RouterLink >
423- <span v-else class =" text-foreground font-medium" >
424- {{ pagePathLabel(pid, pageLabels) }}
425- </span >
426- </template >
427- </nav >
428- <div class =" flex flex-wrap gap-1" >
429- <Button
430- size="xs"
431- variant="secondary"
432- class="h-6 text-[10px]"
433- :disabled =" pagePrefsLoading "
434- @click =" bumpAsStarting ()"
435- >
436- Make starting
437- </Button >
438- <Button
439- size="xs"
440- variant="outline"
441- class="h-6 text-[10px]"
442- :disabled =" pagePrefsLoading "
443- @click =" toggleFavorite ()"
444- >
445- {{ isFavorite ? "Unfavorite" : "Favorite" }}
446- </Button >
447- </div >
448- <p v-if =" bumpMessage" class =" text-muted-foreground text-[10px]" >
449- {{ bumpMessage }}
450- </p >
451- <p v-if =" favoriteMessage" class =" text-amber-700 dark:text-amber-300 text-[10px]" >
452- {{ favoriteMessage }}
453- </p >
454- </CardContent >
455- </Card >
425+ Make starting
426+ </Button >
427+ <Button
428+ size="xs"
429+ variant="outline"
430+ class="h-6 text-[10px]"
431+ :disabled =" pagePrefsLoading "
432+ @click =" toggleFavorite ()"
433+ >
434+ {{ isFavorite ? "Unfavorite" : "Favorite" }}
435+ </Button >
436+ </div >
437+ <p v-if =" bumpMessage" class =" text-muted-foreground text-[10px]" >
438+ {{ bumpMessage }}
439+ </p >
440+ <p v-if =" favoriteMessage" class =" text-amber-700 dark:text-amber-300 text-[10px]" >
441+ {{ favoriteMessage }}
442+ </p >
443+ </CardContent >
444+ </Card >
445+ </div >
456446
457447 <!-- Recent pages -->
458448 <RecentPagesCard
449+ v-if =" activeTab === ' recent' "
459450 :recent-page-ids =" recentPageIds "
460451 :current-page-id =" pageId "
461452 :page-labels =" pageLabels "
@@ -464,6 +455,7 @@ onMounted(() => {
464455
465456 <!-- Favorite pages -->
466457 <FavoritePagesCard
458+ v-if =" activeTab === ' favorites' "
467459 :favorite-page-ids =" favoritePageIds "
468460 :current-page-id =" pageId "
469461 :page-labels =" pageLabels "
@@ -472,25 +464,13 @@ onMounted(() => {
472464
473465 <!-- Selected pages -->
474466 <SelectedPagesCard
467+ v-if =" activeTab === ' selected' "
475468 :selected-page-ids =" selectedPageIds "
476469 :current-page-id =" pageId "
477470 :page-labels =" pageLabels "
478471 @clear =" selectedPageIds = []"
479472 />
480-
481- <!-- Collab status mini -->
482- <PageEditorCollabStatusCard
483- :collab-loading =" collabLoading "
484- :load-error =" loadError "
485- :crypto-error =" cryptoError "
486- :collab-ws-live =" collabWsLive "
487- :collab-ws-error =" collabWsError "
488- :update-count =" updateCount "
489- :collab-last-index =" collabLastIndex "
490- :push-error =" pushError "
491- @unlock-with-password =" onUnlockWithPassword ($event )"
492- />
493- </div >
473+ </PageEditorLeftSidebar >
494474 </template >
495475
496476 <!-- === Right sidebar === -->
@@ -523,6 +503,7 @@ onMounted(() => {
523503 @update :anchor-x =" selectedNoteModel .anchor .value .x = $event "
524504 @update :anchor-y =" selectedNoteModel .anchor .value .y = $event "
525505 @update :width =" selectedNoteModel .width .value .expanded = $event "
506+ @update :height =" selectedNoteModel .height .value .expanded = $event "
526507 @update :color =" selectedNoteModel .color .value = $event "
527508 @update :color-inherit =" selectedNoteModel .color .inherit .value = $event "
528509 @update :collapsible =" selectedNoteModel .collapsing .enabled .value = $event "
0 commit comments