mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-26 10:56:43 -06:00
d84796588c
* cleanup: trim trailing whitespace * update(`.editorconfig`) --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
40 lines
1 KiB
Vue
40 lines
1 KiB
Vue
<template>
|
|
<MkContainer :showHeader="widgetProps.showHeader" class="mkw-clicker">
|
|
<template #icon><i class="ti ti-cookie"></i></template>
|
|
<template #header>Clicker</template>
|
|
<MkClickerGame/>
|
|
</MkContainer>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { useWidgetPropsManager, Widget, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget';
|
|
import { GetFormResultType } from '@/scripts/form';
|
|
import MkContainer from '@/components/MkContainer.vue';
|
|
import MkClickerGame from '@/components/MkClickerGame.vue';
|
|
|
|
const name = 'clicker';
|
|
|
|
const widgetPropsDef = {
|
|
showHeader: {
|
|
type: 'boolean' as const,
|
|
default: false,
|
|
},
|
|
};
|
|
|
|
type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
|
|
|
const props = defineProps<WidgetComponentProps<WidgetProps>>();
|
|
const emit = defineEmits<WidgetComponentEmits<WidgetProps>>();
|
|
|
|
const { widgetProps, configure } = useWidgetPropsManager(name,
|
|
widgetPropsDef,
|
|
props,
|
|
emit,
|
|
);
|
|
|
|
defineExpose<WidgetComponentExpose>({
|
|
name,
|
|
configure,
|
|
id: props.widget ? props.widget.id : null,
|
|
});
|
|
</script>
|