diff --git a/src/app/GlobalProvider.tsx b/src/app/GlobalProvider.tsx index f5e54f9..43d3500 100644 --- a/src/app/GlobalProvider.tsx +++ b/src/app/GlobalProvider.tsx @@ -7,12 +7,12 @@ import { Dispatch, SetStateAction } from 'react' -import { DownloadProgress } from './types/DownloadProgress' -import { VersionsConfig } from './types/VersionsConfig' -import { NormalConfig } from './types/NormalConfig' -import { ServerVersionsResponse } from './types/ServerVersionsResponse' -import { GameVersion } from './types/GameVersion' -import { Game } from './types/Game' +import { DownloadProgress } from '../types/DownloadProgress' +import { VersionsConfig } from '../types/VersionsConfig' +import { NormalConfig } from '../types/NormalConfig' +import { ServerVersionsResponse } from '../types/ServerVersionsResponse' +import { GameVersion } from '../types/GameVersion' +import { Game } from '../types/Game' type GlobalCtxType = { serverVersionList: ServerVersionsResponse | null diff --git a/src/app/componets/Setting.tsx b/src/app/componets/Setting.tsx index ed1c18d..5fe648b 100644 --- a/src/app/componets/Setting.tsx +++ b/src/app/componets/Setting.tsx @@ -1,7 +1,7 @@ import './Setting.css' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCheck } from '@fortawesome/free-solid-svg-icons' -import { SettingProps } from '../types/SettingProps' +import { SettingProps } from '../../types/SettingProps' export function Setting ({ label, diff --git a/src/app/game/page.tsx b/src/app/game/page.tsx index 99782aa..056ad69 100644 --- a/src/app/game/page.tsx +++ b/src/app/game/page.tsx @@ -10,7 +10,7 @@ import { faWarning } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { ask, message } from '@tauri-apps/plugin-dialog' import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' -import { writeVersionsConfig } from '../util/BazookaManager' +import { writeVersionsConfig } from '@/lib/BazookaManager' export default function Installs () { const { diff --git a/src/app/layout.tsx b/src/app/layout.tsx index b6813d4..14d5645 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef, useState } from 'react' import Sidebar from './componets/Sidebar' import './Globals.css' -import { DownloadProgress } from './types/DownloadProgress' +import { DownloadProgress } from '../types/DownloadProgress' import { invoke } from '@tauri-apps/api/core' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { @@ -22,24 +22,24 @@ import { readNormalConfig, readVersionsConfig, writeVersionsConfig -} from './util/BazookaManager' -import { VersionsConfig } from './types/VersionsConfig' -import { NormalConfig } from './types/NormalConfig' +} from '@/lib/BazookaManager' +import { VersionsConfig } from '../types/VersionsConfig' +import { NormalConfig } from '../types/NormalConfig' import { app } from '@tauri-apps/api' import axios from 'axios' import { openUrl } from '@tauri-apps/plugin-opener' import { GlobalProvider } from './GlobalProvider' import { Roboto } from 'next/font/google' -import { ServerVersionsResponse } from './types/ServerVersionsResponse' -import { GameVersion } from './types/GameVersion' -import { Game } from './types/Game' +import { ServerVersionsResponse } from '../types/ServerVersionsResponse' +import { GameVersion } from '../types/GameVersion' +import { Game } from '../types/Game' import { listen } from '@tauri-apps/api/event' import { usePathname } from 'next/navigation' import { arch, platform } from '@tauri-apps/plugin-os' import VersionInfo from './componets/VersionInfo' import prettyBytes from 'pretty-bytes' import ProgressBar from './componets/ProgressBar' -import { notifyUser } from './util/Notifications' +import { notifyUser } from '@/lib/Notifications' import { isPermissionGranted, requestPermission diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index dc8322f..d14e5e0 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -2,9 +2,9 @@ import { useEffect, useState } from 'react' import { Setting } from '../componets/Setting' -import { writeNormalConfig } from '../util/BazookaManager' +import { writeNormalConfig } from '@/lib/BazookaManager' import { useGlobal } from '../GlobalProvider' -import { copyToClipboard } from '../util/Clipboard' +import { copyToClipboard } from '@/lib/Clipboard' import { platform } from '@tauri-apps/plugin-os' export default function Settings () { diff --git a/src/app/util/BazookaManager.ts b/src/lib/BazookaManager.ts similarity index 97% rename from src/app/util/BazookaManager.ts rename to src/lib/BazookaManager.ts index 3a23e34..81ec1be 100644 --- a/src/app/util/BazookaManager.ts +++ b/src/lib/BazookaManager.ts @@ -1,5 +1,5 @@ import { app } from '@tauri-apps/api' -import { NormalConfig } from '../types/NormalConfig' +import { NormalConfig } from '@/types/NormalConfig' import { BaseDirectory, create, @@ -8,7 +8,7 @@ import { readTextFile, writeFile } from '@tauri-apps/plugin-fs' -import { VersionsConfig } from '../types/VersionsConfig' +import { VersionsConfig } from '@/types/VersionsConfig' export async function readNormalConfig (): Promise { const version = await app.getVersion() diff --git a/src/app/util/Clipboard.ts b/src/lib/Clipboard.ts similarity index 83% rename from src/app/util/Clipboard.ts rename to src/lib/Clipboard.ts index 8a7f1a5..de0204b 100644 --- a/src/app/util/Clipboard.ts +++ b/src/lib/Clipboard.ts @@ -1,4 +1,4 @@ -import { NormalConfig } from '../types/NormalConfig' +import { NormalConfig } from '@/types/NormalConfig' import { notifyUser } from './Notifications' export async function copyToClipboard ( diff --git a/src/app/util/Notifications.ts b/src/lib/Notifications.ts similarity index 100% rename from src/app/util/Notifications.ts rename to src/lib/Notifications.ts diff --git a/src/app/types/DownloadProgress.ts b/src/types/DownloadProgress.ts similarity index 100% rename from src/app/types/DownloadProgress.ts rename to src/types/DownloadProgress.ts diff --git a/src/app/types/Game.ts b/src/types/Game.ts similarity index 100% rename from src/app/types/Game.ts rename to src/types/Game.ts diff --git a/src/app/types/GameVersion.ts b/src/types/GameVersion.ts similarity index 100% rename from src/app/types/GameVersion.ts rename to src/types/GameVersion.ts diff --git a/src/app/types/LeaderboardEntry.ts b/src/types/LeaderboardEntry.ts similarity index 100% rename from src/app/types/LeaderboardEntry.ts rename to src/types/LeaderboardEntry.ts diff --git a/src/app/types/LeaderboardResponse.ts b/src/types/LeaderboardResponse.ts similarity index 100% rename from src/app/types/LeaderboardResponse.ts rename to src/types/LeaderboardResponse.ts diff --git a/src/app/types/NormalConfig.ts b/src/types/NormalConfig.ts similarity index 100% rename from src/app/types/NormalConfig.ts rename to src/types/NormalConfig.ts diff --git a/src/app/types/ServerVersionsResponse.ts b/src/types/ServerVersionsResponse.ts similarity index 100% rename from src/app/types/ServerVersionsResponse.ts rename to src/types/ServerVersionsResponse.ts diff --git a/src/app/types/SettingProps.ts b/src/types/SettingProps.ts similarity index 100% rename from src/app/types/SettingProps.ts rename to src/types/SettingProps.ts diff --git a/src/app/types/SettingsType.ts b/src/types/SettingsType.ts similarity index 100% rename from src/app/types/SettingsType.ts rename to src/types/SettingsType.ts diff --git a/src/app/types/VersionsConfig.ts b/src/types/VersionsConfig.ts similarity index 100% rename from src/app/types/VersionsConfig.ts rename to src/types/VersionsConfig.ts