refactor(client): rename widget filename

This commit is contained in:
syuilo 2023-01-10 06:08:40 +09:00
parent 0b08fcac4a
commit 618405c4d3
30 changed files with 30 additions and 30 deletions

View File

@ -15,21 +15,21 @@
handle=".handle" handle=".handle"
:animation="150" :animation="150"
:group="{ name: 'SortableMkWidgets' }" :group="{ name: 'SortableMkWidgets' }"
@update:model-value="v => emit('updateWidgets', v)"
:class="$style['edit-editing']" :class="$style['edit-editing']"
@update:model-value="v => emit('updateWidgets', v)"
> >
<template #item="{element}"> <template #item="{element}">
<div :class="[$style.widget, $style['customize-container']]"> <div :class="[$style.widget, $style['customize-container']]">
<button :class="$style['customize-container-config']" class="_button" @click.prevent.stop="configWidget(element.id)"><i class="ti ti-settings"></i></button> <button :class="$style['customize-container-config']" class="_button" @click.prevent.stop="configWidget(element.id)"><i class="ti ti-settings"></i></button>
<button :class="$style['customize-container-remove']" class="_button" @click.prevent.stop="removeWidget(element)"><i class="ti ti-x"></i></button> <button :class="$style['customize-container-remove']" class="_button" @click.prevent.stop="removeWidget(element)"><i class="ti ti-x"></i></button>
<div class="handle"> <div class="handle">
<component :is="`mkw-${element.name}`" :ref="el => widgetRefs[element.id] = el" class="widget" :class="$style['customize-container-handle-widget']" :widget="element" @update-props="updateWidget(element.id, $event)"/> <component :is="`widget-${element.name}`" :ref="el => widgetRefs[element.id] = el" class="widget" :class="$style['customize-container-handle-widget']" :widget="element" @update-props="updateWidget(element.id, $event)"/>
</div> </div>
</div> </div>
</template> </template>
</Sortable> </Sortable>
</template> </template>
<component :is="`mkw-${widget.name}`" v-for="widget in widgets" v-else :key="widget.id" :ref="el => widgetRefs[widget.id] = el" :class="$style.widget" :widget="widget" @update-props="updateWidget(widget.id, $event)" @contextmenu.stop="onContextmenu(widget, $event)"/> <component :is="`widget-${widget.name}`" v-for="widget in widgets" v-else :key="widget.id" :ref="el => widgetRefs[widget.id] = el" :class="$style.widget" :widget="widget" @update-props="updateWidget(widget.id, $event)" @contextmenu.stop="onContextmenu(widget, $event)"/>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@ -1,33 +1,33 @@
import { App, defineAsyncComponent } from 'vue'; import { App, defineAsyncComponent } from 'vue';
export default function(app: App) { export default function(app: App) {
app.component('MkwProfile', defineAsyncComponent(() => import('./profile.vue'))); app.component('WidgetProfile', defineAsyncComponent(() => import('./WidgetProfile.vue')));
app.component('MkwInstanceInfo', defineAsyncComponent(() => import('./instance-info.vue'))); app.component('WidgetInstanceInfo', defineAsyncComponent(() => import('./WidgetInstanceInfo.vue')));
app.component('MkwMemo', defineAsyncComponent(() => import('./memo.vue'))); app.component('WidgetMemo', defineAsyncComponent(() => import('./WidgetMemo.vue')));
app.component('MkwNotifications', defineAsyncComponent(() => import('./notifications.vue'))); app.component('WidgetNotifications', defineAsyncComponent(() => import('./WidgetNotifications.vue')));
app.component('MkwTimeline', defineAsyncComponent(() => import('./timeline.vue'))); app.component('WidgetTimeline', defineAsyncComponent(() => import('./WidgetTimeline.vue')));
app.component('MkwCalendar', defineAsyncComponent(() => import('./calendar.vue'))); app.component('WidgetCalendar', defineAsyncComponent(() => import('./WidgetCalendar.vue')));
app.component('MkwRss', defineAsyncComponent(() => import('./rss.vue'))); app.component('WidgetRss', defineAsyncComponent(() => import('./WidgetRss.vue')));
app.component('MkwRssTicker', defineAsyncComponent(() => import('./rss-ticker.vue'))); app.component('WidgetRssTicker', defineAsyncComponent(() => import('./WidgetRssTicker.vue')));
app.component('MkwTrends', defineAsyncComponent(() => import('./trends.vue'))); app.component('WidgetTrends', defineAsyncComponent(() => import('./WidgetTrends.vue')));
app.component('MkwClock', defineAsyncComponent(() => import('./clock.vue'))); app.component('WidgetClock', defineAsyncComponent(() => import('./WidgetClock.vue')));
app.component('MkwActivity', defineAsyncComponent(() => import('./activity.vue'))); app.component('WidgetActivity', defineAsyncComponent(() => import('./WidgetActivity.vue')));
app.component('MkwPhotos', defineAsyncComponent(() => import('./photos.vue'))); app.component('WidgetPhotos', defineAsyncComponent(() => import('./WidgetPhotos.vue')));
app.component('MkwDigitalClock', defineAsyncComponent(() => import('./digital-clock.vue'))); app.component('WidgetDigitalClock', defineAsyncComponent(() => import('./WidgetDigitalClock.vue')));
app.component('MkwUnixClock', defineAsyncComponent(() => import('./unix-clock.vue'))); app.component('WidgetUnixClock', defineAsyncComponent(() => import('./WidgetUnixClock.vue')));
app.component('MkwFederation', defineAsyncComponent(() => import('./federation.vue'))); app.component('WidgetFederation', defineAsyncComponent(() => import('./WidgetFederation.vue')));
app.component('MkwPostForm', defineAsyncComponent(() => import('./post-form.vue'))); app.component('WidgetPostForm', defineAsyncComponent(() => import('./WidgetPostForm.vue')));
app.component('MkwSlideshow', defineAsyncComponent(() => import('./slideshow.vue'))); app.component('WidgetSlideshow', defineAsyncComponent(() => import('./WidgetSlideshow.vue')));
app.component('MkwServerMetric', defineAsyncComponent(() => import('./server-metric/index.vue'))); app.component('WidgetServerMetric', defineAsyncComponent(() => import('./server-metric/index.vue')));
app.component('MkwOnlineUsers', defineAsyncComponent(() => import('./online-users.vue'))); app.component('WidgetOnlineUsers', defineAsyncComponent(() => import('./WidgetOnlineUsers.vue')));
app.component('MkwJobQueue', defineAsyncComponent(() => import('./job-queue.vue'))); app.component('WidgetJobQueue', defineAsyncComponent(() => import('./WidgetJobQueue.vue')));
app.component('MkwInstanceCloud', defineAsyncComponent(() => import('./instance-cloud.vue'))); app.component('WidgetInstanceCloud', defineAsyncComponent(() => import('./WidgetInstanceCloud.vue')));
app.component('MkwButton', defineAsyncComponent(() => import('./button.vue'))); app.component('WidgetButton', defineAsyncComponent(() => import('./WidgetButton.vue')));
app.component('MkwAiscript', defineAsyncComponent(() => import('./aiscript.vue'))); app.component('WidgetAiscript', defineAsyncComponent(() => import('./WidgetAiscript.vue')));
app.component('MkwAiscriptApp', defineAsyncComponent(() => import('./aiscript-app.vue'))); app.component('WidgetAiscriptApp', defineAsyncComponent(() => import('./WidgetAiscriptApp.vue')));
app.component('MkwAichan', defineAsyncComponent(() => import('./aichan.vue'))); app.component('WidgetAichan', defineAsyncComponent(() => import('./WidgetAichan.vue')));
app.component('MkwUserList', defineAsyncComponent(() => import('./user-list.vue'))); app.component('WidgetUserList', defineAsyncComponent(() => import('./WidgetUserList.vue')));
app.component('MkwClicker', defineAsyncComponent(() => import('./clicker.vue'))); app.component('WidgetClicker', defineAsyncComponent(() => import('./WidgetClicker.vue')));
} }
export const widgets = [ export const widgets = [