client: default instance ticker name to instance's domain name

Changelog: Fixed
This commit is contained in:
Johann150 2022-09-13 20:22:10 +02:00
parent 2c24f8a9ef
commit f4ee76d017
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
3 changed files with 5 additions and 3 deletions

View file

@ -1,7 +1,7 @@
<template> <template>
<div v-tooltip="instance.softwareName + ' ' + instance.softwareVersion" class="hpaizdrt" :style="bg"> <div v-tooltip="instance.softwareName + ' ' + instance.softwareVersion" class="hpaizdrt" :style="bg">
<img v-if="instance.faviconUrl" class="icon" :src="instance.faviconUrl"/> <img v-if="instance.faviconUrl" class="icon" :src="instance.faviconUrl"/>
<span class="name">{{ instance.name }}</span> <span class="name">{{ instance.name ?? host }}</span>
<span v-if="instance.softwareName" class="software">{{ instance.softwareName }}</span> <span v-if="instance.softwareName" class="software">{{ instance.softwareName }}</span>
</div> </div>
</template> </template>
@ -10,6 +10,8 @@
import { instanceName, version, software } from '@/config'; import { instanceName, version, software } from '@/config';
const props = defineProps<{ const props = defineProps<{
// null signifies localhost
host: string | null;
instance?: { instance?: {
faviconUrl?: string; faviconUrl?: string;
name: string; name: string;

View file

@ -43,7 +43,7 @@
</div> </div>
</div> </div>
<div class="username"><MkAcct :user="appearNote.user"/></div> <div class="username"><MkAcct :user="appearNote.user"/></div>
<MkInstanceTicker v-if="showTicker" class="ticker" :instance="appearNote.user.instance"/> <MkInstanceTicker v-if="showTicker" class="ticker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
</div> </div>
</header> </header>
<div class="main"> <div class="main">

View file

@ -34,7 +34,7 @@
<MkAvatar class="avatar" :user="appearNote.user"/> <MkAvatar class="avatar" :user="appearNote.user"/>
<div class="main"> <div class="main">
<XNoteHeader class="header" :note="appearNote" :mini="true"/> <XNoteHeader class="header" :note="appearNote" :mini="true"/>
<MkInstanceTicker v-if="showTicker" class="ticker" :instance="appearNote.user.instance"/> <MkInstanceTicker v-if="showTicker" class="ticker" :host="appearNote.user.host" :instance="appearNote.user.instance"/>
<div class="body"> <div class="body">
<p v-if="appearNote.cw != null" class="cw"> <p v-if="appearNote.cw != null" class="cw">
<Mfm v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/> <Mfm v-if="appearNote.cw != ''" class="text" :text="appearNote.cw" :author="appearNote.user" :i="$i" :custom-emojis="appearNote.emojis"/>