-
-
-
- {{ formatMessage(messages.downloading, { version: downloadingVersion }) }}
-
-
-
-
-
- {{ formatMessage(developerModeEnabled) }}
-
-
-
-
-
Modrinth App {{ version }}
-
- macOS
- {{ osPlatform }}
- {{ osVersion }}
-
-
+
+
+
+
+
+ {{ formatMessage(messages.downloading, { version: downloadingVersion }) }}
+
+
+
+
+
+ {{ formatMessage(developerModeEnabled) }}
+
+
+
+
+
Modrinth App {{ version }}
+
+ macOS
+ {{ osPlatform }}
+ {{ osVersion }}
+
-
-
-
+
+
+
diff --git a/apps/app-frontend/src/components/ui/modal/InstanceSettingsModal.vue b/apps/app-frontend/src/components/ui/modal/InstanceSettingsModal.vue
index 3543a19b34..76532a30c5 100644
--- a/apps/app-frontend/src/components/ui/modal/InstanceSettingsModal.vue
+++ b/apps/app-frontend/src/components/ui/modal/InstanceSettingsModal.vue
@@ -12,14 +12,13 @@ import {
Avatar,
commonMessages,
defineMessage,
- NewModal,
TabbedModal,
type TabbedModalTab,
useVIntl,
} from '@modrinth/ui'
import { useQueryClient } from '@tanstack/vue-query'
import { convertFileSrc } from '@tauri-apps/api/core'
-import { computed, nextTick, ref, useTemplateRef, watch } from 'vue'
+import { computed, nextTick, ref, watch } from 'vue'
import GeneralSettings from '@/components/ui/instance_settings/GeneralSettings.vue'
import HooksSettings from '@/components/ui/instance_settings/HooksSettings.vue'
@@ -28,12 +27,16 @@ import JavaSettings from '@/components/ui/instance_settings/JavaSettings.vue'
import WindowSettings from '@/components/ui/instance_settings/WindowSettings.vue'
import { get_project_v3 } from '@/helpers/cache'
import { get_linked_modpack_info } from '@/helpers/profile'
+import { provideInstanceSettings } from '@/providers/instance-settings'
-import type { InstanceSettingsTabProps } from '../../../helpers/types'
+import type { GameInstance } from '../../../helpers/types'
const { formatMessage } = useVIntl()
-const props = defineProps
()
+const props = defineProps<{
+ instance: GameInstance
+ offline?: boolean
+}>()
const emit = defineEmits<{
unlinked: []
}>()
@@ -41,6 +44,15 @@ const emit = defineEmits<{
const isMinecraftServer = ref(false)
const handleUnlinked = () => emit('unlinked')
+const instanceRef = computed(() => props.instance)
+
+provideInstanceSettings({
+ instance: instanceRef,
+ offline: props.offline,
+ isMinecraftServer,
+ onUnlinked: handleUnlinked,
+})
+
watch(
() => props.instance,
(instance) => {
@@ -58,7 +70,7 @@ watch(
{ immediate: true },
)
-const tabs = computed[]>(() => [
+const tabs = computed(() => [
{
name: defineMessage({
id: 'instance.settings.tabs.general',
@@ -102,8 +114,7 @@ const tabs = computed[]>(() => [
])
const queryClient = useQueryClient()
-const modal = ref()
-const tabbedModal = useTemplateRef('tabbedModal')
+const tabbedModal = ref | null>(null)
function show(tabIndex?: number) {
if (props.instance.linked_data?.project_id) {
@@ -112,7 +123,7 @@ function show(tabIndex?: number) {
queryFn: () => get_linked_modpack_info(props.instance.path, 'stale_while_revalidate'),
})
}
- modal.value.show()
+ tabbedModal.value?.show()
if (tabIndex !== undefined) {
nextTick(() => tabbedModal.value?.setTab(tabIndex))
}
@@ -121,8 +132,9 @@ function show(tabIndex?: number) {
defineExpose({ show })
-
@@ -139,19 +151,5 @@ defineExpose({ show })
}}
-
-
-
+
diff --git a/apps/app-frontend/src/components/ui/modal/ModpackAlreadyInstalledModal.vue b/apps/app-frontend/src/components/ui/modal/ModpackAlreadyInstalledModal.vue
new file mode 100644
index 0000000000..daf238793f
--- /dev/null
+++ b/apps/app-frontend/src/components/ui/modal/ModpackAlreadyInstalledModal.vue
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/app-frontend/src/components/ui/settings/FeatureFlagSettings.vue b/apps/app-frontend/src/components/ui/settings/FeatureFlagSettings.vue
index 679dfc48eb..dadcab73be 100644
--- a/apps/app-frontend/src/components/ui/settings/FeatureFlagSettings.vue
+++ b/apps/app-frontend/src/components/ui/settings/FeatureFlagSettings.vue
@@ -1,5 +1,5 @@
@@ -243,13 +259,17 @@ const messages = defineMessages({
>
- Loading...
+ {{ formatMessage(commonMessages.loadingLabel) }}
- Incompatible version {{ serverStatus.version?.name }}
+ {{
+ formatMessage(messages.incompatibleVersion, {
+ version: serverStatus.version?.name,
+ })
+ }}
@@ -265,8 +285,11 @@ const messages = defineMessages({
/>
- {{ formatNumber(serverStatus.players?.online) }}
- online
+ {{
+ formatMessage(messages.playersOnline, {
+ count: formatNumber(serverStatus.players?.online ?? 0),
+ })
+ }}
@@ -280,7 +303,7 @@ const messages = defineMessages({
- Offline
+ {{ formatMessage(messages.offline) }}
@@ -299,7 +322,7 @@ const messages = defineMessages({
})
}}
-
Not played yet
+
{{ formatMessage(messages.notPlayedYet) }}