-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
478 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...s/better-write-app/src/components/page/editor/aside/graph/chapters/AsideGraphChapters.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
<div | ||
:class="[PROJECT.base === 'chapter' ? '' : 'opacity-70']" | ||
class="flex justify-between items-center w-full" | ||
> | ||
<p | ||
v-if="!env.isEmptyProject(PROJECT.name)" | ||
class="cursor-pointer truncate font-bold text-theme-aside-graph-text hover:text-theme-aside-graph-text-hover active:text-theme-aside-graph-text-active" | ||
@click="graph.base()" | ||
> | ||
{{ t('editor.aside.graph.chapters') }} | ||
</p> | ||
<AsideGraphControl v-if="!env.isEmptyProject(PROJECT.name)" /> | ||
</div> | ||
<div v-for="(page, index) in PROJECT.pages" :key="index"> | ||
<div | ||
v-for="(entity, ind) in page.entities" | ||
:id="graph.normalize().id(page, ind)" | ||
:key="graph.normalize().key(page, ind)" | ||
@click="graph.to(ind, page, entity)" | ||
> | ||
<AsideGraphItem :entity="entity" :page="page" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useProjectStore } from '@/store/project' | ||
import { useEnv } from '@/use/env' | ||
import { useGraph } from '@/use/graph' | ||
import { useUtils } from '@/use/utils' | ||
import { computed, watch } from 'vue' | ||
import { useI18n } from 'vue-i18n' | ||
const PROJECT = useProjectStore() | ||
const graph = useGraph() | ||
const env = useEnv() | ||
const { t } = useI18n() | ||
const utils = useUtils() | ||
const name = computed(() => PROJECT.nameRaw) | ||
watch(name, () => { | ||
PROJECT.name = utils.text().kebab(PROJECT.nameRaw) | ||
}) | ||
</script> |
22 changes: 22 additions & 0 deletions
22
...s/better-write-app/src/components/page/editor/aside/graph/timeline/AsideGraphTimeline.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<template> | ||
<div class="flex justify-between items-center w-full mt-5"> | ||
<p | ||
:class="[PROJECT.base === 'timeline' ? '' : 'opacity-70']" | ||
class="cursor-pointer truncate font-bold text-theme-aside-graph-text hover:text-theme-aside-graph-text-hover active:text-theme-aside-graph-text-active" | ||
@click="canvas.externals().load()" | ||
> | ||
{{ t('editor.aside.graph.timeline') }} | ||
</p> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useProjectStore } from '@/store/project' | ||
import { useCanvasTimeline } from '@/use/canvas/timeline' | ||
import { useI18n } from 'vue-i18n' | ||
const PROJECT = useProjectStore() | ||
const { t } = useI18n() | ||
const canvas = useCanvasTimeline() | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/better-write-app/src/components/page/editor/main/timeline/EditorBaseTimeline.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<div> | ||
<div id="bw-timeline" class="w-full wb-scroll overflow-auto"></div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useCanvasTimeline } from '@/use/canvas/timeline' | ||
import { onMounted } from 'vue' | ||
const timeline = useCanvasTimeline() | ||
onMounted(() => { | ||
timeline.start() | ||
}) | ||
</script> |
5 changes: 5 additions & 0 deletions
5
...es/better-write-app/src/components/page/editor/main/timeline/EditorBaseTimelineHeader.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div class="flex items-center h-10 w-full bg-theme-background-3"> | ||
<div></div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.