🎨 优化链接跳转,调整UI

This commit is contained in:
目棃
2024-11-17 10:47:25 +08:00
parent c7b5bf34ef
commit 4bc1808478
7 changed files with 107 additions and 52 deletions

View File

@@ -10,8 +10,7 @@
PostID{{ postId }} | Render by TeyvatGuide v{{ appVersion }}
</div>
<div class="tp-post-meta">
<!-- todo 点击跳转 -->
<div class="mpm-forum" v-if="postData.forum">
<div class="mpm-forum" v-if="postData.forum" @click="toForum(postData.forum)">
<img :src="getGameIcon(postData.forum.game_id)" alt="gameIcon" />
<img :src="postData.forum.icon" alt="forumIcon" />
<span>{{ postData.forum.name }}</span>
@@ -246,6 +245,10 @@ async function toPost(): Promise<void> {
await TGClient.open("web_thin", url);
}
async function toForum(forum: TGApp.Plugins.Mys.Post.Forum): Promise<void> {
await emit("active_deep_link", `router?path=/posts/forum/${forum.game_id}/${forum.id}`);
}
onUnmounted(() => {
if (shareTimeTimer.value !== undefined) {
clearInterval(shareTimeTimer.value);
@@ -339,6 +342,7 @@ onUnmounted(() => {
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.mpm-forum img {
@@ -400,5 +404,9 @@ onUnmounted(() => {
cursor: pointer;
font-family: var(--font-title);
font-size: 12px;
&:hover {
color: var(--box-text-3);
}
}
</style>