mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
💄 帖子增加应用标识
This commit is contained in:
@@ -9,6 +9,9 @@
|
|||||||
<ToLoading v-model="loading" :empty="loadingEmpty" :title="loadingTitle" :subtitle="loadingSub" />
|
<ToLoading v-model="loading" :empty="loadingEmpty" :title="loadingTitle" :subtitle="loadingSub" />
|
||||||
<div class="mys-post-body">
|
<div class="mys-post-body">
|
||||||
<div class="mys-post-info">
|
<div class="mys-post-info">
|
||||||
|
<div class="tp-post-version">
|
||||||
|
PostID:{{ postId }} | Render by TeyvatGuide v{{ appVersion }}
|
||||||
|
</div>
|
||||||
<div class="mys-post-meta">
|
<div class="mys-post-meta">
|
||||||
<div class="mpm-forum" v-if="postRender.forum !== null">
|
<div class="mpm-forum" v-if="postRender.forum !== null">
|
||||||
<img :src="postRender.forum.icon" alt="forumIcon" />
|
<img :src="postRender.forum.icon" alt="forumIcon" />
|
||||||
@@ -68,6 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { app } from "@tauri-apps/api";
|
||||||
import { appWindow } from "@tauri-apps/api/window";
|
import { appWindow } from "@tauri-apps/api/window";
|
||||||
import { nextTick, onMounted, ref, watch } from "vue";
|
import { nextTick, onMounted, ref, watch } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
@@ -102,6 +106,7 @@ const postRef = ref<HTMLElement>(<HTMLElement>{});
|
|||||||
const shareTitle = ref<string>("");
|
const shareTitle = ref<string>("");
|
||||||
|
|
||||||
// 数据
|
// 数据
|
||||||
|
const appVersion = ref<string>();
|
||||||
const postId = Number(useRoute().params.post_id);
|
const postId = Number(useRoute().params.post_id);
|
||||||
const postHtml = ref<string>("");
|
const postHtml = ref<string>("");
|
||||||
const devRender = ref<boolean>(true);
|
const devRender = ref<boolean>(true);
|
||||||
@@ -125,11 +130,14 @@ const postRender = ref<PostRender>({
|
|||||||
reply_num: 0,
|
reply_num: 0,
|
||||||
like_num: 0,
|
like_num: 0,
|
||||||
forward_num: 0,
|
forward_num: 0,
|
||||||
|
original_like_num: 0,
|
||||||
|
post_upvote_stat: [],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await appWindow.show();
|
await appWindow.show();
|
||||||
|
appVersion.value = await app.getVersion();
|
||||||
// 检查数据
|
// 检查数据
|
||||||
if (!postId) {
|
if (!postId) {
|
||||||
loadingEmpty.value = true;
|
loadingEmpty.value = true;
|
||||||
@@ -239,6 +247,7 @@ function switchRender() {
|
|||||||
|
|
||||||
/* info */
|
/* info */
|
||||||
.mys-post-info {
|
.mys-post-info {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
align-items: end;
|
align-items: end;
|
||||||
@@ -247,6 +256,15 @@ function switchRender() {
|
|||||||
border-bottom: 1px dashed var(--common-shadow-2);
|
border-bottom: 1px dashed var(--common-shadow-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tp-post-version {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
color: var(--box-text-3);
|
||||||
|
font-family: var(--font-title);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
/* author */
|
/* author */
|
||||||
.mys-post-author {
|
.mys-post-author {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user