mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 20:33:09 +02:00
enhance(frontend): federated instance icon with proxy (welcome entrance) (#12213)
This commit is contained in:
parent
afd3b5d472
commit
470a1c30e8
1 changed files with 6 additions and 1 deletions
|
@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MarqueeText :duration="40">
|
<MarqueeText :duration="40">
|
||||||
<MkA v-for="instance in instances" :key="instance.id" :class="$style.federationInstance" :to="`/instance-info/${instance.host}`" behavior="window">
|
<MkA v-for="instance in instances" :key="instance.id" :class="$style.federationInstance" :to="`/instance-info/${instance.host}`" behavior="window">
|
||||||
<!--<MkInstanceCardMini :instance="instance"/>-->
|
<!--<MkInstanceCardMini :instance="instance"/>-->
|
||||||
<img v-if="instance.iconUrl" class="icon" :src="instance.iconUrl" alt=""/>
|
<img v-if="instance.iconUrl" class="icon" :src="getInstanceIcon(instance)" alt=""/>
|
||||||
<span class="name _monospace">{{ instance.host }}</span>
|
<span class="name _monospace">{{ instance.host }}</span>
|
||||||
</MkA>
|
</MkA>
|
||||||
</MarqueeText>
|
</MarqueeText>
|
||||||
|
@ -46,10 +46,15 @@ import { instance } from '@/instance.js';
|
||||||
import number from '@/filters/number.js';
|
import number from '@/filters/number.js';
|
||||||
import MkNumber from '@/components/MkNumber.vue';
|
import MkNumber from '@/components/MkNumber.vue';
|
||||||
import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
|
import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
|
||||||
|
import { getProxiedImageUrl } from '@/scripts/media-proxy.js';
|
||||||
|
|
||||||
let meta = $ref<Misskey.entities.Instance>();
|
let meta = $ref<Misskey.entities.Instance>();
|
||||||
let instances = $ref<any[]>();
|
let instances = $ref<any[]>();
|
||||||
|
|
||||||
|
function getInstanceIcon(instance): string {
|
||||||
|
return getProxiedImageUrl(instance.iconUrl, 'preview');
|
||||||
|
}
|
||||||
|
|
||||||
os.api('meta', { detail: true }).then(_meta => {
|
os.api('meta', { detail: true }).then(_meta => {
|
||||||
meta = _meta;
|
meta = _meta;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue