add: custom like emoji per instance, fix like

This fixes the fact that likes on mastodon didn't get federated properly and let's instance admins choose a custom emoji
This commit is contained in:
Mar0xy 2023-11-12 22:16:47 +01:00
parent 1f8c12b984
commit 5c38e6b824
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
13 changed files with 97 additions and 12 deletions

View file

@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:ad="true"
:class="$style.notes"
>
<MkNote :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note"/>
<MkNote :key="note._featuredId_ || note._prId_ || note.id" :meta="meta" :class="$style.note" :note="note"/>
</MkDateSeparatedList>
</div>
</template>
@ -33,11 +33,13 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { shallowRef } from 'vue';
import * as Misskey from 'misskey-js';
import MkNote from '@/components/MkNote.vue';
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
import MkPagination, { Paging } from '@/components/MkPagination.vue';
import { i18n } from '@/i18n.js';
import { infoImageUrl } from '@/instance.js';
import * as os from '@/os.js';
const props = defineProps<{
pagination: Paging;
@ -45,6 +47,12 @@ const props = defineProps<{
disableAutoLoad?: boolean;
}>();
let meta = $ref<Misskey.entities.LiteInstanceMetadata>() as Misskey.entities.LiteInstanceMetadata;
os.api('meta', { detail: false }).then(res => {
meta = res as unknown as Misskey.entities.LiteInstanceMetadata;
});
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
defineExpose({