Skip to content

Commit 8eb6aff

Browse files
Merge pull request #88 from VortexExpansion/preview-favorite
implement my_favorite_flg in Topics::preview
2 parents 8af94d8 + cc4a574 commit 8eb6aff

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pages/preview/topics_detail.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
</v-col>
1818
</v-row>
1919
</div>
20+
<!-- For favorite -->
21+
<div class="text-right mt-2">
22+
<div>{{ topicsDetail.inst_ymdhi.slice(0, 10) }}</div>
23+
<v-btn icon variant="text" :color="favoriteColor">
24+
<v-icon size="x-large" left> mdi-star </v-icon>
25+
</v-btn>
26+
</div>
2027
</div>
2128

2229
<!-- Wysiwyg contents -->
@@ -51,6 +58,7 @@ const preview_token = route.query.preview_token;
5158
const topicsDetail = ref(null);
5259
const loading = ref(true);
5360
const snackbar = useSnackbar();
61+
const favoriteColor = ref('grey');
5462
5563
const items = computed(() => {
5664
if (!topicsDetail.value) {
@@ -75,6 +83,7 @@ try {
7583
server: false
7684
});
7785
const d = response.details;
86+
favoriteColor.value = d.my_favorite_flg === true ? 'red' : 'grey';
7887
topicsDetail.value = {
7988
...d,
8089
fileType: d?.ext_1?.key,

0 commit comments

Comments
 (0)