diff --git a/src/app/componets/VersionUpdateWarning.tsx b/src/app/componets/VersionUpdateWarning.tsx deleted file mode 100644 index edd8889..0000000 --- a/src/app/componets/VersionUpdateWarning.tsx +++ /dev/null @@ -1,105 +0,0 @@ -'use client' - -import { invoke } from '@tauri-apps/api/core' -import { useGlobal } from '../GlobalProvider' -import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' -import { writeVersionsConfig } from '../util/BazookaManager' -import { useState } from 'react' - -export default function VersionUpdateWarning () { - const [confirmed, setConfirmed] = useState<-1 | 0>(-1) - - const { - managingVersion, - setDownloadedVersionsConfig, - setManagingVersion, - setPopupMode, - setSelectedVersionList, - downloadVersions - } = useGlobal() - if (!managingVersion) return

Error

- - return ( - <> -

Warning!

-
-

- Before proceeding, please note that any modifications to the - installation directory (NOT THE SAVE DATA) will be completely - wiped/reset. -

-

- If you do not want your installation directory wiped just yet, please - backup the files to another directory. When you click update, it will - be wiped. -

-

- Updating will have the same effect as clicking the uninstall button - then installing again. -

-

Revisions are not a frequent thing and rarely ever happen.

-
- - -
-
- - ) -} diff --git a/src/app/game/page.tsx b/src/app/game/page.tsx index f88cebd..72de0af 100644 --- a/src/app/game/page.tsx +++ b/src/app/game/page.tsx @@ -8,6 +8,9 @@ import { useSearchParams } from 'next/navigation' import { platform } from '@tauri-apps/plugin-os' import { faWarning } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { ask } from '@tauri-apps/plugin-dialog' +import { BaseDirectory, exists, remove } from '@tauri-apps/plugin-fs' +import { writeVersionsConfig } from '../util/BazookaManager' export default function Installs () { const { @@ -24,7 +27,9 @@ export default function Installs () { setSelectedGame, serverVersionList, category, - setCategory + setCategory, + setDownloadedVersionsConfig, + downloadVersions } = useGlobal() const params = useSearchParams() @@ -390,12 +395,64 @@ export default function Installs () {