diff options
| author | anatawa12 <anatawa12@icloud.com> | 2024-05-27 20:54:53 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-27 20:54:53 +0900 |
| commit | 4579be0f5401001bcfc27c4d56133cc910f3f581 (patch) | |
| tree | e6ca129d8d22e5684250a380943bd431ff8c2f4d /packages/frontend/src/components/MkFormDialog.vue | |
| parent | New Crowdin updates (#13860) (diff) | |
| download | sharkey-4579be0f5401001bcfc27c4d56133cc910f3f581.tar.gz sharkey-4579be0f5401001bcfc27c4d56133cc910f3f581.tar.bz2 sharkey-4579be0f5401001bcfc27c4d56133cc910f3f581.zip | |
新着ノートをサウンドで通知する機能をdeck UIに追加 (#13867)
* feat(deck-ui): implement note notification
* chore: remove notify in antenna
* docs(changelog): 新着ノートをサウンドで通知する機能をdeck UIに追加
* fix: type error in test
* lint: key order
* fix: remove notify column
* test: remove test for notify
* chore: make sound selectable
* fix: add license header
* fix: add license header again
* Unnecessary await
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
* ファイルを選択してください -> ファイルが選択されていません
* fix: i18n忘れ
* fix: i18n忘れ
* pleaseSelectFile > fileNotSelected
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/components/MkFormDialog.vue')
| -rw-r--r-- | packages/frontend/src/components/MkFormDialog.vue | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/frontend/src/components/MkFormDialog.vue b/packages/frontend/src/components/MkFormDialog.vue index deedc5badb..124f114111 100644 --- a/packages/frontend/src/components/MkFormDialog.vue +++ b/packages/frontend/src/components/MkFormDialog.vue @@ -21,8 +21,9 @@ SPDX-License-Identifier: AGPL-3.0-only <MkSpacer :marginMin="20" :marginMax="32"> <div v-if="Object.keys(form).filter(item => !form[item].hidden).length > 0" class="_gaps_m"> - <template v-for="(v, k) in Object.fromEntries(Object.entries(form).filter(([_, v]) => !('hidden' in v) || 'hidden' in v && !v.hidden))"> - <MkInput v-if="v.type === 'number'" v-model="values[k]" type="number" :step="v.step || 1"> + <template v-for="(v, k) in Object.fromEntries(Object.entries(form))"> + <template v-if="typeof v.hidden == 'function' ? v.hidden(values) : v.hidden"></template> + <MkInput v-else-if="v.type === 'number'" v-model="values[k]" type="number" :step="v.step || 1"> <template #label><span v-text="v.label || k"></span><span v-if="v.required === false"> ({{ i18n.ts.optional }})</span></template> <template v-if="v.description" #caption>{{ v.description }}</template> </MkInput> @@ -53,6 +54,12 @@ SPDX-License-Identifier: AGPL-3.0-only <MkButton v-else-if="v.type === 'button'" @click="v.action($event, values)"> <span v-text="v.content || k"></span> </MkButton> + <XFile + v-else-if="v.type === 'drive-file'" + :fileId="v.defaultFileId" + :validate="async f => !v.validate || await v.validate(f)" + @update="f => values[k] = f" + /> </template> </div> <div v-else class="_fullinfo"> @@ -72,6 +79,7 @@ import MkSelect from './MkSelect.vue'; import MkRange from './MkRange.vue'; import MkButton from './MkButton.vue'; import MkRadios from './MkRadios.vue'; +import XFile from './MkFormDialog.file.vue'; import type { Form } from '@/scripts/form.js'; import MkModalWindow from '@/components/MkModalWindow.vue'; import { i18n } from '@/i18n.js'; |