diff options
| author | Mar0xy <marie@kaifa.ch> | 2023-11-12 22:16:47 +0100 |
|---|---|---|
| committer | Mar0xy <marie@kaifa.ch> | 2023-11-12 22:16:47 +0100 |
| commit | 5c38e6b824053a9d94e025f3836557acf8bbebad (patch) | |
| tree | 28250c087ea73c31b90c71879974e7cd72b2f32c /packages/frontend/src/components/MkNotes.vue | |
| parent | fix: use a proper function (diff) | |
| download | sharkey-5c38e6b824053a9d94e025f3836557acf8bbebad.tar.gz sharkey-5c38e6b824053a9d94e025f3836557acf8bbebad.tar.bz2 sharkey-5c38e6b824053a9d94e025f3836557acf8bbebad.zip | |
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
Diffstat (limited to 'packages/frontend/src/components/MkNotes.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNotes.vue | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/frontend/src/components/MkNotes.vue b/packages/frontend/src/components/MkNotes.vue index 76587ce141..926c99143d 100644 --- a/packages/frontend/src/components/MkNotes.vue +++ b/packages/frontend/src/components/MkNotes.vue @@ -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({ |