代替ダイアログを無効化

This commit is contained in:
hijiki 2024-10-19 00:15:02 +09:00
parent 674fd13807
commit d80665fb2b

View File

@ -787,31 +787,6 @@ async function post(ev?: MouseEvent) {
} }
} }
if (defaultStore.state.warnMissingAltText) {
const filesData = toRaw(files.value);
const isMissingAltText = filesData.filter(
file => file.type.startsWith('image/') || file.type.startsWith('video/') || file.type.startsWith('audio/')
).some(file => !file.comment);
if (isMissingAltText) {
const { canceled, result } = await os.actions({
type: 'warning',
text: i18n.ts.thisPostIsMissingAltText,
actions: [{
value: 'cancel',
text: i18n.ts.thisPostIsMissingAltTextCancel,
}, {
value: 'ignore',
text: i18n.ts.thisPostIsMissingAltTextIgnore,
}],
});
if (canceled) return;
if (result === 'cancel') return;
}
}
let postData = { let postData = {
text: text.value === '' ? null : text.value, text: text.value === '' ? null : text.value,
fileIds: files.value.length > 0 ? files.value.map(f => f.id) : undefined, fileIds: files.value.length > 0 ? files.value.map(f => f.id) : undefined,