mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
✨ 帖子收藏 #100
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<TSwitchTheme />
|
||||
<TSetCollect v-if="collectExist" :model-value="postId" :data="postData" />
|
||||
<TShareBtn
|
||||
v-show="!loadingEmpty"
|
||||
v-model="postRef"
|
||||
@@ -85,6 +86,7 @@ import { appWindow } from "@tauri-apps/api/window";
|
||||
import { nextTick, onMounted, onUnmounted, ref, watch } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import TSetCollect from "../components/app/t-setCollect.vue";
|
||||
import TSwitchTheme from "../components/app/t-switchTheme.vue";
|
||||
import TShareBtn from "../components/main/t-shareBtn.vue";
|
||||
import ToLoading from "../components/overlay/to-loading.vue";
|
||||
@@ -92,6 +94,7 @@ import TpAvatar from "../components/post/tp-avatar.vue";
|
||||
import TpParser from "../components/post/tp-parser.vue";
|
||||
import TpoCollection from "../components/post/tpo-collection.vue";
|
||||
import Mys from "../plugins/Mys";
|
||||
import TGSqlite from "../plugins/Sqlite";
|
||||
import { useAppStore } from "../store/modules/app";
|
||||
import TGClient from "../utils/TGClient";
|
||||
import TGLogger from "../utils/TGLogger";
|
||||
@@ -119,6 +122,7 @@ const shareTime = ref<number>(Math.floor(Date.now() / 1000));
|
||||
const shareTimeTimer = ref<any>();
|
||||
// 合集
|
||||
const showCollection = ref<boolean>(false);
|
||||
const collectExist = ref<boolean>(false);
|
||||
|
||||
onMounted(async () => {
|
||||
await appWindow.show();
|
||||
@@ -160,6 +164,7 @@ onMounted(async () => {
|
||||
await TGLogger.Info(`[t-post][${postId}][onMounted] 打开 JSON 窗口`);
|
||||
createPostJson(postId);
|
||||
}
|
||||
collectExist.value = await TGSqlite.checkTableExist("UserCollection");
|
||||
await nextTick(() => {
|
||||
shareTimeTimer.value = setInterval(() => {
|
||||
shareTime.value = Math.floor(Date.now() / 1000);
|
||||
|
||||
Reference in New Issue
Block a user