Compare commits

...

4 commits

Author SHA1 Message Date
dakkar
4ead2eb7f1 merge: allow custom oneko image via themes - fixes #472 (!478)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/478

Closes #472
2024-04-04 00:26:12 +00:00
Marie
8c955fcce5 merge: use correct note design in favorites page - fixes #483 (!481)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/481

Closes #483

Approved-by: Amelia Yukii <amelia.yukii@shourai.de>
Approved-by: Marie <marie@kaifa.ch>
2024-04-03 09:28:01 +00:00
dakkar
bd7c4f66f3 use correct note design in favorites page - fixes #483 2024-03-27 16:03:35 +00:00
dakkar
74362af828 allow custom oneko image via themes - fixes #472
after this change, one can set a custom image by:

* upload an appropriate image to the drive (some images can be
  found at
	https://github.com/vencordcss/onekocord/tree/main/onekoskins),
	possibly with the "keep original" option set
* copy the URL to the image in the drive
* create/edit a theme so that it contains (inside `props`):

     "oneko-image": '"url(https://yourinstance.example.com/files/ee17b385-a084-4e2a-b531-225dfb96cc3c)',

  with the proper URL

That's it!
2024-03-23 12:19:13 +00:00
3 changed files with 9 additions and 4 deletions

View file

@ -55,8 +55,6 @@ import { i18n } from '@/i18n.js';
import { infoImageUrl } from '@/instance.js';
import { defaultStore } from '@/store.js';
console.log(defaultStore.state.noteDesign, defaultStore.state.noteDesign === 'sharkey');
const props = defineProps<{
pagination: Paging;
noGap?: boolean;

View file

@ -235,6 +235,6 @@ onMounted(init);
pointer-events: none;
image-rendering: pixelated;
z-index: 2147483647;
background-image: url(/client-assets/oneko.gif);
background-image: var(--oneko-image, url(/client-assets/oneko.gif));
}
</style>

View file

@ -16,9 +16,14 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<template #default="{ items }">
<MkDateSeparatedList v-slot="{ item }" :items="items" :direction="'down'" :noGap="false" :ad="false">
<MkDateSeparatedList v-if="defaultStore.state.noteDesign === 'misskey'"
v-slot="{ item }" :items="items" :direction="'down'" :noGap="false" :ad="false">
<MkNote :key="item.id" :note="item.note" :class="$style.note"/>
</MkDateSeparatedList>
<MkDateSeparatedList v-if="defaultStore.state.noteDesign === 'sharkey'"
v-slot="{ item }" :items="items" :direction="'down'" :noGap="false" :ad="false">
<SkNote :key="item.id" :note="item.note" :class="$style.note"/>
</MkDateSeparatedList>
</template>
</MkPagination>
</MkSpacer>
@ -28,10 +33,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import MkPagination from '@/components/MkPagination.vue';
import MkNote from '@/components/MkNote.vue';
import SkNote from '@/components/SkNote.vue';
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { infoImageUrl } from '@/instance.js';
import { defaultStore } from '@/store.js';
const pagination = {
endpoint: 'i/favorites' as const,