1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-22 09:24:22 +02:00

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>
This commit is contained in:
かっこかり
2025-07-06 19:36:11 +09:00
committed by GitHub
parent c2a01551a7
commit a8abb03d17
45 changed files with 344 additions and 239 deletions

View File

@@ -25,29 +25,31 @@ import { useWidgetPropsManager } from './widget.js';
import type { WidgetComponentProps, WidgetComponentEmits, WidgetComponentExpose } from './widget.js';
import XCalendar from './WidgetActivity.calendar.vue';
import XChart from './WidgetActivity.chart.vue';
import type { GetFormResultType } from '@/utility/form.js';
import type { FormWithDefault, GetFormResultType } from '@/utility/form.js';
import { misskeyApiGet } from '@/utility/misskey-api.js';
import MkContainer from '@/components/MkContainer.vue';
import { $i } from '@/i.js';
import { ensureSignin } from '@/i.js';
import { i18n } from '@/i18n.js';
const $i = ensureSignin();
const name = 'activity';
const widgetPropsDef = {
showHeader: {
type: 'boolean' as const,
type: 'boolean',
default: true,
},
transparent: {
type: 'boolean' as const,
type: 'boolean',
default: false,
},
view: {
type: 'number' as const,
type: 'number',
default: 0,
hidden: true,
},
};
} satisfies FormWithDefault;
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;