1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-26 06:44:55 +02:00

Update room.object-customize-form.vue

This commit is contained in:
syuilo
2026-05-25 12:48:04 +09:00
parent fc6a840132
commit 2d8c6ca585

View File

@@ -8,6 +8,11 @@ SPDX-License-Identifier: AGPL-3.0-only
<div class="_gaps_s">
<MkFolder v-for="[k, s] in Object.entries(schema)" :key="k">
<template #label>{{ s.label }}</template>
<template #suffix>
<span v-if="s.type === 'color'" :style="{ color: getHex(options[k]) }"></span>
<span v-else-if="s.type === 'material'" :style="{ color: getHex(options[k].color) }"></span>
</template>
<div v-if="s.type === 'color'">
<!-- debounce or throttleしないとカラーピッカー上で高速でなぞったときになぜか無限ループになるワーカーとの間でラグがあるため少し前の値がまたmodelValueとしてフィードバックされてしまうためだと思われる -->
<MkInput :modelValue="getHex(options[k])" type="color" :throttle="300" @update:modelValue="v => { const c = getRgb(v); if (c != null) emit('update', k, c); }"></MkInput>