mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-09 11:41:30 -07:00
manual apply
Signed-off-by: limepotato <limepot@protonmail.ch>
This commit is contained in:
parent
59536e87bf
commit
0e2f8e9640
2 changed files with 10 additions and 2 deletions
|
@ -4,7 +4,6 @@
|
|||
v-tooltip="capitalize(instance.softwareName)"
|
||||
ref="ticker"
|
||||
:style="bg"
|
||||
@click.stop="os.pageWindow(instanceInfoUrl)"
|
||||
>
|
||||
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
||||
<span class="name">{{ instance.name }}</span>
|
||||
|
@ -15,7 +14,6 @@
|
|||
import { instanceName } from "@/config";
|
||||
import { instance as Instance } from "@/instance";
|
||||
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
||||
import * as os from "@/os";
|
||||
|
||||
const props = defineProps<{
|
||||
instance?: {
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
class="ticker"
|
||||
:instance="note.user.instance"
|
||||
:host="note.user.host"
|
||||
@click.stop="openServerInfo"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -56,10 +57,12 @@ import MkInstanceTicker from "@/components/MkInstanceTicker.vue";
|
|||
import { notePage } from "@/filters/note";
|
||||
import { userPage } from "@/filters/user";
|
||||
import { i18n } from "@/i18n";
|
||||
import { pageWindow } from "@/os";
|
||||
|
||||
const props = defineProps<{
|
||||
note: misskey.entities.Note;
|
||||
pinned?: boolean;
|
||||
canOpenServerInfo?: boolean;
|
||||
}>();
|
||||
|
||||
let note = $ref(props.note);
|
||||
|
@ -67,6 +70,13 @@ let note = $ref(props.note);
|
|||
const showTicker =
|
||||
defaultStore.state.instanceTicker === "always" ||
|
||||
(defaultStore.state.instanceTicker === "remote" && note.user.instance);
|
||||
|
||||
function openServerInfo() {
|
||||
if (props.canOpenServerInfo && !defaultStore.state.openServerInfo || !note.value.user.instance) return;
|
||||
const instanceInfoUrl =
|
||||
props.host == null ? "/about" : `/instance-info/${note.value.user.instance}`;
|
||||
pageWindow(instanceInfoUrl);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
Loading…
Reference in a new issue