From 406ae172f23b03f1ca292548ad004bf63db19aa7 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Tue, 28 Apr 2026 11:09:33 -0700 Subject: [PATCH 01/10] Update modpack button copy --- packages/assets/generated-icons.ts | 4 ++-- .../flows/creation-flow-modal/components/SetupTypeStage.vue | 4 ++-- packages/ui/src/locales/en-US/index.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/assets/generated-icons.ts b/packages/assets/generated-icons.ts index 7e815d7931..03015155f8 100644 --- a/packages/assets/generated-icons.ts +++ b/packages/assets/generated-icons.ts @@ -3,6 +3,8 @@ import type { FunctionalComponent, SVGAttributes } from 'vue' +export type IconComponent = FunctionalComponent + import _AffiliateIcon from './icons/affiliate.svg?component' import _AlignLeftIcon from './icons/align-left.svg?component' import _ArchiveIcon from './icons/archive.svg?component' @@ -392,8 +394,6 @@ import _XCircleIcon from './icons/x-circle.svg?component' import _ZoomInIcon from './icons/zoom-in.svg?component' import _ZoomOutIcon from './icons/zoom-out.svg?component' -export type IconComponent = FunctionalComponent - export const AffiliateIcon = _AffiliateIcon export const AlignLeftIcon = _AlignLeftIcon export const ArchiveIcon = _ArchiveIcon diff --git a/packages/ui/src/components/flows/creation-flow-modal/components/SetupTypeStage.vue b/packages/ui/src/components/flows/creation-flow-modal/components/SetupTypeStage.vue index 15a4f30c22..d9dd0d00b0 100644 --- a/packages/ui/src/components/flows/creation-flow-modal/components/SetupTypeStage.vue +++ b/packages/ui/src/components/flows/creation-flow-modal/components/SetupTypeStage.vue @@ -95,11 +95,11 @@ const messages = defineMessages({ }, modpackBaseTitle: { id: 'creation-flow.modal.setup-type.option.modpack-base.title', - defaultMessage: 'Modpack base', + defaultMessage: 'Install modpack', }, modpackBaseDescription: { id: 'creation-flow.modal.setup-type.option.modpack-base.description', - defaultMessage: 'Use a popular modpack or upload one as your starting point.', + defaultMessage: 'Browse modpacks on Modrinth or import one from a file.', }, importInstanceTitle: { id: 'creation-flow.modal.setup-type.option.import-instance.title', diff --git a/packages/ui/src/locales/en-US/index.json b/packages/ui/src/locales/en-US/index.json index cadb575b23..218450499d 100644 --- a/packages/ui/src/locales/en-US/index.json +++ b/packages/ui/src/locales/en-US/index.json @@ -720,10 +720,10 @@ "defaultMessage": "Import instance" }, "creation-flow.modal.setup-type.option.modpack-base.description": { - "defaultMessage": "Use a popular modpack or upload one as your starting point." + "defaultMessage": "Browse modpacks on Modrinth or import one from a file." }, "creation-flow.modal.setup-type.option.modpack-base.title": { - "defaultMessage": "Modpack base" + "defaultMessage": "Install modpack" }, "creation-flow.modal.setup-type.option.vanilla-minecraft.description": { "defaultMessage": "Classic Minecraft with no mods or plugins." From 2e776a31fa7fbdd81e684e1998801e8c2fe68dcc Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Tue, 28 Apr 2026 11:34:28 -0700 Subject: [PATCH 02/10] Change outlined button style for standard buttons --- packages/ui/src/components/base/ButtonStyled.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/ui/src/components/base/ButtonStyled.vue b/packages/ui/src/components/base/ButtonStyled.vue index 1547e61208..f7502fb883 100644 --- a/packages/ui/src/components/base/ButtonStyled.vue +++ b/packages/ui/src/components/base/ButtonStyled.vue @@ -204,9 +204,6 @@ const colorVariables = computed(() => { if (props.type === 'outlined' || props.type === 'transparent') { colors.bg = 'transparent' - if (props.hoverColorFill === 'none') { - hoverColors.bg = 'transparent' - } colors = setColorFill(colors, props.colorFill === 'auto' ? 'text' : props.colorFill) hoverColors = setColorFill( hoverColors, @@ -245,7 +242,7 @@ const fontSize = computed(() => {
@@ -266,10 +263,8 @@ const fontSize = computed(() => { > *:first-child > *:first-child > :is(button, a, .button-like):first-child { - @apply flex cursor-pointer flex-row items-center justify-center border-solid border border-transparent bg-[--_bg] text-[--_text] h-[--_height] min-w-[--_width] rounded-[--_radius] px-[--_padding-x] py-[--_padding-y] gap-[--_gap] font-[--_font-weight] whitespace-nowrap; + @apply flex cursor-pointer flex-row items-center justify-center border-solid border-2 border-transparent bg-[--_bg] text-[--_text] h-[--_height] min-w-[--_width] rounded-[--_radius] px-[--_padding-x] py-[--_padding-y] gap-[--_gap] font-[--_font-weight] whitespace-nowrap; box-shadow: var(--_box-shadow, inset 0 0 0 transparent); - -webkit-font-smoothing: antialiased; - will-change: filter; transition: scale 0.125s ease-in-out, background-color 0.25s ease-in-out, @@ -328,7 +323,7 @@ const fontSize = computed(() => { > *:first-child > *:first-child > :is(button, a, .button-like):first-child { - @apply border-current; + @apply border-[--_outline-color,currentColor]; } /*noinspection CssUnresolvedCustomProperty*/ From 81f1de137904c68120f4f697aacb7e0740b52042 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Tue, 28 Apr 2026 11:58:06 -0700 Subject: [PATCH 03/10] add unknown pack warning modal --- apps/app-frontend/src/App.vue | 11 ++- .../install_flow/UnknownPackWarningModal.vue | 91 +++++++++++++++++++ packages/assets/generated-icons.ts | 2 + packages/assets/icons/circle-arrow-right.svg | 17 ++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue create mode 100644 packages/assets/icons/circle-arrow-right.svg diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 5cb3b66d26..60425298fe 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -63,7 +63,7 @@ import { openUrl } from '@tauri-apps/plugin-opener' import { type } from '@tauri-apps/plugin-os' import { saveWindowState, StateFlags } from '@tauri-apps/plugin-window-state' import { $fetch } from 'ofetch' -import { computed, onMounted, onUnmounted, provide, ref, watch } from 'vue' +import { computed, onMounted, onUnmounted, provide, ref, useTemplateRef, watch } from 'vue' import { RouterView, useRoute, useRouter } from 'vue-router' import ModrinthAppLogo from '@/assets/modrinth_app.svg?component' @@ -73,6 +73,7 @@ import ErrorModal from '@/components/ui/ErrorModal.vue' import FriendsList from '@/components/ui/friends/FriendsList.vue' import AddServerToInstanceModal from '@/components/ui/install_flow/AddServerToInstanceModal.vue' import IncompatibilityWarningModal from '@/components/ui/install_flow/IncompatibilityWarningModal.vue' +import UnknownPackWarningModal from '@/components/ui/install_flow/UnknownPackWarningModal.vue' import MinecraftAuthErrorModal from '@/components/ui/minecraft-auth-error-modal/MinecraftAuthErrorModal.vue' import AppSettingsModal from '@/components/ui/modal/AppSettingsModal.vue' import AuthGrantFlowWaitModal from '@/components/ui/modal/AuthGrantFlowWaitModal.vue' @@ -572,6 +573,7 @@ const addServerToInstanceModal = ref() const incompatibilityWarningModal = ref() const installToPlayModal = ref() const updateToPlayModal = ref() +const unknownPackWarningModal = useTemplateRef('unknownPackWarningModal') const credentials = ref() @@ -1211,6 +1213,7 @@ provideAppUpdateDownloadProgress(appUpdateDownload) @create="handleCreate" @browse-modpacks="handleBrowseModpacks" /> +
@@ -1263,6 +1266,12 @@ provideAppUpdateDownloadProgress(appUpdateDownload) > + + Test +
diff --git a/apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue b/apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue new file mode 100644 index 0000000000..1fa65da568 --- /dev/null +++ b/apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue @@ -0,0 +1,91 @@ + + + diff --git a/packages/assets/generated-icons.ts b/packages/assets/generated-icons.ts index 03015155f8..bce13e0dc2 100644 --- a/packages/assets/generated-icons.ts +++ b/packages/assets/generated-icons.ts @@ -53,6 +53,7 @@ import _ChevronLeftIcon from './icons/chevron-left.svg?component' import _ChevronRightIcon from './icons/chevron-right.svg?component' import _ChevronUpIcon from './icons/chevron-up.svg?component' import _CircleAlertIcon from './icons/circle-alert.svg?component' +import _CircleArrowRightIcon from './icons/circle-arrow-right.svg?component' import _CircleUserIcon from './icons/circle-user.svg?component' import _ClearIcon from './icons/clear.svg?component' import _ClientIcon from './icons/client.svg?component' @@ -442,6 +443,7 @@ export const ChevronLeftIcon = _ChevronLeftIcon export const ChevronRightIcon = _ChevronRightIcon export const ChevronUpIcon = _ChevronUpIcon export const CircleAlertIcon = _CircleAlertIcon +export const CircleArrowRightIcon = _CircleArrowRightIcon export const CircleUserIcon = _CircleUserIcon export const ClearIcon = _ClearIcon export const ClientIcon = _ClientIcon diff --git a/packages/assets/icons/circle-arrow-right.svg b/packages/assets/icons/circle-arrow-right.svg new file mode 100644 index 0000000000..46b36a5dbf --- /dev/null +++ b/packages/assets/icons/circle-arrow-right.svg @@ -0,0 +1,17 @@ + + + + + + From e2c71f8be6e2ac6e9a09d4db8a1b39935363f46e Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Tue, 28 Apr 2026 15:04:01 -0700 Subject: [PATCH 04/10] implementation --- apps/app-frontend/src/App.vue | 12 ++--- .../install_flow/UnknownPackWarningModal.vue | 48 +++++++++++++++---- .../src/components/ui/modal/ModalWrapper.vue | 2 +- apps/app-frontend/src/helpers/pack.ts | 35 ++++++++++---- apps/app-frontend/src/providers/setup.ts | 9 ++-- .../src/providers/setup/creation-modal.ts | 41 +++++++++++++++- apps/app/src/api/pack.rs | 4 +- packages/app-lib/src/api/pack/install_from.rs | 39 ++++++++++++--- .../components/nav/PopupNotificationPanel.vue | 23 +++++++++ .../ui/src/providers/popup-notifications.ts | 2 + .../nav/PopupNotificationPanel.stories.ts | 28 +++++++++++ 11 files changed, 203 insertions(+), 40 deletions(-) diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 60425298fe..971fcd27fb 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -182,7 +182,7 @@ const { setModpackAlreadyInstalledModal, handleModpackDuplicateCreateAnyway, handleModpackDuplicateGoToInstance, -} = setupProviders(notificationManager) +} = setupProviders(notificationManager, popupNotificationManager) const news = ref([]) const availableSurvey = ref(false) @@ -786,7 +786,9 @@ async function handleCommand(e) { if (e.event === 'RunMRPack') { // RunMRPack should directly install a local mrpack given a path if (e.path.endsWith('.mrpack')) { - await create_profile_and_install_from_file(e.path).catch(handleError) + await create_profile_and_install_from_file(e.path, (createProfile, fileName) => + unknownPackWarningModal.value?.show(createProfile, fileName), + ).catch(handleError) trackEvent('InstanceCreate', { source: 'CreationModalFileDrop', }) @@ -1266,12 +1268,6 @@ provideAppUpdateDownloadProgress(appUpdateDownload) > - - Test -
diff --git a/apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue b/apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue index 1fa65da568..598dcf2e2b 100644 --- a/apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue +++ b/apps/app-frontend/src/components/ui/install_flow/UnknownPackWarningModal.vue @@ -1,11 +1,14 @@ - diff --git a/apps/app-frontend/src/components/ui/RunningAppBar.vue b/apps/app-frontend/src/components/ui/RunningAppBar.vue deleted file mode 100644 index 95da2cdb6d..0000000000 --- a/apps/app-frontend/src/components/ui/RunningAppBar.vue +++ /dev/null @@ -1,476 +0,0 @@ - - - - - diff --git a/apps/app-frontend/src/helpers/state.js b/apps/app-frontend/src/helpers/state.ts similarity index 52% rename from apps/app-frontend/src/helpers/state.js rename to apps/app-frontend/src/helpers/state.ts index 8d177e4788..8e9bb13f54 100644 --- a/apps/app-frontend/src/helpers/state.js +++ b/apps/app-frontend/src/helpers/state.ts @@ -5,15 +5,46 @@ */ import { invoke } from '@tauri-apps/api/core' +export interface LoadingBarType { + type?: string + version?: string + profile_path?: string + pack_name?: string +} + +export interface LoadingBar { + id?: string | number + loading_bar_uuid?: string | number + title?: string + message?: string + current?: number + total?: number + bar_type?: LoadingBarType +} + +export type OpeningCommandEvent = + | 'RunMRPack' + | 'InstallServer' + | 'InstallVersion' + | 'InstallMod' + | 'InstallModpack' + | string + +export interface OpeningCommand { + event: OpeningCommandEvent + id?: string + path?: string +} + // Initialize the theseus API state // This should be called during the initializion/opening of the launcher export async function initialize_state() { - return await invoke('initialize_state') + return await invoke('initialize_state') } // Gets active progress bars export async function progress_bars_list() { - return await invoke('plugin:utils|progress_bars_list') + return await invoke>('plugin:utils|progress_bars_list') } // Get opening command @@ -21,5 +52,5 @@ export async function progress_bars_list() { // This should be called once and only when the app is done booting up and ready to receive a command // Returns a Command struct- see events.js export async function get_opening_command() { - return await invoke('plugin:utils|get_opening_command') + return await invoke('plugin:utils|get_opening_command') } diff --git a/packages/ui/src/components/nav/PopupNotificationPanel.vue b/packages/ui/src/components/nav/PopupNotificationPanel.vue index 0a80c13990..d8145b3674 100644 --- a/packages/ui/src/components/nav/PopupNotificationPanel.vue +++ b/packages/ui/src/components/nav/PopupNotificationPanel.vue @@ -24,11 +24,15 @@ :class="{ 'text-red': item.type === 'error', 'text-orange': item.type === 'warning', + 'text-green': item.type === 'download', 'text-contrast': item.type === 'success', - 'text-blue': !item.type || !['error', 'warning', 'success'].includes(item.type), + 'text-blue': + !item.type || + !['error', 'warning', 'success', 'download'].includes(item.type), }" > + @@ -47,8 +51,30 @@ {{ item.text }}
+
+
+
+ {{ progressItem.title }} +
+ +
+ {{ progressItem.text }} +
+
+