{{ game[0].toUpperCase() + game.slice(1) }}
@@ -46,7 +46,7 @@ defineProps<{
const settingsModal = injectServerSettingsModal(null)
const settingsLinkTarget = computed(() => {
if (settingsModal) {
- return () => settingsModal.openServerSettings({ tabId: 'installation' })
+ return () => settingsModal.openServerInstanceSettings({ tabId: 'installation' })
}
return ''
})
diff --git a/packages/ui/src/components/servers/labels/ServerLoaderLabel.vue b/packages/ui/src/components/servers/labels/ServerLoaderLabel.vue
index 9478a89a9e..d7bea4f4c1 100644
--- a/packages/ui/src/components/servers/labels/ServerLoaderLabel.vue
+++ b/packages/ui/src/components/servers/labels/ServerLoaderLabel.vue
@@ -6,7 +6,7 @@
{
if (settingsModal) {
- return () => settingsModal.openServerSettings({ tabId: 'installation' })
+ return () => settingsModal.openServerInstanceSettings({ tabId: 'installation' })
}
return ''
})
diff --git a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmBulkUpdateModal.vue b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmBulkUpdateModal.vue
index 92c2863ff7..3c08b4c33c 100644
--- a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmBulkUpdateModal.vue
+++ b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmBulkUpdateModal.vue
@@ -15,6 +15,7 @@
:backup-name="
visibleBackupTip ? `Before bulk update (${visibleBackupTip})` : 'Before bulk update'
"
+ :target-type="props.targetType"
:shift-click-hint-override="formatMessage(messages.shiftClickHint)"
@update:buttons-disabled="buttonsDisabled = $event"
/>
@@ -88,6 +89,7 @@ const props = defineProps<{
backupTip?: string
actionDisabled?: boolean
actionDisabledTooltip?: string
+ targetType?: 'server' | 'instance'
}>()
const emit = defineEmits<{
diff --git a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmDeletionModal.vue b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmDeletionModal.vue
index d3b6118eff..6fc76a0948 100644
--- a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmDeletionModal.vue
+++ b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmDeletionModal.vue
@@ -17,6 +17,7 @@
@@ -75,7 +76,7 @@ const messages = defineMessages({
admonitionBody: {
id: 'content.confirm-deletion.admonition-body',
defaultMessage:
- 'Deleting a mod can permanently affect your world and may cause missing content or unexpected issues when it loads again.',
+ 'Deleting a mod can permanently affect your instance and may cause missing content or unexpected issues when it starts again.',
},
deleteButton: {
id: 'content.confirm-deletion.delete-button',
@@ -91,12 +92,14 @@ const props = withDefaults(
backupTip?: string
actionDisabled?: boolean
actionDisabledTooltip?: string
+ targetType?: 'server' | 'instance'
}>(),
{
variant: 'instance',
backupTip: undefined,
actionDisabled: false,
actionDisabledTooltip: undefined,
+ targetType: undefined,
},
)
diff --git a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmModpackUpdateModal.vue b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmModpackUpdateModal.vue
index ffe36eda55..987ae51382 100644
--- a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmModpackUpdateModal.vue
+++ b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmModpackUpdateModal.vue
@@ -22,6 +22,7 @@
@@ -68,6 +69,7 @@ const props = defineProps<{
backupTip?: string
actionDisabled?: boolean
actionDisabledTooltip?: string
+ targetType?: 'server' | 'instance'
}>()
const { formatMessage } = useVIntl()
diff --git a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmReinstallModal.vue b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmReinstallModal.vue
index d8946e3a5e..8737de50a5 100644
--- a/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmReinstallModal.vue
+++ b/packages/ui/src/layouts/shared/content-tab/components/modals/ConfirmReinstallModal.vue
@@ -13,6 +13,7 @@
- {{
- formatMessage(messages.warningBody, {
- type: formatMessage(backup.isServer ? messages.worldLabel : messages.instanceLabel),
- })
- }}
+ {{ formatMessage(messages.warningBody, { type: backupTargetType }) }}
@@ -47,7 +43,7 @@
@@ -71,6 +67,7 @@ import { useInlineBackup } from '../../composables/use-inline-backup'
const props = defineProps<{
backupName: string
+ targetType?: 'server' | 'instance'
hideShiftClickHint?: boolean
shiftClickHintOverride?: string
}>()
@@ -87,6 +84,7 @@ const canManageBackups = computed(
const permissionDeniedMessage = computed(() => formatMessage(commonMessages.noPermissionAction))
const backup = useInlineBackup(() => props.backupName)
+const backupTargetType = computed(() => props.targetType ?? 'instance')
function startBackup() {
if (
@@ -115,15 +113,7 @@ const messages = defineMessages({
warningBody: {
id: 'content.inline-backup.warning-body',
defaultMessage:
- 'We recommend creating a backup before proceeding so you can restore your {type} if anything breaks.',
- },
- worldLabel: {
- id: 'content.inline-backup.world-label',
- defaultMessage: 'world',
- },
- instanceLabel: {
- id: 'content.inline-backup.instance-label',
- defaultMessage: 'instance',
+ 'We recommend creating a backup before proceeding so you can restore your {type, select, server {server} other {instance}} if anything breaks.',
},
createBackup: {
id: 'content.inline-backup.create-backup',
@@ -144,7 +134,7 @@ const messages = defineMessages({
backupTakesAWhile: {
id: 'content.inline-backup.backup-takes-a-while',
defaultMessage:
- 'Creating a backup may take several minutes depending on the size of your server.',
+ 'Creating a backup may take several minutes depending on the size of your {type, select, server {server} other {instance}}.',
},
backupInProgress: {
id: 'content.inline-backup.backup-in-progress',
diff --git a/packages/ui/src/layouts/shared/content-tab/components/modals/content-updater-modal/index.vue b/packages/ui/src/layouts/shared/content-tab/components/modals/content-updater-modal/index.vue
index a3b8563355..eda3194016 100644
--- a/packages/ui/src/layouts/shared/content-tab/components/modals/content-updater-modal/index.vue
+++ b/packages/ui/src/layouts/shared/content-tab/components/modals/content-updater-modal/index.vue
@@ -207,9 +207,10 @@
formatMessage(
incompatibilityWarningMode
? messages.incompatibilityWarning
- : isApp
- ? messages.updateWarningApp
- : messages.updateWarningWeb,
+ : messages.updateWarning,
+ {
+ type: updateWarningTargetType,
+ },
)
}}
@@ -352,14 +353,10 @@ const messages = defineMessages({
id: 'instances.updater-modal.select-version',
defaultMessage: 'Select a version to view its changelog',
},
- updateWarningApp: {
- id: 'instances.updater-modal.warning-app',
+ updateWarning: {
+ id: 'instances.updater-modal.warning',
defaultMessage:
- 'Updating can break your instance. Review version changelogs and back up first.',
- },
- updateWarningWeb: {
- id: 'instances.updater-modal.warning-web',
- defaultMessage: 'Updating can break your world. Review version changelogs and back up first.',
+ 'Updating can break your {type, select, server {server} other {instance}}. Review version changelogs and back up first.',
},
incompatibilityWarning: {
id: 'instances.updater-modal.incompatibility-warning',
@@ -424,6 +421,7 @@ const props = withDefaults(
currentLoader: string
currentVersionId: string
isApp: boolean
+ targetType?: 'server' | 'instance'
/** The project type (e.g. mod, shader, resourcepack, datapack, modpack). */
projectType?: string
projectIconUrl?: string
@@ -440,6 +438,7 @@ const props = withDefaults(
actionDisabledTooltip?: string
}>(),
{
+ targetType: undefined,
projectType: undefined,
projectIconUrl: undefined,
projectName: undefined,
@@ -469,6 +468,7 @@ const defaultHeader = computed(() => {
: messages.updateVersionHeader,
)
})
+const updateWarningTargetType = computed(() => props.targetType ?? 'instance')
const emit = defineEmits<{
update: [version: Labrinth.Versions.v2.Version, event: MouseEvent]
diff --git a/packages/ui/src/layouts/shared/content-tab/layout.vue b/packages/ui/src/layouts/shared/content-tab/layout.vue
index 8da41b4b74..7dd2443564 100644
--- a/packages/ui/src/layouts/shared/content-tab/layout.vue
+++ b/packages/ui/src/layouts/shared/content-tab/layout.vue
@@ -1039,6 +1039,7 @@ const confirmUnlinkModal = ref>()
:backup-tip="pendingDeletionItems.map((i) => i.project?.title ?? i.file_name).join(', ')"
:action-disabled="ctx.isBusy.value"
:action-disabled-tooltip="ctx.busyMessage?.value ?? undefined"
+ :target-type="ctx.deletionContext ?? 'instance'"
@delete="confirmDelete"
/>
>()
:server="ctx.deletionContext === 'server'"
:action-disabled="ctx.isBusy.value"
:action-disabled-tooltip="ctx.busyMessage?.value ?? undefined"
+ :target-type="ctx.deletionContext ?? 'instance'"
@update="confirmBulkUpdate"
/>
>()
:backup-tip="ctx.modpack.value?.project.title"
:action-disabled="ctx.isBusy.value"
:action-disabled-tooltip="ctx.busyMessage?.value ?? undefined"
+ :target-type="ctx.deletionContext ?? 'instance'"
@unlink="ctx.unlinkModpack!()"
/>
diff --git a/packages/ui/src/layouts/shared/installation-settings/components/ContentDiffModal.vue b/packages/ui/src/layouts/shared/installation-settings/components/ContentDiffModal.vue
index 9f742020b5..d1010bf9e3 100644
--- a/packages/ui/src/layouts/shared/installation-settings/components/ContentDiffModal.vue
+++ b/packages/ui/src/layouts/shared/installation-settings/components/ContentDiffModal.vue
@@ -5,7 +5,13 @@
{{ description }}
- {{ formatMessage(messages.unknownContentBody) }}
+
+ {{
+ formatMessage(messages.unknownContentBody, {
+ type: targetType ?? 'server',
+ })
+ }}
+
@@ -73,6 +79,7 @@
@@ -131,6 +138,7 @@ const props = defineProps<{
confirmIcon?: Component
showReportButton?: boolean
showBackupCreator?: boolean
+ targetType?: 'server' | 'instance'
removedLabel?: string
disableClose?: boolean
}>()
@@ -192,7 +200,7 @@ const messages = defineMessages({
unknownContentBody: {
id: 'content.diff-modal.unknown-content-body',
defaultMessage:
- 'Some content on your server could not be analyzed and may be affected by this change.',
+ 'Some content on your {type, select, server {server} other {instance}} could not be analyzed and may be affected by this change.',
},
})
diff --git a/packages/ui/src/layouts/shared/installation-settings/components/IncompatibleContentModal.vue b/packages/ui/src/layouts/shared/installation-settings/components/IncompatibleContentModal.vue
index ea9e03e114..f7e957288b 100644
--- a/packages/ui/src/layouts/shared/installation-settings/components/IncompatibleContentModal.vue
+++ b/packages/ui/src/layouts/shared/installation-settings/components/IncompatibleContentModal.vue
@@ -13,7 +13,9 @@
{{
variant === 'loader-change'
- ? formatMessage(messages.loaderChangeBody)
+ ? formatMessage(messages.loaderChangeBody, {
+ type: server ? 'server' : 'instance',
+ })
: formatMessage(messages.gameVersionWarningBody)
}}
@@ -21,7 +23,11 @@
@@ -33,6 +39,7 @@
:backup-name="
variant === 'loader-change' ? 'Before loader change' : 'Before version change'
"
+ :target-type="server ? 'server' : 'instance'"
hide-shift-click-hint
@update:buttons-disabled="buttonsDisabled = $event"
/>
@@ -104,6 +111,7 @@ import InlineBackupCreator from '../../content-tab/components/modals/InlineBacku
defineProps<{
variant: 'loader-change' | 'game-version-change'
loading?: boolean
+ server?: boolean
}>()
const emit = defineEmits<{
@@ -165,7 +173,7 @@ const messages = defineMessages({
loaderChangeBody: {
id: 'installation-settings.incompatible-content.loader-change-body',
defaultMessage:
- 'When changing the loader, all installed content will be disabled. We recommend resetting your server instead.',
+ 'When changing the loader, all installed content will be disabled. We recommend resetting your {type, select, server {server} other {instance}} instead.',
},
gameVersionWarningTitle: {
id: 'installation-settings.incompatible-content.game-version-warning-title',
@@ -188,6 +196,10 @@ const messages = defineMessages({
id: 'installation-settings.incompatible-content.disable-conflicts-button',
defaultMessage: 'Disable conflicts',
},
+ resetButton: {
+ id: 'installation-settings.incompatible-content.reset-button',
+ defaultMessage: 'Reset {type, select, server {server} other {instance}}',
+ },
})
defineExpose({ show, hide })
diff --git a/packages/ui/src/layouts/shared/installation-settings/layout.vue b/packages/ui/src/layouts/shared/installation-settings/layout.vue
index 6bac597218..e53a73d7dd 100644
--- a/packages/ui/src/layouts/shared/installation-settings/layout.vue
+++ b/packages/ui/src/layouts/shared/installation-settings/layout.vue
@@ -189,7 +189,9 @@ const platformDisabledItems = computed(() =>
const platformDisabledTooltip = computed(() =>
ctx.isBusy.value
? (ctx.busyMessage?.value ?? undefined)
- : formatMessage(messages.platformLockTooltip),
+ : formatMessage(messages.platformLockTooltip, {
+ type: ctx.isServer ? 'server' : 'instance',
+ }),
)
const showModpackVersionActions = computed(() => {
@@ -206,6 +208,19 @@ const isLocalFile = computed(() => {
const isLinkedModpack = computed(() => showModpackVersionActions.value || isLocalFile.value)
+const showBackupCreator = computed(() => {
+ const val = ctx.showBackupCreator
+ if (val == null) return ctx.isServer
+ return typeof val === 'boolean' ? val : val.value
+})
+
+const repairDescriptionMessage = computed(() => {
+ const kind = ctx.repairDescriptionKind ?? (ctx.isServer ? 'server' : 'app-instance')
+ if (kind === 'server') return messages.repairServerDescription
+ if (kind === 'server-instance') return messages.repairServerInstanceDescription
+ return messages.repairInstanceDescription
+})
+
function handleModpackUpdateRequest(version: Labrinth.Versions.v2.Version, event?: MouseEvent) {
debug('handleModpackUpdateRequest: start', {
versionId: version.id,
@@ -468,6 +483,11 @@ const messages = defineMessages({
defaultMessage:
'Reinstalls the loader and Minecraft dependencies without deleting your content. This may resolve issues if your server is not starting correctly.',
},
+ repairServerInstanceDescription: {
+ id: 'installation-settings.repair.server-instance-description',
+ defaultMessage:
+ 'Reinstalls the loader and Minecraft dependencies without deleting your content. This may resolve issues if this instance is not starting correctly.',
+ },
editWarningInstance: {
id: 'installation-settings.edit.warning-instance',
defaultMessage:
@@ -540,7 +560,8 @@ const messages = defineMessages({
},
platformLockTooltip: {
id: 'installation-settings.platform-lock-tooltip',
- defaultMessage: 'You will need to reset your server to switch loader.',
+ defaultMessage:
+ 'You will need to reset your {type, select, server {server} other {instance}} to switch loader.',
},
confirmVersionChangeHeader: {
id: 'installation-settings.confirm-version-change-header',
@@ -552,7 +573,8 @@ const messages = defineMessages({
},
confirmVersionChangeDescription: {
id: 'installation-settings.confirm-version-change-description',
- defaultMessage: 'Changing to {gameVersion} will modify the following content on your server.',
+ defaultMessage:
+ 'Changing to {gameVersion} will modify the following content on your {type, select, server {server} other {instance}}.',
},
removedIncompatible: {
id: 'installation-settings.removed-incompatible',
@@ -771,13 +793,7 @@ const messages = defineMessages({
- {{
- formatMessage(
- ctx.isServer
- ? messages.repairServerDescription
- : messages.repairInstanceDescription,
- )
- }}
+ {{ formatMessage(repairDescriptionMessage) }}
@@ -1009,13 +1025,7 @@ const messages = defineMessages({