逆張りモードの実装
This commit is contained in:
parent
592c6e60a9
commit
40469aa0ce
9 changed files with 81 additions and 26 deletions
|
|
@ -10,10 +10,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { Interpreter, Parser } from '@syuilo/aiscript';
|
||||
import { useWidgetPropsManager, Widget, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget';
|
||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget';
|
||||
import { GetFormResultType } from '@/scripts/form.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import {i18n} from "@/i18n.js";
|
||||
import MkSwitch from "@/components/MkSwitch.vue";
|
||||
import {computed} from "vue";
|
||||
|
|
|
|||
41
packages/frontend/src/widgets/WidgetGyakubariMode.vue
Normal file
41
packages/frontend/src/widgets/WidgetGyakubariMode.vue
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!--
|
||||
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
SPDX-License-Identifier: AGPL-3.0-only
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<MkSwitch v-model="enablehanntenn">{{ i18n.ts.hanntenn }} <template #caption>{{ i18n.ts.hanntennInfo }} </template></MkSwitch>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget';
|
||||
import { GetFormResultType } from '@/scripts/form.js';
|
||||
import {i18n} from "@/i18n.js";
|
||||
import MkSwitch from "@/components/MkSwitch.vue";
|
||||
import {computed} from "vue";
|
||||
import {defaultStore} from "@/store.js";
|
||||
const enablehanntenn = computed(defaultStore.makeGetterSetter('enablehanntenn'));
|
||||
const name = 'gyakubariMode';
|
||||
|
||||
const widgetPropsDef = {
|
||||
};
|
||||
|
||||
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>
|
||||
|
|
@ -11,6 +11,7 @@ export default function(app: App) {
|
|||
app.component('WidgetMemo', defineAsyncComponent(() => import('./WidgetMemo.vue')));
|
||||
app.component('WidgetNotifications', defineAsyncComponent(() => import('./WidgetNotifications.vue')));
|
||||
app.component('WidgetGamingMode', defineAsyncComponent(() => import('./WidgetGamingMode.vue')));
|
||||
app.component('WidgetGyakubariMode', defineAsyncComponent(() => import('./WidgetGyakubariMode.vue')));
|
||||
app.component('WidgetTimeline', defineAsyncComponent(() => import('./WidgetTimeline.vue')));
|
||||
app.component('WidgetCalendar', defineAsyncComponent(() => import('./WidgetCalendar.vue')));
|
||||
app.component('WidgetRss', defineAsyncComponent(() => import('./WidgetRss.vue')));
|
||||
|
|
@ -42,6 +43,7 @@ export const widgets = [
|
|||
'memo',
|
||||
'notifications',
|
||||
'gamingMode',
|
||||
'gyakubariMode',
|
||||
'timeline',
|
||||
'calendar',
|
||||
'rss',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue