diff --git a/apps/desktop/.gitignore b/apps/desktop/.gitignore index 8d939d16..a7f40a76 100644 --- a/apps/desktop/.gitignore +++ b/apps/desktop/.gitignore @@ -1,3 +1,4 @@ /dist-isolation /coverage /src/bindings.ts +/dist \ No newline at end of file diff --git a/apps/desktop/dist/.gitignore b/apps/desktop/dist/.gitignore deleted file mode 100644 index c5327226..00000000 --- a/apps/desktop/dist/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore -# This is done so that Tauri never complains that '../dist does not exist' diff --git a/apps/desktop/src-tauri/src/api/commands.rs b/apps/desktop/src-tauri/src/api/commands.rs index 6084ecaf..625f7a80 100644 --- a/apps/desktop/src-tauri/src/api/commands.rs +++ b/apps/desktop/src-tauri/src/api/commands.rs @@ -105,6 +105,14 @@ pub async fn run_cluster(uuid: Uuid) -> Result<(Uuid, u32), String> { .id() .unwrap_or(0); + // tokio::task::spawn(async move { + // let mut proc = c_lock.write().await; + // if let Err(err) = processor::wait_for(&mut proc).await { + // tracing::error!("Error waiting for process: {:?}", err); + // }; + // }); + + // let mut proc = c_lock.write().await; // processor::wait_for(&mut proc).await?; Ok((p_uuid, p_pid)) @@ -135,37 +143,6 @@ pub async fn kill_process(uuid: Uuid) -> Result<(), String> { // } -// fn placeholder_cluster() -> Cluster { -// let path = ClusterPath("test".into()); -// Cluster { -// uuid: Uuid::from_str("56d1cbcf-1961-4477-b263-80e3b1c7a9d1").unwrap(), -// stage: onelauncher::store::ClusterStage::Installed, -// path: path.0, -// meta: ClusterMeta { -// created_at: DateTime::from_timestamp_millis(1718297861712).unwrap(), -// modified_at: DateTime::from_timestamp_millis(1718297861712).unwrap(), -// group: vec![], -// icon: None, -// icon_url: None, -// loader: Loader::Vanilla, -// loader_version: None, -// mc_version: "1.8.9".into(), -// name: "Test Cluster".into(), -// overall_played: 58195, -// recently_played: 0, -// package_data: None, -// played_at: None, -// }, -// memory: None, -// java: None, -// resolution: None, -// force_fullscreen: None, -// init_hooks: None, -// packages: HashMap::new(), -// update: None, -// } -// } - #[specta::specta] #[tauri::command] pub async fn get_cluster(uuid: Uuid) -> Result { diff --git a/apps/desktop/src/ui/components/overlay/AccountPopup.tsx b/apps/desktop/src/ui/components/overlay/AccountPopup.tsx index 7815a015..5f48f91e 100644 --- a/apps/desktop/src/ui/components/overlay/AccountPopup.tsx +++ b/apps/desktop/src/ui/components/overlay/AccountPopup.tsx @@ -44,9 +44,7 @@ function AccountPopup(props: Popup.PopupProps) {
- - - +
diff --git a/apps/desktop/src/ui/components/overlay/cluster/ClusterStepOne.tsx b/apps/desktop/src/ui/components/overlay/cluster/ClusterStepOne.tsx index 4b916446..97a59f27 100644 --- a/apps/desktop/src/ui/components/overlay/cluster/ClusterStepOne.tsx +++ b/apps/desktop/src/ui/components/overlay/cluster/ClusterStepOne.tsx @@ -1,4 +1,4 @@ -import { User03Icon } from '@untitled-theme/icons-solid'; +import { Upload01Icon, User03Icon } from '@untitled-theme/icons-solid'; import { Index, type JSX, createEffect, createSignal, on } from 'solid-js'; import type { ClusterStepProps } from './ClusterCreationModal'; import ModrinthIcon from '~assets/logos/modrinth.svg?component-solid'; @@ -19,7 +19,7 @@ const providers: Omit[] = [ }, { name: 'Import', - icon: , + icon: , }, ]; diff --git a/apps/desktop/src/ui/hooks/useCommand.ts b/apps/desktop/src/ui/hooks/useCommand.ts index 7b533c29..f33f8c3f 100644 --- a/apps/desktop/src/ui/hooks/useCommand.ts +++ b/apps/desktop/src/ui/hooks/useCommand.ts @@ -11,11 +11,21 @@ export default function useCommand( ...args: Args ): ResourceReturn { return createResource(async () => { - const value = await cmd(...args); - - if (value.status === 'ok') - return value.data; - - throw value.error; + console.log('aaaa', cmd); + const test = await tryResult(cmd, ...args); + console.log('bbbb'); + return test; }); } + +export async function tryResult( + cmd: (...args: Args) => Promise>, + ...args: Args +): Promise { + const value = await cmd(...args); + + if (value.status === 'ok') + return value.data; + + throw value.error; +} diff --git a/apps/desktop/src/ui/pages/Home.tsx b/apps/desktop/src/ui/pages/Home.tsx index cff5bcd1..caeb0b94 100644 --- a/apps/desktop/src/ui/pages/Home.tsx +++ b/apps/desktop/src/ui/pages/Home.tsx @@ -105,14 +105,14 @@ function Banner() {

Building worlds

-

A description would go here if I was smart

+

DEV BUILD - NOT FINAL