style: prioritize favicons over icons

This commit is contained in:
naskya 2024-02-08 22:20:34 +09:00
parent c1d9923616
commit d518bdea29
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
9 changed files with 9 additions and 9 deletions

View file

@ -49,8 +49,8 @@ os.apiGet("charts/instance", {
function getInstanceIcon(instance): string { function getInstanceIcon(instance): string {
return ( return (
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
getProxiedImageUrlNullable(instance.faviconUrl, "preview") ?? getProxiedImageUrlNullable(instance.faviconUrl, "preview") ??
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
"/client-assets/dummy.png" "/client-assets/dummy.png"
); );
} }

View file

@ -30,7 +30,7 @@ const ticker = ref<HTMLElement | null>(null);
// if no instance data is given, this is for the local instance // if no instance data is given, this is for the local instance
const instance = props.instance ?? { const instance = props.instance ?? {
faviconUrl: Instance.iconUrl || Instance.faviconUrl || "/favicon.ico", faviconUrl: Instance.faviconUrl || Instance.iconUrl || "/favicon.ico",
name: instanceName, name: instanceName,
themeColor: ( themeColor: (
document.querySelector( document.querySelector(

View file

@ -209,7 +209,7 @@ withDefaults(
const stats = ref(null); const stats = ref(null);
const instanceIcon = ref<HTMLImageElement>(); const instanceIcon = ref<HTMLImageElement>();
let iconClicks = 0; let iconClicks = 0;
const iconSrc = ref(instance.iconUrl || instance.faviconUrl || "/favicon.ico"); const iconSrc = ref(instance.faviconUrl || instance.iconUrl || "/favicon.ico");
const instanceIconAnimation = ref(""); const instanceIconAnimation = ref("");
const tabs = ["overview", "emojis", "charts"]; const tabs = ["overview", "emojis", "charts"];
const tab = ref(tabs[0]); const tab = ref(tabs[0]);

View file

@ -17,8 +17,8 @@
<div class="main"> <div class="main">
<img <img
:src=" :src="
instance.iconUrl ||
instance.faviconUrl || instance.faviconUrl ||
instance.iconUrl ||
'/favicon.ico' '/favicon.ico'
" "
alt="" alt=""

View file

@ -135,7 +135,7 @@
></i> ></i>
</button> </button>
<!-- <button v-click-anime v-tooltip.noDelay.right="$instance.name ?? i18n.ts.instance" class="item _button instance" @click="openInstanceMenu"> <!-- <button v-click-anime v-tooltip.noDelay.right="$instance.name ?? i18n.ts.instance" class="item _button instance" @click="openInstanceMenu">
<img :src="$instance.iconUrl || $instance.faviconUrl || '/favicon.ico'" alt="" class="icon"/> <img :src="$instance.faviconUrl || $instance.iconUrl || '/favicon.ico'" alt="" class="icon"/>
</button> --> </button> -->
<!-- <button v-click-anime v-tooltip.noDelay.right="`${i18n.ts.account}: @${$i.username}`" class="item _button account" @click="openAccountMenu"> <!-- <button v-click-anime v-tooltip.noDelay.right="`${i18n.ts.account}: @${$i.username}`" class="item _button account" @click="openAccountMenu">
<MkAvatar :user="$i" class="account"/><MkAcct class="text" :user="$i"/> <MkAvatar :user="$i" class="account"/><MkAcct class="text" :user="$i"/>

View file

@ -77,8 +77,8 @@ useInterval(tick, Math.max(5000, props.refreshIntervalSec * 1000), {
function getInstanceIcon(instance): string { function getInstanceIcon(instance): string {
return ( return (
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
getProxiedImageUrlNullable(instance.faviconUrl, "preview") ?? getProxiedImageUrlNullable(instance.faviconUrl, "preview") ??
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
"/client-assets/dummy.png" "/client-assets/dummy.png"
); );
} }

View file

@ -119,8 +119,8 @@ useInterval(fetch, 1000 * 60, {
function getInstanceIcon(instance): string { function getInstanceIcon(instance): string {
return ( return (
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
getProxiedImageUrlNullable(instance.faviconUrl, "preview") ?? getProxiedImageUrlNullable(instance.faviconUrl, "preview") ??
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
"/client-assets/dummy.png" "/client-assets/dummy.png"
); );
} }

View file

@ -81,8 +81,8 @@ useInterval(
function getInstanceIcon(instance): string { function getInstanceIcon(instance): string {
return ( return (
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
getProxiedImageUrlNullable(instance.faviconUrl, "preview") ?? getProxiedImageUrlNullable(instance.faviconUrl, "preview") ??
getProxiedImageUrlNullable(instance.iconUrl, "preview") ??
"/client-assets/dummy.png" "/client-assets/dummy.png"
); );
} }

View file

@ -9,8 +9,8 @@
<div :class="$style.iconContainer"> <div :class="$style.iconContainer">
<img <img
:src=" :src="
$instance.iconUrl ||
$instance.faviconUrl || $instance.faviconUrl ||
$instance.iconUrl ||
'/favicon.ico' '/favicon.ico'
" "
alt="Instance logo" alt="Instance logo"