From abb02ad6249931d5cf36df64d846ec4617efc465 Mon Sep 17 00:00:00 2001 From: chaos <72168435+qtchaos@users.noreply.github.com> Date: Sat, 19 Aug 2023 04:30:07 +0300 Subject: [PATCH] Fix being able to add mods to paired instances (#630) * Fix being able to add mods to paired instances * Remove debugging output. --- theseus_gui/src/components/ui/ContextMenu.vue | 15 +- .../src/components/ui/ModInstallModal.vue | 31 +++- theseus_gui/src/pages/instance/Mods.vue | 161 +++++++++--------- 3 files changed, 119 insertions(+), 88 deletions(-) diff --git a/theseus_gui/src/components/ui/ContextMenu.vue b/theseus_gui/src/components/ui/ContextMenu.vue index 94b5c2803..cd4d442cc 100644 --- a/theseus_gui/src/components/ui/ContextMenu.vue +++ b/theseus_gui/src/components/ui/ContextMenu.vue @@ -11,7 +11,11 @@ >

-
+
@@ -55,6 +59,15 @@ defineExpose({ }, }) +const isLinkedData = (item) => { + if (item.instance != undefined && item.instance.metadata.linked_data) { + return true + } else if (item.metadata != undefined && item.metadata.linked_data) { + return true + } + return false +} + const hideContextMenu = () => { shown.value = false emit('menu-closed') diff --git a/theseus_gui/src/components/ui/ModInstallModal.vue b/theseus_gui/src/components/ui/ModInstallModal.vue index a9149dc56..0e570cc09 100644 --- a/theseus_gui/src/components/ui/ModInstallModal.vue +++ b/theseus_gui/src/components/ui/ModInstallModal.vue @@ -245,13 +245,30 @@ const check_valid = computed(() => { /> {{ profile.metadata.name }} - +
+ +
diff --git a/theseus_gui/src/pages/instance/Mods.vue b/theseus_gui/src/pages/instance/Mods.vue index da35d8700..3501fba2e 100644 --- a/theseus_gui/src/pages/instance/Mods.vue +++ b/theseus_gui/src/pages/instance/Mods.vue @@ -65,14 +65,10 @@ :link-function="(page) => `?page=${page}`" @switch-page="switchPage" /> - +
-
+
@@ -88,23 +84,21 @@
-
-
- +
+
+ +
- - - +
+ +
+
+ +
+
+ +
-
+
- - - +
+ +
+ +
+ +
+
+ +