0
0

refactor(frontend): global/router -> router

This commit is contained in:
syuilo 2024-01-30 21:07:34 +09:00
parent eb078d67ab
commit 8aea3603a6
48 changed files with 48 additions and 48 deletions

View File

@ -22,7 +22,7 @@ import { getAccountFromId } from '@/scripts/get-account-from-id.js';
import { deckStore } from '@/ui/deck/deck-store.js';
import { miLocalStorage } from '@/local-storage.js';
import { fetchCustomEmojis } from '@/custom-emojis.js';
import { setupRouter } from '@/global/router/definition.js';
import { setupRouter } from '@/router/definition.js';
export async function common(createVue: () => App<Element>) {
console.info(`Misskey v${version}`);

View File

@ -19,7 +19,7 @@ import { claimAchievement, claimedAchievements } from '@/scripts/achievements.js
import { initializeSw } from '@/scripts/initialize-sw.js';
import { deckStore } from '@/ui/deck/deck-store.js';
import { emojiPicker } from '@/scripts/emoji-picker.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
export async function mainBoot() {
const { isClientUpdated } = await common(() => createApp(

View File

@ -47,7 +47,7 @@ import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';
import { getDriveFileMenu } from '@/scripts/get-drive-file-menu.js';
import { deviceKind } from '@/scripts/device-kind.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -41,8 +41,8 @@ import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.j
import { openingWindowsCount } from '@/os.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { getScrollContainer } from '@/scripts/scroll.js';
import { useRouterFactory } from '@/global/router/supplier.js';
import { mainRouter } from '@/global/router/main.js';
import { useRouterFactory } from '@/router/supplier.js';
import { mainRouter } from '@/router/main.js';
const props = defineProps<{
initialPath: string;

View File

@ -15,7 +15,7 @@ import * as os from '@/os.js';
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
import { url } from '@/config.js';
import { i18n } from '@/i18n.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const props = withDefaults(defineProps<{
to: string;

View File

@ -37,7 +37,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js';
import { PageMetadata, definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const isEmpty = (x: string | null) => x == null || x === '';

View File

@ -33,7 +33,7 @@ import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import MkButton from '@/components/MkButton.vue';
import { rolesCache } from '@/cache.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -75,7 +75,7 @@ import MkUserCardMini from '@/components/MkUserCardMini.vue';
import MkInfo from '@/components/MkInfo.vue';
import MkPagination from '@/components/MkPagination.vue';
import { infoImageUrl } from '@/instance.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -239,7 +239,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
import { instance } from '@/instance.js';
import MkFoldableSection from '@/components/MkFoldableSection.vue';
import { ROLE_POLICIES } from '@/const.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();
const baseRoleQ = ref('');

View File

@ -32,7 +32,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -82,7 +82,7 @@ import { i18n } from '@/i18n.js';
import MkFolder from '@/components/MkFolder.vue';
import MkSwitch from '@/components/MkSwitch.vue';
import MkTextarea from '@/components/MkTextarea.vue';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));

View File

@ -94,7 +94,7 @@ import { PageHeaderItem } from '@/types/page-header.js';
import { isSupportShare } from '@/scripts/navigator.js';
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
import { miLocalStorage } from '@/local-storage.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -63,7 +63,7 @@ import MkFoldableSection from '@/components/MkFoldableSection.vue';
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -80,7 +80,7 @@ import { infoImageUrl } from '@/instance.js';
import { i18n } from '@/i18n.js';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -45,7 +45,7 @@ import MkTextarea from '@/components/MkTextarea.vue';
import MkCodeEditor from '@/components/MkCodeEditor.vue';
import MkInput from '@/components/MkInput.vue';
import MkSelect from '@/components/MkSelect.vue';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const PRESET_DEFAULT = `/// @ 0.16.0

View File

@ -47,7 +47,7 @@ import MkButton from '@/components/MkButton.vue';
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -15,7 +15,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { defaultStore } from '@/store.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
async function follow(user): Promise<void> {
const { canceled } = await os.confirm({

View File

@ -50,7 +50,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -54,7 +54,7 @@ import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue';
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -78,7 +78,7 @@ import { defaultStore } from '@/store.js';
import { $i } from '@/account.js';
import { isSupportShare } from '@/scripts/navigator.js';
import copyToClipboard from '@/scripts/copy-to-clipboard.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -15,7 +15,7 @@ import XAntenna from './editor.vue';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { antennasCache } from '@/cache.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -17,7 +17,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { antennasCache } from '@/cache.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -69,7 +69,7 @@ import { userListsCache } from '@/cache.js';
import { signinRequired } from '@/account.js';
import { defaultStore } from '@/store.js';
import MkPagination from '@/components/MkPagination.vue';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const $i = signinRequired();

View File

@ -76,7 +76,7 @@ import { selectFile } from '@/scripts/select-file.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { $i } from '@/account.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const props = defineProps<{
initPageId?: string;

View File

@ -45,7 +45,7 @@ import MkButton from '@/components/MkButton.vue';
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -26,7 +26,7 @@ import MkButton from '@/components/MkButton.vue';
import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const props = defineProps<{
token?: string;

View File

@ -122,7 +122,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
import MkFolder from '@/components/MkFolder.vue';
import * as os from '@/os.js';
import { MenuItem } from '@/types/menu.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const $i = signinRequired();

View File

@ -18,7 +18,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { useStream } from '@/stream.js';
import { signinRequired } from '@/account.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
import { useInterval } from '@/scripts/use-interval.js';

View File

@ -115,7 +115,7 @@ import MkFolder from '@/components/MkFolder.vue';
import { i18n } from '@/i18n.js';
import { $i } from '@/account.js';
import MkPagination from '@/components/MkPagination.vue';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
import * as os from '@/os.js';
import { useInterval } from '@/scripts/use-interval.js';
import { pleaseLogin } from '@/scripts/please-login.js';

View File

@ -52,7 +52,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import MkFoldableSection from '@/components/MkFoldableSection.vue';
import MkFolder from '@/components/MkFolder.vue';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -34,7 +34,7 @@ import { i18n } from '@/i18n.js';
import * as os from '@/os.js';
import MkFoldableSection from '@/components/MkFoldableSection.vue';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -37,7 +37,7 @@ import { clearCache } from '@/scripts/clear-cache.js';
import { instance } from '@/instance.js';
import { PageMetadata, definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import * as os from '@/os.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const indexInfo = {
title: i18n.ts.settings,

View File

@ -51,7 +51,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -31,7 +31,7 @@ import { scroll } from '@/scripts/scroll.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
const router = useRouter();

View File

@ -172,7 +172,7 @@ import { dateString } from '@/filters/date.js';
import { confetti } from '@/scripts/confetti.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { isFollowingVisibleForMe, isFollowersVisibleForMe } from '@/scripts/isFfVisibleForMe.js';
import { useRouter } from '@/global/router/supplier.js';
import { useRouter } from '@/router/supplier.js';
function calcAge(birthdate: string): number {
const date = new Date(birthdate);

View File

@ -9,7 +9,7 @@ import { IRouter, Router } from '@/nirax.js';
import { $i, iAmModerator } from '@/account.js';
import MkLoading from '@/pages/_loading_.vue';
import MkError from '@/pages/_error_.vue';
import { setMainRouter } from '@/global/router/main.js';
import { setMainRouter } from '@/router/main.js';
const page = (loader: AsyncComponentLoader<any>) => defineAsyncComponent({
loader: loader,

View File

@ -5,7 +5,7 @@
import { inject } from 'vue';
import { IRouter, Router } from '@/nirax.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
/**
* {@link Router}

View File

@ -15,7 +15,7 @@ import { defaultStore, userActions } from '@/store.js';
import { $i, iAmModerator } from '@/account.js';
import { IRouter } from '@/nirax.js';
import { antennasCache, rolesCache, userListsCache } from '@/cache.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
export function getUserMenu(user: Misskey.entities.UserDetailed, router: IRouter = mainRouter) {
const meId = $i ? $i.id : null;

View File

@ -7,7 +7,7 @@ import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { i18n } from '@/i18n.js';
import { Router } from '@/nirax.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
export async function lookup(router?: Router) {
const _router = router ?? mainRouter;

View File

@ -8,7 +8,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js';
import { $i, login } from '@/account.js';
import { getAccountFromId } from '@/scripts/get-account-from-id.js';
import { deepClone } from '@/scripts/clone.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
export function swInject() {
navigator.serviceWorker.addEventListener('message', async ev => {

View File

@ -56,7 +56,7 @@ import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.j
import { defaultStore } from '@/store.js';
import { i18n } from '@/i18n.js';
import { miLocalStorage } from '@/local-storage.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const XHeaderMenu = defineAsyncComponent(() => import('./classic.header.vue'));
const XWidgets = defineAsyncComponent(() => import('./universal.widgets.vue'));

View File

@ -116,7 +116,7 @@ import XWidgetsColumn from '@/ui/deck/widgets-column.vue';
import XMentionsColumn from '@/ui/deck/mentions-column.vue';
import XDirectColumn from '@/ui/deck/direct-column.vue';
import XRoleTimelineColumn from '@/ui/deck/role-timeline-column.vue';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue'));
const XAnnouncements = defineAsyncComponent(() => import('@/ui/_common_/announcements.vue'));

View File

@ -27,7 +27,7 @@ import { i18n } from '@/i18n.js';
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import { useScrollPositionManager } from '@/nirax.js';
import { getScrollContainer } from '@/scripts/scroll.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
defineProps<{
column: Column;

View File

@ -18,7 +18,7 @@ import { provide, ComputedRef, ref } from 'vue';
import XCommon from './_common_/common.vue';
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import { instanceName } from '@/config.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const pageMetadata = ref<null | ComputedRef<PageMetadata>>();

View File

@ -110,7 +110,7 @@ import { deviceKind } from '@/scripts/device-kind.js';
import { miLocalStorage } from '@/local-storage.js';
import { CURRENT_STICKY_BOTTOM } from '@/const.js';
import { useScrollPositionManager } from '@/nirax.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const XWidgets = defineAsyncComponent(() => import('./universal.widgets.vue'));
const XSidebar = defineAsyncComponent(() => import('@/ui/_common_/navbar.vue'));

View File

@ -82,7 +82,7 @@ import { ColdDeviceStorage, defaultStore } from '@/store.js';
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
import MkVisitorDashboard from '@/components/MkVisitorDashboard.vue';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const DESKTOP_THRESHOLD = 1100;

View File

@ -27,7 +27,7 @@ import XCommon from './_common_/common.vue';
import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js';
import { instanceName, ui } from '@/config.js';
import { i18n } from '@/i18n.js';
import { mainRouter } from '@/global/router/main.js';
import { mainRouter } from '@/router/main.js';
const pageMetadata = ref<null | ComputedRef<PageMetadata>>();