summaryrefslogtreecommitdiff
path: root/packages/frontend/src/widgets/WidgetRssTicker.vue
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2025-07-06 19:36:11 +0900
committerGitHub <noreply@github.com>2025-07-06 19:36:11 +0900
commita8abb03d1785791ab40e57ab49c87640914532c9 (patch)
treef80ea7a393a278e29f9642e86be8b341fcb4b95b /packages/frontend/src/widgets/WidgetRssTicker.vue
parentMerge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff)
downloadmisskey-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/WidgetRssTicker.vue')
-rw-r--r--packages/frontend/src/widgets/WidgetRssTicker.vue20
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/frontend/src/widgets/WidgetRssTicker.vue b/packages/frontend/src/widgets/WidgetRssTicker.vue
index 7fe7c6111a..9d4feb784c 100644
--- a/packages/frontend/src/widgets/WidgetRssTicker.vue
+++ b/packages/frontend/src/widgets/WidgetRssTicker.vue
@@ -32,7 +32,7 @@ import * as Misskey from 'misskey-js';
import { useWidgetPropsManager } from './widget.js';
import type { WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
import MarqueeText from '@/components/MkMarqueeText.vue';
-import type { GetFormResultType } from '@/utility/form.js';
+import type { FormWithDefault, GetFormResultType } from '@/utility/form.js';
import MkContainer from '@/components/MkContainer.vue';
import { shuffle } from '@/utility/shuffle.js';
import { url as base } from '@@/js/config.js';
@@ -42,41 +42,41 @@ const name = 'rssTicker';
const widgetPropsDef = {
url: {
- type: 'string' as const,
+ type: 'string',
default: 'http://feeds.afpbb.com/rss/afpbb/afpbbnews',
},
shuffle: {
- type: 'boolean' as const,
+ type: 'boolean',
default: true,
},
refreshIntervalSec: {
- type: 'number' as const,
+ type: 'number',
default: 60,
},
maxEntries: {
- type: 'number' as const,
+ type: 'number',
default: 15,
},
duration: {
- type: 'range' as const,
+ type: 'range',
default: 70,
step: 1,
min: 5,
max: 200,
},
reverse: {
- type: 'boolean' as const,
+ type: 'boolean',
default: false,
},
showHeader: {
- type: 'boolean' as const,
+ type: 'boolean',
default: false,
},
transparent: {
- type: 'boolean' as const,
+ type: 'boolean',
default: false,
},
-};
+} satisfies FormWithDefault;
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;