refactor
This commit is contained in:
parent
18e42cc83d
commit
7000095b44
|
@ -8,7 +8,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<div v-for="v, k in paramDefs" :key="k">
|
<div v-for="v, k in paramDefs" :key="k">
|
||||||
<MkSwitch
|
<MkSwitch
|
||||||
v-if="v.type === 'boolean'"
|
v-if="v.type === 'boolean'"
|
||||||
v-model="params[k]">
|
v-model="params[k]"
|
||||||
|
>
|
||||||
<template #label>{{ v.label ?? k }}</template>
|
<template #label>{{ v.label ?? k }}</template>
|
||||||
<template v-if="v.caption != null" #caption>{{ v.caption }}</template>
|
<template v-if="v.caption != null" #caption>{{ v.caption }}</template>
|
||||||
</MkSwitch>
|
</MkSwitch>
|
||||||
|
@ -53,12 +54,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import type { ImageEffectorRGB, ImageEffectorFxParamDefs } from '@/utility/image-effector/ImageEffector.js';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkRadios from '@/components/MkRadios.vue';
|
import MkRadios from '@/components/MkRadios.vue';
|
||||||
import MkSwitch from '@/components/MkSwitch.vue';
|
import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import MkRange from '@/components/MkRange.vue';
|
import MkRange from '@/components/MkRange.vue';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import type { ImageEffectorRGB, ImageEffectorFxParamDefs } from '@/utility/image-effector/ImageEffector.js';
|
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
paramDefs: ImageEffectorFxParamDefs;
|
paramDefs: ImageEffectorFxParamDefs;
|
||||||
|
|
|
@ -44,10 +44,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
type SupportedTypes = 'text' | 'password' | 'email' | 'url' | 'tel' | 'number' | 'search';
|
type SupportedTypes = 'text' | 'password' | 'email' | 'url' | 'tel' | 'number' | 'search' | 'color';
|
||||||
type ModelValueType<T extends SupportedTypes> =
|
type ModelValueType<T extends SupportedTypes> =
|
||||||
T extends 'number' ? number :
|
T extends 'number' ? number :
|
||||||
T extends 'text' | 'password' | 'email' | 'url' | 'tel' | 'search' ? string :
|
T extends 'text' | 'password' | 'email' | 'url' | 'tel' | 'search' | 'color' ? string :
|
||||||
never;
|
never;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="cellType === 'image'">
|
<div v-else-if="cellType === 'image'">
|
||||||
<img
|
<img
|
||||||
|
v-if="cell.value && typeof cell.value === 'string'"
|
||||||
:src="cell.value"
|
:src="cell.value"
|
||||||
:alt="cell.value"
|
:alt="cell.value"
|
||||||
:class="$style.viewImage"
|
:class="$style.viewImage"
|
||||||
|
|
|
@ -209,7 +209,7 @@ const XTimeline = defineAsyncComponent(() => import('./index.timeline.vue'));
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: Misskey.entities.UserDetailed;
|
user: Misskey.entities.UserDetailed;
|
||||||
/** Test only; MkNotesTimeline currently causes problems in vitest */
|
/** Test only; MkNotesTimeline currently causes problems in vitest */
|
||||||
disableNotes: boolean;
|
disableNotes?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
disableNotes: false,
|
disableNotes: false,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue