chore: remove unused imports/variables
This commit is contained in:
parent
8845383fc2
commit
40d5ad1b2d
55 changed files with 65 additions and 134 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { defineAsyncComponent, reactive } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
import type * as firefish from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { i18n } from "./i18n";
|
import { i18n } from "./i18n";
|
||||||
import { del, get, set } from "@/scripts/idb-proxy";
|
import { del, get, set } from "@/scripts/idb-proxy";
|
||||||
|
|
|
@ -64,7 +64,6 @@ import { i18n } from "@/i18n";
|
||||||
import type { PageMetadata } from "@/scripts/page-metadata";
|
import type { PageMetadata } from "@/scripts/page-metadata";
|
||||||
import { provideMetadataReceiver } from "@/scripts/page-metadata";
|
import { provideMetadataReceiver } from "@/scripts/page-metadata";
|
||||||
import { Router } from "@/nirax";
|
import { Router } from "@/nirax";
|
||||||
import { defaultStore } from "@/store";
|
|
||||||
import icon from "@/scripts/icon";
|
import icon from "@/scripts/icon";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import preprocess from "@/scripts/preprocess";
|
import preprocess from "@/scripts/preprocess";
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
text: string;
|
text: string;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -15,7 +15,7 @@ import type * as firefish from "firefish-js";
|
||||||
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
import XNoteHeader from "@/components/MkNoteHeader.vue";
|
||||||
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
import MkSubNoteContent from "@/components/MkSubNoteContent.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
note: firefish.entities.Note;
|
note: firefish.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -45,7 +45,7 @@ import { scroll } from "@/scripts/scroll";
|
||||||
|
|
||||||
const tlEl = ref<HTMLElement>();
|
const tlEl = ref<HTMLElement>();
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
noGap?: boolean;
|
noGap?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -5,10 +5,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XValue from "./MkObjectView.value.vue";
|
import XValue from "./MkObjectView.value.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
value: Record<string, unknown>;
|
value: Record<string, unknown>;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -35,7 +35,6 @@ import { VueDraggable } from "vue-draggable-plus";
|
||||||
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
import MkDriveFileThumbnail from "@/components/MkDriveFileThumbnail.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
|
||||||
import icon from "@/scripts/icon";
|
import icon from "@/scripts/icon";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
reaction: string;
|
reaction: string;
|
||||||
customEmojis?: any[]; // TODO
|
customEmojis?: any[]; // TODO
|
||||||
noStyle?: boolean;
|
noStyle?: boolean;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
import MkTooltip from "./MkTooltip.vue";
|
import MkTooltip from "./MkTooltip.vue";
|
||||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
reaction: string;
|
reaction: string;
|
||||||
emojis: any[]; // TODO
|
emojis: any[]; // TODO
|
||||||
targetElement: HTMLElement;
|
targetElement: HTMLElement;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
import MkTooltip from "./MkTooltip.vue";
|
import MkTooltip from "./MkTooltip.vue";
|
||||||
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
import XReactionIcon from "@/components/MkReactionIcon.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
reaction: string;
|
reaction: string;
|
||||||
users: any[]; // TODO
|
users: any[]; // TODO
|
||||||
count: number;
|
count: number;
|
||||||
|
|
|
@ -128,12 +128,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref } from "vue";
|
import { defineAsyncComponent, ref } from "vue";
|
||||||
import { toUnicode } from "punycode/";
|
import { toUnicode } from "punycode/";
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkInfo from "@/components/MkInfo.vue";
|
import MkInfo from "@/components/MkInfo.vue";
|
||||||
import { apiUrl, host as configHost } from "@/config";
|
import { host as configHost } from "@/config";
|
||||||
import { byteify, hexify } from "@/scripts/2fa";
|
import { byteify, hexify } from "@/scripts/2fa";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { login } from "@/account";
|
import { login } from "@/account";
|
||||||
|
|
|
@ -18,7 +18,7 @@ import MkSignin from "@/components/MkSignin.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
autoSet?: boolean;
|
autoSet?: boolean;
|
||||||
message?: string;
|
message?: string;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import XSignup from "@/components/MkSignup.vue";
|
||||||
import XModalWindow from "@/components/MkModalWindow.vue";
|
import XModalWindow from "@/components/MkModalWindow.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
autoSet?: boolean;
|
autoSet?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
|
|
|
@ -31,7 +31,7 @@ import type { Paging } from "@/components/MkPagination.vue";
|
||||||
import MkPagination from "@/components/MkPagination.vue";
|
import MkPagination from "@/components/MkPagination.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
noGap?: boolean;
|
noGap?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
|
@ -18,10 +18,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import MkTooltip from "./MkTooltip.vue";
|
import MkTooltip from "./MkTooltip.vue";
|
||||||
|
|
||||||
const props = defineProps<{
|
defineProps<{
|
||||||
users: any[]; // TODO
|
users: any[]; // TODO
|
||||||
count: number;
|
count: number;
|
||||||
targetElement: HTMLElement;
|
targetElement: HTMLElement;
|
||||||
|
|
|
@ -128,7 +128,6 @@ import { nextTick, ref, shallowRef, watch } from "vue";
|
||||||
import type * as firefish from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MkModal from "@/components/MkModal.vue";
|
import MkModal from "@/components/MkModal.vue";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { defaultStore } from "@/store";
|
|
||||||
import icon from "@/scripts/icon";
|
import icon from "@/scripts/icon";
|
||||||
|
|
||||||
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
const modal = shallowRef<InstanceType<typeof MkModal>>();
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
export default {
|
export default {
|
||||||
mounted: (el) => el.focus(),
|
mounted: (el: HTMLElement) => el.focus(),
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import type { Directive } from "vue";
|
import type { Directive } from "vue";
|
||||||
import { makeHotkey } from "../scripts/hotkey";
|
import { makeHotkey } from "@/scripts/hotkey";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted(el, binding) {
|
mounted(el, binding) {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import Ripple from "@/components/MkRipple.vue";
|
import Ripple from "@/components/MkRipple.vue";
|
||||||
import { popup } from "@/os";
|
import { popup } from "@/os";
|
||||||
|
import type { Ref } from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted(el, binding, vn) {
|
mounted(el: HTMLElement, binding: Ref<boolean>) {
|
||||||
// 明示的に false であればバインドしない
|
// 明示的に false であればバインドしない
|
||||||
if (binding.value === false) return;
|
if (binding.value === false) return;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import type { Directive } from "vue";
|
import type { Directive } from "vue";
|
||||||
import { vibrate } from "../scripts/vibrate";
|
import { vibrate } from "@/scripts/vibrate";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mounted(el, binding) {
|
mounted(el, binding) {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export const notePage = (note) => {
|
import { entities } from "firefish-js";
|
||||||
|
|
||||||
|
export const notePage = (note: entities.Note) => {
|
||||||
return `/notes/${note.id}`;
|
return `/notes/${note.id}`;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
export default (n) => (n == null ? "N/A" : n.toLocaleString());
|
export default (n?: number) => (n == null ? "N/A" : n.toLocaleString());
|
||||||
|
|
|
@ -36,7 +36,7 @@ import { set } from "@/scripts/idb-proxy";
|
||||||
import widgets from "@/widgets";
|
import widgets from "@/widgets";
|
||||||
import directives from "@/directives";
|
import directives from "@/directives";
|
||||||
import components from "@/components";
|
import components from "@/components";
|
||||||
import { host, lang, ui, version } from "@/config";
|
import { lang, ui, version } from "@/config";
|
||||||
import { applyTheme } from "@/scripts/theme";
|
import { applyTheme } from "@/scripts/theme";
|
||||||
import { isDeviceDarkmode } from "@/scripts/is-device-darkmode";
|
import { isDeviceDarkmode } from "@/scripts/is-device-darkmode";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import { EventEmitter } from "eventemitter3";
|
import { EventEmitter } from "eventemitter3";
|
||||||
import type { Component, ShallowRef } from "vue";
|
import type { Component, ShallowRef } from "vue";
|
||||||
import { Ref, ref, shallowRef } from "vue";
|
import { shallowRef } from "vue";
|
||||||
import { pleaseLogin } from "@/scripts/please-login";
|
import { pleaseLogin } from "@/scripts/please-login";
|
||||||
import { safeURIDecode } from "@/scripts/safe-uri-decode";
|
import { safeURIDecode } from "@/scripts/safe-uri-decode";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
<template>
|
<template>
|
||||||
<div></div>
|
<div></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup></script>
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
<template>
|
<template>
|
||||||
<MkLoading />
|
<MkLoading />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup></script>
|
|
||||||
|
|
|
@ -92,8 +92,8 @@ const fetching = ref(true);
|
||||||
const usage = ref<any>(null);
|
const usage = ref<any>(null);
|
||||||
const capacity = ref<any>(null);
|
const capacity = ref<any>(null);
|
||||||
const uploadFolder = ref<any>(null);
|
const uploadFolder = ref<any>(null);
|
||||||
const alwaysMarkNsfw = ref<boolean>($i.alwaysMarkNsfw);
|
const alwaysMarkNsfw = ref<boolean>($i != null && $i.alwaysMarkNsfw);
|
||||||
const autoSensitive = ref<boolean>($i.autoSensitive);
|
const autoSensitive = ref<boolean>($i != null && $i.autoSensitive);
|
||||||
|
|
||||||
const meterStyle = computed(() => {
|
const meterStyle = computed(() => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -35,7 +35,7 @@ import * as os from "@/os";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import icon from "@/scripts/icon";
|
import icon from "@/scripts/icon";
|
||||||
|
|
||||||
const props = withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: firefish.entities.User;
|
user: firefish.entities.User;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
|
|
|
@ -5,18 +5,17 @@ import { iAmModerator } from "@/account";
|
||||||
import { $i } from "@/reactiveAccount";
|
import { $i } from "@/reactiveAccount";
|
||||||
import MkLoading from "@/pages/_loading_.vue";
|
import MkLoading from "@/pages/_loading_.vue";
|
||||||
import MkError from "@/pages/_error_.vue";
|
import MkError from "@/pages/_error_.vue";
|
||||||
import { api } from "@/os";
|
// import { api } from "@/os";
|
||||||
import { ui } from "@/config";
|
|
||||||
|
|
||||||
function getGuestTimelineStatus() {
|
// function getGuestTimelineStatus() {
|
||||||
api("meta", {
|
// api("meta", {
|
||||||
detail: false,
|
// detail: false,
|
||||||
}).then((meta) => {
|
// }).then((meta) => {
|
||||||
return meta.enableGuestTimeline;
|
// return meta.enableGuestTimeline;
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
const guestTimeline = getGuestTimelineStatus();
|
// const guestTimeline = getGuestTimelineStatus();
|
||||||
|
|
||||||
const page = (loader: AsyncComponentLoader<any>) =>
|
const page = (loader: AsyncComponentLoader<any>) =>
|
||||||
defineAsyncComponent({
|
defineAsyncComponent({
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { defineAsyncComponent, inject } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
import type * as firefish from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { $i } from "@/reactiveAccount";
|
import { $i } from "@/reactiveAccount";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import type * as firefish from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 投稿を表す文字列を取得します。
|
* 投稿を表す文字列を取得します。
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import { Ref } from "vue";
|
|
||||||
|
|
||||||
export function calcPopupPosition(
|
export function calcPopupPosition(
|
||||||
el: HTMLElement,
|
el: HTMLElement,
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
import { inject, onUnmounted } from "vue";
|
// import { inject, onUnmounted } from "vue";
|
||||||
import { i18n } from "@/i18n";
|
// import { i18n } from "@/i18n";
|
||||||
import * as os from "@/os";
|
// import * as os from "@/os";
|
||||||
|
|
||||||
export function useLeaveGuard(enabled: Ref<boolean>) {
|
export function useLeaveGuard(enabled: Ref<boolean>) {
|
||||||
/* TODO
|
/* TODO
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
import { swInject } from "./sw-inject";
|
import { swInject } from "./sw-inject";
|
||||||
import { pendingApiRequestsCount, popup, popups } from "@/os";
|
import { popup, popups } from "@/os";
|
||||||
import { uploads } from "@/scripts/upload";
|
import { uploads } from "@/scripts/upload";
|
||||||
import * as sound from "@/scripts/sound";
|
import * as sound from "@/scripts/sound";
|
||||||
import { $i } from "@/reactiveAccount";
|
import { $i } from "@/reactiveAccount";
|
||||||
|
|
|
@ -126,14 +126,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
import { computed, defineAsyncComponent, toRef } from "vue";
|
||||||
computed,
|
|
||||||
defineAsyncComponent,
|
|
||||||
defineComponent,
|
|
||||||
ref,
|
|
||||||
toRef,
|
|
||||||
watch,
|
|
||||||
} from "vue";
|
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { navbarItemDef } from "@/navbar";
|
import { navbarItemDef } from "@/navbar";
|
||||||
import { openAccountMenu as openAccountMenu_ } from "@/account";
|
import { openAccountMenu as openAccountMenu_ } from "@/account";
|
||||||
|
|
|
@ -39,13 +39,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref, toRef, watch } from "vue";
|
import { ref } from "vue";
|
||||||
import type * as firefish from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MarqueeText from "@/components/MkMarquee.vue";
|
import MarqueeText from "@/components/MkMarquee.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
import { getNoteSummary } from "@/scripts/get-note-summary";
|
|
||||||
import { notePage } from "@/filters/note";
|
|
||||||
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref, toRef, watch } from "vue";
|
import { ref } from "vue";
|
||||||
import MarqueeText from "@/components/MkMarquee.vue";
|
import MarqueeText from "@/components/MkMarquee.vue";
|
||||||
import * as os from "@/os";
|
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
import { shuffle } from "@/scripts/shuffle";
|
import { shuffle } from "@/scripts/shuffle";
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref, toRef, watch } from "vue";
|
import { ref } from "vue";
|
||||||
import type * as firefish from "firefish-js";
|
import type * as firefish from "firefish-js";
|
||||||
import MarqueeText from "@/components/MkMarquee.vue";
|
import MarqueeText from "@/components/MkMarquee.vue";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
|
|
|
@ -49,8 +49,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, ref, toRef, watch } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
import * as os from "@/os";
|
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
const XRss = defineAsyncComponent(() => import("./statusbar-rss.vue"));
|
const XRss = defineAsyncComponent(() => import("./statusbar-rss.vue"));
|
||||||
const XFederation = defineAsyncComponent(
|
const XFederation = defineAsyncComponent(
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import { inject } from "vue";
|
|
||||||
import { post } from "@/os";
|
import { post } from "@/os";
|
||||||
import { login } from "@/account";
|
import { login } from "@/account";
|
||||||
import { $i } from "@/reactiveAccount";
|
import { $i } from "@/reactiveAccount";
|
||||||
import { defaultStore } from "@/store";
|
|
||||||
import { getAccountFromId } from "@/scripts/get-account-from-id";
|
import { getAccountFromId } from "@/scripts/get-account-from-id";
|
||||||
import { mainRouter } from "@/router";
|
import { mainRouter } from "@/router";
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import XMainColumn from "./main-column.vue";
|
import XMainColumn from "./main-column.vue";
|
||||||
import XTlColumn from "./tl-column.vue";
|
import XTlColumn from "./tl-column.vue";
|
||||||
import XAntennaColumn from "./antenna-column.vue";
|
import XAntennaColumn from "./antenna-column.vue";
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { throttle } from "throttle-debounce";
|
||||||
import { markRaw } from "vue";
|
import { markRaw } from "vue";
|
||||||
import type { notificationTypes } from "firefish-js";
|
import type { notificationTypes } from "firefish-js";
|
||||||
import { Storage } from "../../pizzax";
|
import { Storage } from "../../pizzax";
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
import { api } from "@/os";
|
import { api } from "@/os";
|
||||||
import { deepClone } from "@/scripts/clone";
|
import { deepClone } from "@/scripts/clone";
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineAsyncComponent, defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import DesignA from "./visitor/a.vue";
|
import DesignA from "./visitor/a.vue";
|
||||||
import DesignB from "./visitor/b.vue";
|
import DesignB from "./visitor/b.vue";
|
||||||
import XCommon from "./_common_/common.vue";
|
import XCommon from "./_common_/common.vue";
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineAsyncComponent, defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import XHeader from "./header.vue";
|
import XHeader from "./header.vue";
|
||||||
import { host, instanceName } from "@/config";
|
import { host, instanceName } from "@/config";
|
||||||
import { search } from "@/scripts/search";
|
import { search } from "@/scripts/search";
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineAsyncComponent, defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { host, instanceName } from "@/config";
|
import { host, instanceName } from "@/config";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import MkPagination from "@/components/MkPagination.vue";
|
import MkPagination from "@/components/MkPagination.vue";
|
||||||
|
|
|
@ -7,14 +7,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref, watch } from "vue";
|
import { AiScript, parse } from "@syuilo/aiscript";
|
||||||
import { AiScript, parse, utils } from "@syuilo/aiscript";
|
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { createAiScriptEnv } from "@/scripts/aiscript/api";
|
import { createAiScriptEnv } from "@/scripts/aiscript/api";
|
||||||
|
|
|
@ -44,13 +44,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onUnmounted, ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import { i18n } from "@/i18n";
|
import { i18n } from "@/i18n";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
|
|
|
@ -49,11 +49,7 @@
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import MkContainer from "@/components/MkContainer.vue";
|
import MkContainer from "@/components/MkContainer.vue";
|
||||||
import MkAnalogClock from "@/components/MkAnalogClock.vue";
|
import MkAnalogClock from "@/components/MkAnalogClock.vue";
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onUnmounted, ref, watch } from "vue";
|
import { computed } from "vue";
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import {
|
||||||
WidgetComponentEmits,
|
WidgetComponentEmits,
|
||||||
|
|
|
@ -22,11 +22,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, shallowRef } from "vue";
|
import { ref, shallowRef } from "vue";
|
||||||
|
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import MkContainer from "@/components/MkContainer.vue";
|
import MkContainer from "@/components/MkContainer.vue";
|
||||||
|
|
|
@ -20,13 +20,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, ref } from "vue";
|
import { ref } from "vue";
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
|
|
|
@ -8,13 +8,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {} from "vue";
|
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import XPostForm from "@/components/MkPostForm.vue";
|
import XPostForm from "@/components/MkPostForm.vue";
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import { host } from "@/config";
|
import { host } from "@/config";
|
||||||
|
|
||||||
|
@ -48,12 +44,7 @@ type WidgetProps = GetFormResultType<typeof widgetPropsDef>;
|
||||||
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
const props = defineProps<{ widget?: Widget<WidgetProps> }>();
|
||||||
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
const emit = defineEmits<{ (ev: "updateProps", props: WidgetProps) }>();
|
||||||
|
|
||||||
const { widgetProps, configure } = useWidgetPropsManager(
|
const { configure } = useWidgetPropsManager(name, widgetPropsDef, props, emit);
|
||||||
name,
|
|
||||||
widgetPropsDef,
|
|
||||||
props,
|
|
||||||
emit,
|
|
||||||
);
|
|
||||||
|
|
||||||
defineExpose<WidgetComponentExpose>({
|
defineExpose<WidgetComponentExpose>({
|
||||||
name,
|
name,
|
||||||
|
|
|
@ -23,13 +23,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick, onMounted, onUnmounted, reactive, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
import * as os from "@/os";
|
import * as os from "@/os";
|
||||||
import { useInterval } from "@/scripts/use-interval";
|
import { useInterval } from "@/scripts/use-interval";
|
||||||
|
|
|
@ -19,11 +19,7 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onUnmounted, ref, watch } from "vue";
|
import { onUnmounted, ref, watch } from "vue";
|
||||||
import type { Widget, WidgetComponentExpose } from "./widget";
|
import type { Widget, WidgetComponentExpose } from "./widget";
|
||||||
import {
|
import { useWidgetPropsManager } from "./widget";
|
||||||
WidgetComponentEmits,
|
|
||||||
WidgetComponentProps,
|
|
||||||
useWidgetPropsManager,
|
|
||||||
} from "./widget";
|
|
||||||
import type { GetFormResultType } from "@/scripts/form";
|
import type { GetFormResultType } from "@/scripts/form";
|
||||||
|
|
||||||
const name = "unixClock";
|
const name = "unixClock";
|
||||||
|
|
Loading…
Reference in a new issue