From 815d0a60bc146f1a6f06f55775e8917f078e29a4 Mon Sep 17 00:00:00 2001 From: "Adrian O.V" <83074853+CodexAdrian@users.noreply.github.com> Date: Fri, 30 Jun 2023 11:14:06 -0400 Subject: [PATCH] Export UI (#297) * Exporting * Linter * Fixed helper error * Delete export --- theseus_gui/src/assets/icons/index.js | 2 + theseus_gui/src/assets/icons/milestone.svg | 1 + theseus_gui/src/assets/icons/package.svg | 1 + theseus_gui/src/components/ui/ExportModal.vue | 238 ++++++++++++++++++ theseus_gui/src/helpers/profile.js | 4 +- theseus_gui/src/pages/instance/Index.vue | 28 ++- theseus_gui/src/pages/instance/Mods.vue | 1 + theseus_gui/src/pages/project/Index.vue | 2 +- 8 files changed, 272 insertions(+), 5 deletions(-) create mode 100644 theseus_gui/src/assets/icons/milestone.svg create mode 100644 theseus_gui/src/assets/icons/package.svg create mode 100644 theseus_gui/src/components/ui/ExportModal.vue diff --git a/theseus_gui/src/assets/icons/index.js b/theseus_gui/src/assets/icons/index.js index a31b1728c..195e41cfc 100644 --- a/theseus_gui/src/assets/icons/index.js +++ b/theseus_gui/src/assets/icons/index.js @@ -2,3 +2,5 @@ export { default as ServerIcon } from './server.svg' export { default as MinimizeIcon } from './minimize.svg' export { default as MaximizeIcon } from './maximize.svg' export { default as SwapIcon } from './arrow-left-right.svg' +export { default as PackageIcon } from './package.svg' +export { default as VersionIcon } from './milestone.svg' diff --git a/theseus_gui/src/assets/icons/milestone.svg b/theseus_gui/src/assets/icons/milestone.svg new file mode 100644 index 000000000..d93649844 --- /dev/null +++ b/theseus_gui/src/assets/icons/milestone.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theseus_gui/src/assets/icons/package.svg b/theseus_gui/src/assets/icons/package.svg new file mode 100644 index 000000000..fb3a2cb1f --- /dev/null +++ b/theseus_gui/src/assets/icons/package.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theseus_gui/src/components/ui/ExportModal.vue b/theseus_gui/src/components/ui/ExportModal.vue new file mode 100644 index 000000000..15a1065d9 --- /dev/null +++ b/theseus_gui/src/components/ui/ExportModal.vue @@ -0,0 +1,238 @@ + + + + + diff --git a/theseus_gui/src/helpers/profile.js b/theseus_gui/src/helpers/profile.js index a23f3fd07..b6eb21b3f 100644 --- a/theseus_gui/src/helpers/profile.js +++ b/theseus_gui/src/helpers/profile.js @@ -98,7 +98,7 @@ export async function remove_project(path, projectPath) { /// included_overrides is an array of paths to override folders to include (ie: 'mods', 'resource_packs') // Version id is optional (ie: 1.1.5) export async function export_profile_mrpack(path, exportLocation, includedOverrides, versionId) { - return await invoke('profile_export_mrpack', { + return await invoke('plugin:profile|profile_export_mrpack', { path, exportLocation, includedOverrides, @@ -115,7 +115,7 @@ export async function export_profile_mrpack(path, exportLocation, includedOverri // => [mods, resourcepacks] // allows selection for 'included_overrides' in export_profile_mrpack export async function get_potential_override_folders(profilePath) { - return await invoke('profile_get_potential_override_folders', { profilePath }) + return await invoke('plugin:profile|profile_get_potential_override_folders', { profilePath }) } // Run Minecraft using a pathed profile diff --git a/theseus_gui/src/pages/instance/Index.vue b/theseus_gui/src/pages/instance/Index.vue index d0677da5f..8db75a1e3 100644 --- a/theseus_gui/src/pages/instance/Index.vue +++ b/theseus_gui/src/pages/instance/Index.vue @@ -72,6 +72,13 @@ Options +
+
+ +
@@ -95,6 +102,7 @@ +