feat: open instance info by clicking the ticker (close #68)
This commit is contained in:
parent
26d19f3f31
commit
c9965758e7
3 changed files with 8 additions and 0 deletions
|
@ -32,6 +32,7 @@
|
|||
|
||||
## 細かい変更点
|
||||
|
||||
- 投稿中に表示されるインスタンスティッカーをクリックするとサーバー情報を開くように
|
||||
- サーバー設定の初期値を変更
|
||||
- 新規登録を無効化
|
||||
- サーバーメトリクスの表示を有効化
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"
|
||||
class="hpaizdrt"
|
||||
:style="bg"
|
||||
@click.stop="os.pageWindow(instanceInfoUrl)"
|
||||
>
|
||||
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
||||
<span class="name">{{ instance.name }}</span>
|
||||
|
@ -18,6 +19,7 @@ import { ref } from "vue";
|
|||
import { instanceName, version } from "@/config";
|
||||
import { instance as Instance } from "@/instance";
|
||||
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
||||
import * as os from "@/os";
|
||||
|
||||
const props = defineProps<{
|
||||
instance?: {
|
||||
|
@ -27,6 +29,7 @@ const props = defineProps<{
|
|||
softwareName?: string;
|
||||
softwareVersion?: string;
|
||||
};
|
||||
host: string | null;
|
||||
}>();
|
||||
|
||||
const ticker = ref<HTMLElement | null>(null);
|
||||
|
@ -44,6 +47,9 @@ const instance = props.instance ?? {
|
|||
softwareVersion: version,
|
||||
};
|
||||
|
||||
const instanceInfoUrl =
|
||||
props.host == null ? "/about" : `/instance-info/${props.host}`;
|
||||
|
||||
const commonNames = new Map<string, string>([
|
||||
["birdsitelive", "BirdsiteLIVE"],
|
||||
["bookwyrm", "BookWyrm"],
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
v-if="showTicker"
|
||||
class="ticker"
|
||||
:instance="note.user.instance"
|
||||
:host="note.user.host"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue