mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-22 08:38:41 -06:00
fix(frontend-embed): 型チェックエラーを修正 (#15216)
* fix(frontend): frontend / frontend-embedにあるtsconfig.jsonのmoduleをES2022にする * fixed errors * fixed errors * fixed errors * fix(frontend-embed): 型チェックエラーを修正
This commit is contained in:
parent
bb4457266d
commit
13439e04c4
3 changed files with 16 additions and 12 deletions
|
@ -415,8 +415,6 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
|
||||||
return [h(EmEmoji, {
|
return [h(EmEmoji, {
|
||||||
key: Math.random(),
|
key: Math.random(),
|
||||||
emoji: token.props.emoji,
|
emoji: token.props.emoji,
|
||||||
menu: props.enableEmojiMenu,
|
|
||||||
menuReaction: props.enableEmojiMenuReaction,
|
|
||||||
})];
|
})];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template #default="{ items: notes }">
|
<template #default="{ items: notes }">
|
||||||
<div :class="[$style.root]">
|
<div :class="[$style.root]">
|
||||||
<EmNote v-for="note in notes" :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note"/>
|
<EmNote v-for="note in notes" :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note as Misskey.entities.Note"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</EmPagination>
|
</EmPagination>
|
||||||
|
@ -24,6 +24,7 @@ import { useTemplateRef } from 'vue';
|
||||||
import EmNote from '@/components/EmNote.vue';
|
import EmNote from '@/components/EmNote.vue';
|
||||||
import EmPagination, { Paging } from '@/components/EmPagination.vue';
|
import EmPagination, { Paging } from '@/components/EmPagination.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
|
|
||||||
withDefaults(defineProps<{
|
withDefaults(defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
|
|
|
@ -75,8 +75,12 @@ function compile(theme: Theme): Record<string, string> {
|
||||||
return getColor(theme.props[val]);
|
return getColor(theme.props[val]);
|
||||||
} else if (val[0] === ':') { // func
|
} else if (val[0] === ':') { // func
|
||||||
const parts = val.split('<');
|
const parts = val.split('<');
|
||||||
const func = parts.shift().substring(1);
|
const funcTxt = parts.shift();
|
||||||
const arg = parseFloat(parts.shift());
|
const argTxt = parts.shift();
|
||||||
|
|
||||||
|
if (funcTxt && argTxt) {
|
||||||
|
const func = funcTxt.substring(1);
|
||||||
|
const arg = parseFloat(argTxt);
|
||||||
const color = getColor(parts.join('<'));
|
const color = getColor(parts.join('<'));
|
||||||
|
|
||||||
switch (func) {
|
switch (func) {
|
||||||
|
@ -87,6 +91,7 @@ function compile(theme: Theme): Record<string, string> {
|
||||||
case 'saturate': return color.saturate(arg);
|
case 'saturate': return color.saturate(arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// other case
|
// other case
|
||||||
return tinycolor(val);
|
return tinycolor(val);
|
||||||
|
|
Loading…
Reference in a new issue