fix(general): flash/create
でPlayの公開範囲を指定できない問題の修正と編集画面の調整 (#13574)
* fix(backend): param `visibility` wasn't included in `flash/create` * fix(frontend): tweak flash editor ui * Update CHANGELOG.md
This commit is contained in:
@@ -18,16 +18,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
<MkCodeEditor v-model="script" lang="is">
|
||||
<template #label>{{ i18n.ts._play.script }}</template>
|
||||
</MkCodeEditor>
|
||||
<MkSelect v-model="visibility">
|
||||
<template #label>{{ i18n.ts.visibility }}</template>
|
||||
<template #caption>{{ i18n.ts._play.visibilityDescription }}</template>
|
||||
<option :key="'public'" :value="'public'">{{ i18n.ts.public }}</option>
|
||||
<option :key="'private'" :value="'private'">{{ i18n.ts.private }}</option>
|
||||
</MkSelect>
|
||||
<div class="_buttons">
|
||||
<MkButton primary @click="save"><i class="ti ti-check"></i> {{ i18n.ts.save }}</MkButton>
|
||||
<MkButton @click="show"><i class="ti ti-eye"></i> {{ i18n.ts.show }}</MkButton>
|
||||
<MkButton v-if="flash" danger @click="del"><i class="ti ti-trash"></i> {{ i18n.ts.delete }}</MkButton>
|
||||
</div>
|
||||
<MkSelect v-model="visibility">
|
||||
<template #label>{{ i18n.ts.visibility }}</template>
|
||||
<option :key="'public'" :value="'public'">{{ i18n.ts.public }}</option>
|
||||
<option :key="'private'" :value="'private'">{{ i18n.ts.private }}</option>
|
||||
</MkSelect>
|
||||
</div>
|
||||
</MkSpacer>
|
||||
</MkStickyContainer>
|
||||
@@ -367,7 +368,7 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const flash = ref<Misskey.entities.Flash | null>(null);
|
||||
const visibility = ref<Misskey.entities.FlashUpdateRequest['visibility']>('public');
|
||||
const visibility = ref<'private' | 'public'>('public');
|
||||
|
||||
if (props.id) {
|
||||
flash.value = await misskeyApi('flash/show', {
|
||||
@@ -420,6 +421,7 @@ async function save() {
|
||||
summary: summary.value,
|
||||
permissions: permissions.value,
|
||||
script: script.value,
|
||||
visibility: visibility.value,
|
||||
});
|
||||
router.push('/play/' + created.id + '/edit');
|
||||
}
|
||||
|
Reference in New Issue
Block a user