Skip to content

Commit

Permalink
Add duration for html viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Aug 30, 2023
1 parent 9cdde65 commit b1467dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/renderer/src/components/HTMLViewer.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed } from 'vue';
import { FolioFile } from '../../../main/src/DirWatcher';
import { delay, getURLForFile } from '../util';
import { delay, getDurationTag, getURLForFile } from '../util';
const props = defineProps<{
file: FolioFile
Expand All @@ -19,14 +19,16 @@ async function prepare() {
}
async function display() {
await delay(20000);
await delay(duration.value);
}
defineExpose({
prepare,
display,
});
const duration = computed(() => getDurationTag(props.file.name) ?? 20000);
const url = computed(() => getURLForFile(props.file));
</script>

Expand Down

0 comments on commit b1467dd

Please sign in to comment.