frontend: tweak instance ticker

This commit is contained in:
fly_mc 2024-11-14 00:14:17 +08:00
parent 15ed005013
commit 68502f61cc
4 changed files with 6 additions and 4 deletions

View file

@ -2838,4 +2838,4 @@ _selfXssPrevention:
description3: "For more information, please check here: {link}"
insertNewNotes: "Insert new notes at current position"
insertNewNotesDescription: "Insert new notes at the current position while scrolling timeline."
clickToShowInstanceTickerWindow: "Click instance ticker to show instance info"
clickToShowInstanceTickerWindow: "Click InstanceTicker to show instance info"

View file

@ -2838,4 +2838,4 @@ _selfXssPrevention:
description3: "详情请看这里。{link}"
insertNewNotes: "在当前位置插入新帖文"
insertNewNotesDescription: "將新收到的帖文插入到正在浏览的位置。"
clickToShowInstanceTickerWindow: "点击Instance ticker显示实例信息窗口"
clickToShowInstanceTickerWindow: "点击 InstanceTicker 显示实例信息窗口"

View file

@ -2837,4 +2837,4 @@ _selfXssPrevention:
description3: "細節請看這裡。{link}"
insertNewNotes: "在當前位置插入新貼文"
insertNewNotesDescription: "將剛剛收到的貼文插入到正在瀏覽的位置。"
clickToShowInstanceTickerWindow: "點擊Instance ticker顯示實例資訊視窗"
clickToShowInstanceTickerWindow: "點擊 InstanceTicker 顯示實例資訊視窗"

View file

@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div :class="$style.root" :style="bg" @click.stop="defaultStore.state.clickToShowInstanceTickerWindow && showInstanceTickerWindow">
<div :class="$style.root" :style="bg" @click.stop="showInstanceTickerWindow">
<img v-if="faviconUrl" :class="$style.icon" :src="faviconUrl"/>
<div :class="$style.name">{{ instance.name }}</div>
</div>
@ -43,6 +43,8 @@ const bg = {
};
function showInstanceTickerWindow() {
if (!defaultStore.state.clickToShowInstanceTickerWindow) return;
if (props.host) {
os.pageWindow(`/instance-info/${props.host}`);
} else {