From c6e2133e15918891fcd998f45b86da6870e08bea Mon Sep 17 00:00:00 2001 From: "Adrian O.V" <83074853+CodexAdrian@users.noreply.github.com> Date: Tue, 16 May 2023 22:25:00 -0400 Subject: [PATCH] Search UI improvements (#107) * Base impl * Make project type selectable * Update Browse.vue * address changes * Quick create * Run linter * fix merge * Addressed changes * Installation improvements * Run lint * resourcepacks * automatic installation of dependencies * Fix bugs with search * Addressed changes * Run linter * Fixed direct install not working * Remove back to search * Update Index.vue * Addressed some changes * Shader fix * fix resetting * Update Browse.vue * Direct install from search * More improvements * Update SearchCard.vue * Card V2 * Run linter * add instance ignoring * Update Browse.vue * Finalize changes * Update SearchCard.vue * More adjustments * Fix out of order rendering * Run linter * Fix issues * Add unlisteners --------- Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com> Co-authored-by: Jai A --- theseus/src/state/children.rs | 8 + theseus_gui/src/App.vue | 28 +- .../src/assets/stylesheets/global.scss | 6 + .../ui/IncompatibilityWarningModal.vue | 136 +++++++ .../src/components/ui/InstallConfirmModal.vue | 13 +- theseus_gui/src/components/ui/Instance.vue | 144 ++++--- .../components/ui/InstanceCreationModal.vue | 1 + .../components/ui/InstanceInstallModal.vue | 18 +- .../src/components/ui/RunningAppBar.vue | 3 +- theseus_gui/src/components/ui/SearchCard.vue | 282 +++++++++++++ theseus_gui/src/pages/Browse.vue | 382 ++++++++++-------- theseus_gui/src/pages/Library.vue | 5 +- theseus_gui/src/pages/instance/Index.vue | 19 +- theseus_gui/src/pages/instance/Mods.vue | 5 +- theseus_gui/src/pages/project/Description.vue | 2 +- theseus_gui/src/pages/project/Index.vue | 51 ++- theseus_gui/src/pages/project/Versions.vue | 20 +- theseus_gui/src/store/search.js | 5 +- 18 files changed, 835 insertions(+), 293 deletions(-) create mode 100644 theseus_gui/src/components/ui/IncompatibilityWarningModal.vue create mode 100644 theseus_gui/src/components/ui/SearchCard.vue diff --git a/theseus/src/state/children.rs b/theseus/src/state/children.rs index 9cb079881..e0ca2e404 100644 --- a/theseus/src/state/children.rs +++ b/theseus/src/state/children.rs @@ -127,6 +127,14 @@ impl Children { } } if !mc_exit_status.success() { + emit_process( + uuid, + current_pid, + ProcessPayloadType::Finished, + "Exited process", + ) + .await?; + return Ok(mc_exit_status); // Err for a non-zero exit is handled in helper } diff --git a/theseus_gui/src/App.vue b/theseus_gui/src/App.vue index a8880b6a7..eea974199 100644 --- a/theseus_gui/src/App.vue +++ b/theseus_gui/src/App.vue @@ -75,24 +75,24 @@ const loading = useLoading() Library -
+ diff --git a/theseus_gui/src/components/ui/InstallConfirmModal.vue b/theseus_gui/src/components/ui/InstallConfirmModal.vue index 8eecc3334..065a521d4 100644 --- a/theseus_gui/src/components/ui/InstallConfirmModal.vue +++ b/theseus_gui/src/components/ui/InstallConfirmModal.vue @@ -2,11 +2,15 @@ import { Button, Modal, XIcon, DownloadIcon } from 'omorphia' import { install as pack_install } from '@/helpers/pack' import { ref } from 'vue' +import { useRouter } from 'vue-router' + +const router = useRouter() const version = ref('') const title = ref('') const icon = ref('') const confirmModal = ref(null) +const installing = ref(false) defineExpose({ show: (id, projectTitle, projectIcon) => { @@ -18,8 +22,11 @@ defineExpose({ }) async function install() { - confirmModal.value.hide() + installing.value = true + let id = await pack_install(version.value) await pack_install(version.value, title.value, icon.value ? icon.value : null) + await router.push({ path: `/instance/${encodeURIComponent(id)}` }) + confirmModal.value.hide() } @@ -31,7 +38,9 @@ async function install() {

- +
diff --git a/theseus_gui/src/components/ui/Instance.vue b/theseus_gui/src/components/ui/Instance.vue index 59619d45c..44dfd1bfc 100644 --- a/theseus_gui/src/components/ui/Instance.vue +++ b/theseus_gui/src/components/ui/Instance.vue @@ -1,5 +1,5 @@