client: use configurable images

This commit is contained in:
Johann150 2022-12-12 20:00:05 +01:00
parent 5ea744b1b2
commit 6a26da3516
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
12 changed files with 23 additions and 12 deletions

View file

@ -1,7 +1,7 @@
<template>
<transition :name="defaultStore.state.animation ? 'zoom' : ''" appear>
<div class="mjndxjcg">
<img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
<img :src="instance.images.error" class="_ghost"/>
<p><i class="fas fa-exclamation-triangle"></i> {{ i18n.ts.somethingHappened }}</p>
<MkButton v-if="!final" class="button" @click="retry">{{ i18n.ts.retry }}</MkButton>
</div>
@ -12,6 +12,7 @@
import MkButton from '@/components/ui/button.vue';
import { i18n } from '@/i18n';
import { defaultStore } from '@/store';
import { instance } from '@/instance';
const emit = defineEmits<{
(ev: 'retry'): void;

View file

@ -2,7 +2,7 @@
<MkPagination ref="pagingComponent" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.noNotes }}</div>
</div>
</template>
@ -23,6 +23,7 @@ import XNote from '@/components/note.vue';
import XList from '@/components/date-separated-list.vue';
import MkPagination, { Paging } from '@/components/ui/pagination.vue';
import { i18n } from '@/i18n';
import { instance } from '@/instance';
defineProps<{
pagination: Paging;

View file

@ -2,7 +2,7 @@
<MkPagination ref="pagingComponent" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.noNotifications }}</div>
</div>
</template>
@ -26,6 +26,7 @@ import XNote from '@/components/note.vue';
import { stream } from '@/stream';
import { $i } from '@/account';
import { i18n } from '@/i18n';
import { instance } from '@/instance';
const props = defineProps<{
includeTypes?: typeof notificationTypes[number][];

View file

@ -7,7 +7,7 @@
<div v-else-if="empty" key="_empty_" class="empty">
<slot name="empty">
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.nothing }}</div>
</div>
</slot>
@ -38,6 +38,7 @@ import * as os from '@/os';
import { onScrollTop, isTopVisible, getScrollPosition, getScrollContainer } from '@/scripts/scroll';
import MkButton from '@/components/ui/button.vue';
import { i18n } from '@/i18n';
import { instance } from '@/instance';
export type Paging<E extends keyof foundkey.Endpoints = keyof foundkey.Endpoints> = {
endpoint: E;

View file

@ -2,7 +2,7 @@
<MkPagination ref="pagingComponent" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.noUsers }}</div>
</div>
</template>
@ -20,6 +20,7 @@ import { ref } from 'vue';
import MkUserInfo from '@/components/user-info.vue';
import MkPagination, { Paging } from '@/components/ui/pagination.vue';
import { i18n } from '@/i18n';
import { instance } from '@/instance';
defineProps<{
pagination: Paging;

View file

@ -2,7 +2,7 @@
<MkLoading v-if="!loaded"/>
<transition :name="$store.state.animation ? 'zoom' : ''" appear>
<div v-show="loaded" class="mjndxjch">
<img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
<img :src="instance.images.error" class="_ghost"/>
<p><b><i class="fas fa-exclamation-triangle"></i> {{ i18n.ts.pageLoadError }}</b></p>
<p v-if="version === instance.version">{{ i18n.ts.pageLoadErrorDescription }}</p>
<p v-else-if="serverIsDead">{{ i18n.ts.serverIsDead }}</p>

View file

@ -5,7 +5,7 @@
<MkPagination ref="pagingComponent" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.noNotes }}</div>
</div>
</template>
@ -27,6 +27,7 @@ import XNote from '@/components/note.vue';
import XList from '@/components/date-separated-list.vue';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import { instance } from '@/instance';
const pagination = {
endpoint: 'i/favorites' as const,

View file

@ -3,7 +3,7 @@
<MkPagination ref="paginationComponent" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.noFollowRequests }}</div>
</div>
</template>
@ -38,6 +38,7 @@ import { userPage, acct } from '@/filters/user';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import { instance } from '@/instance';
const paginationComponent = ref<InstanceType<typeof MkPagination>>();

View file

@ -33,7 +33,7 @@
</MkA>
</div>
<div v-if="!fetching && messages.length == 0" class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.noHistory }}</div>
</div>
<MkLoading v-if="fetching"/>
@ -53,6 +53,7 @@ import { useRouter } from '@/router';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import { $i } from '@/account';
import { instance } from '@/instance';
const router = useRouter();

View file

@ -10,7 +10,7 @@
<MkPagination v-if="pagination" ref="pagingComponent" :key="userAcct || groupId" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.noMessagesYet }}</div>
</div>
</template>
@ -65,6 +65,7 @@ import { i18n } from '@/i18n';
import { $i } from '@/account';
import { defaultStore } from '@/store';
import { definePageMetadata } from '@/scripts/page-metadata';
import { instance } from '@/instance';
const props = defineProps<{
userAcct?: string;

View file

@ -1,7 +1,7 @@
<template>
<div class="ipledcug">
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/not-found.jpg" class="_ghost"/>
<img :src="instance.images.notFound" class="_ghost"/>
<div>{{ i18n.ts.notFoundDescription }}</div>
</div>
</div>
@ -10,6 +10,7 @@
<script lang="ts" setup>
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import { instance } from '@/instance';
definePageMetadata({
title: i18n.ts.notFound,

View file

@ -3,7 +3,7 @@
<FormPagination ref="list" :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img src="https://xn--931a.moe/assets/info.jpg" class="_ghost"/>
<img :src="instance.images.info" class="_ghost"/>
<div>{{ i18n.ts.nothing }}</div>
</div>
</template>
@ -43,6 +43,7 @@ import FormPagination from '@/components/ui/pagination.vue';
import * as os from '@/os';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import { instance } from '@/instance';
const list = ref<any>(null);