aboutsummaryrefslogtreecommitdiff
path: root/viewer
diff options
context:
space:
mode:
Diffstat (limited to 'viewer')
-rw-r--r--viewer/src/components/LdInformation.vue15
1 files changed, 7 insertions, 8 deletions
diff --git a/viewer/src/components/LdInformation.vue b/viewer/src/components/LdInformation.vue
index b161485..68e1817 100644
--- a/viewer/src/components/LdInformation.vue
+++ b/viewer/src/components/LdInformation.vue
@@ -21,16 +21,20 @@
21 <div v-if="item" class="flex-column" :class="$style.infopanel"> 21 <div v-if="item" class="flex-column" :class="$style.infopanel">
22 <div v-if="item.title" :class="$style.title">{{ item.title }}</div> 22 <div v-if="item.title" :class="$style.title">{{ item.title }}</div>
23 <time v-if="item.datetime" :datetime="item.datetime" :class="$style.datetime">{{ formatDate }}</time> 23 <time v-if="item.datetime" :datetime="item.datetime" :class="$style.datetime">{{ formatDate }}</time>
24 <div v-if="item.description" :class="$style.description" v-html="formatDescription" /> 24 <Markdown v-if="item.description" :class="$style.description" :markdown="item.description" />
25 </div> 25 </div>
26</template> 26</template>
27 27
28<script lang="ts"> 28<script lang="ts">
29import { Item } from "@/@types/gallery"; 29import { Item } from "@/@types/gallery";
30import marked from "marked"; 30import { Markdown } from "@/components/async";
31import { Component, Prop, Vue } from "vue-property-decorator"; 31import { Component, Prop, Vue } from "vue-property-decorator";
32 32
33@Component 33@Component({
34 components: {
35 Markdown,
36 },
37})
34export default class LdInformation extends Vue { 38export default class LdInformation extends Vue {
35 @Prop({ required: true }) readonly item!: Item; 39 @Prop({ required: true }) readonly item!: Item;
36 40
@@ -39,11 +43,6 @@ export default class LdInformation extends Vue {
39 const time = this.item.datetime.substr(11, 5); 43 const time = this.item.datetime.substr(11, 5);
40 return `${date} ${time}`; 44 return `${date} ${time}`;
41 } 45 }
42
43 get formatDescription() {
44 if (!this.item.description) return "";
45 return marked(this.item.description);
46 }
47} 46}
48</script> 47</script>
49 48