diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2025-07-06 19:36:11 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-06 19:36:11 +0900 |
| commit | a8abb03d1785791ab40e57ab49c87640914532c9 (patch) | |
| tree | f80ea7a393a278e29f9642e86be8b341fcb4b95b /packages/frontend/src/widgets/WidgetMemo.vue | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-a8abb03d1785791ab40e57ab49c87640914532c9.tar.gz misskey-a8abb03d1785791ab40e57ab49c87640914532c9.tar.bz2 misskey-a8abb03d1785791ab40e57ab49c87640914532c9.zip | |
refactor(frontend): Formまわりの型強化 (#16260)
* refactor(frontend): Formまわりの型強化
* fix
* avoid non-null assertion and add null check for safety
* refactor
* avoid non-null assertion and add null check for safety
* Update clip.vue
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/frontend/src/widgets/WidgetMemo.vue')
| -rw-r--r-- | packages/frontend/src/widgets/WidgetMemo.vue | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/frontend/src/widgets/WidgetMemo.vue b/packages/frontend/src/widgets/WidgetMemo.vue index 3df5c5bfd7..2beca8c43a 100644 --- a/packages/frontend/src/widgets/WidgetMemo.vue +++ b/packages/frontend/src/widgets/WidgetMemo.vue @@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only <template #header>{{ i18n.ts._widgets.memo }}</template> <div :class="$style.root"> - <textarea v-model="text" :style="`height: ${widgetProps.height}px;`" :class="$style.textarea" :placeholder="i18n.ts.placeholder" @input="onChange"></textarea> + <textarea v-model="text" :style="`height: ${widgetProps.height}px;`" :class="$style.textarea" :placeholder="i18n.ts.memo" @input="onChange"></textarea> <button :class="$style.save" :disabled="!changed" class="_buttonPrimary" @click="saveMemo">{{ i18n.ts.save }}</button> </div> </MkContainer> @@ -19,7 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only import { ref, watch } from 'vue'; import { useWidgetPropsManager } from './widget.js'; import type { WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js'; -import type { GetFormResultType } from '@/utility/form.js'; +import type { FormWithDefault, GetFormResultType } from '@/utility/form.js'; import MkContainer from '@/components/MkContainer.vue'; import { store } from '@/store.js'; import { i18n } from '@/i18n.js'; @@ -28,14 +28,14 @@ const name = 'memo'; const widgetPropsDef = { showHeader: { - type: 'boolean' as const, + type: 'boolean', default: true, }, height: { - type: 'number' as const, + type: 'number', default: 100, }, -}; +} satisfies FormWithDefault; type WidgetProps = GetFormResultType<typeof widgetPropsDef>; |