Skip to content

Commit

Permalink
feat: show drawing on overviews
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 13, 2021
1 parent c1f6a93 commit c34b0e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/client/internals/DrawingPreview.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup lang="ts">
import { drawingState } from '../logic/drawings'
defineProps<{page: number}>()
</script>

<template>
<svg
v-if="drawingState[page]"
ref="svg"
class="w-full h-full absolute top-0 pointer-events-none"
v-html="drawingState[page]"
></svg>
</template>
2 changes: 2 additions & 0 deletions packages/client/internals/SlidesOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { go as goSlide, rawRoutes } from '../logic/nav'
import { getSlideClass } from '../utils'
import SlideContainer from './SlideContainer.vue'
import SlideWrapper from './SlideWrapper'
import DrawingPreview from './DrawingPreview.vue'
const emit = defineEmits([])
const props = defineProps<{ modelValue: boolean }>()
Expand Down Expand Up @@ -59,6 +60,7 @@ const cardWidth = computed(() => {
:clicks-disabled="true"
class="pointer-events-none"
>
<DrawingPreview :page="+route.path" />
<SlideWrapper
:is="route?.component"
:clicks-disabled="true"
Expand Down

0 comments on commit c34b0e4

Please sign in to comment.