feat: add edit version pages tabs (#5841)

* feat: add edit version pages tabs

* feat: switch to nav tabs instead of chips

* feat: show "Edit version" as modal title instead of specific page
This commit is contained in:
Truman Gao
2026-04-18 11:13:03 -06:00
committed by GitHub
parent b9e7b54b4e
commit ed2f04322f
12 changed files with 87 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ import type { ManageVersionContextValue } from '../manage-version-modal'
export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'add-files',
stageContent: markRaw(AddFilesStage),
title: (ctx) => (ctx.editingVersion.value ? 'Edit files' : 'Files'),
title: (ctx) => (ctx.editingVersion.value ? 'Edit version' : 'Files'),
nonProgressStage: (ctx) => ctx.editingVersion.value,
cannotNavigateForward: (ctx) => {
const hasFiles =
@@ -64,7 +64,7 @@ export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
export const fromDetailsStageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'from-details-files',
stageContent: markRaw(AddFilesStage),
title: 'Edit files',
title: 'Edit version',
nonProgressStage: true,
leftButtonConfig: (ctx) => {
const hasFiles =

View File

@@ -9,7 +9,7 @@ import type { ManageVersionContextValue } from '../manage-version-modal'
export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'add-dependencies',
stageContent: markRaw(DependenciesStage),
title: (ctx) => (ctx.editingVersion.value ? 'Edit dependencies' : 'Dependencies'),
title: (ctx) => (ctx.editingVersion.value ? 'Edit version' : 'Dependencies'),
skip: (ctx) => ctx.suggestedDependencies.value != null || ctx.projectType.value === 'modpack',
leftButtonConfig: (ctx) =>
ctx.editingVersion.value
@@ -38,7 +38,7 @@ export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
export const fromDetailsStageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'from-details-dependencies',
stageContent: markRaw(DependenciesStage),
title: 'Edit dependencies',
title: 'Edit version',
nonProgressStage: true,
leftButtonConfig: (ctx) => ({
label: 'Back',

View File

@@ -9,7 +9,7 @@ import type { ManageVersionContextValue } from '../manage-version-modal'
export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'add-details',
stageContent: markRaw(DetailsStage),
title: (ctx) => (ctx.editingVersion.value ? 'Edit details' : 'Details'),
title: (ctx) => (ctx.editingVersion.value ? 'Edit version' : 'Details'),
maxWidth: '744px',
disableClose: (ctx) => ctx.isUploading.value,
leftButtonConfig: (ctx) =>

View File

@@ -9,7 +9,7 @@ import type { ManageVersionContextValue } from '../manage-version-modal'
export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'add-environment',
stageContent: markRaw(EnvironmentStage),
title: (ctx) => (ctx.editingVersion.value ? 'Edit environment' : 'Environment'),
title: (ctx) => (ctx.editingVersion.value ? 'Edit version' : 'Environment'),
skip: (ctx) =>
ctx.noEnvironmentProject.value ||
(!ctx.editingVersion.value && !!ctx.inferredVersionData.value?.environment) ||
@@ -33,7 +33,7 @@ export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
export const fromDetailsStageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'from-details-environment',
stageContent: markRaw(EnvironmentStage),
title: 'Edit environment',
title: 'Edit version',
nonProgressStage: true,
leftButtonConfig: (ctx) => ({
label: 'Back',

View File

@@ -9,7 +9,7 @@ import type { ManageVersionContextValue } from '../manage-version-modal'
export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'add-loaders',
stageContent: markRaw(LoadersStage),
title: (ctx) => (ctx.editingVersion.value ? 'Edit loaders' : 'Loaders'),
title: (ctx) => (ctx.editingVersion.value ? 'Edit version' : 'Loaders'),
skip: (ctx) => {
const inferredLoadersLength = ctx.inferredVersionData.value?.loaders?.length ?? 0
return (

View File

@@ -9,7 +9,7 @@ import type { ManageVersionContextValue } from '../manage-version-modal'
export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'add-mc-versions',
stageContent: markRaw(McVersionsStage),
title: (ctx) => (ctx.editingVersion.value ? 'Edit game versions' : 'Game versions'),
title: (ctx) => (ctx.editingVersion.value ? 'Edit version' : 'Game versions'),
skip: (ctx) =>
(ctx.inferredVersionData.value?.game_versions?.length ?? 0) > 0 || !ctx.primaryFile.value,
hideStageInBreadcrumb: (ctx) => !ctx.primaryFile.value || ctx.handlingNewFiles.value,
@@ -32,7 +32,7 @@ export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
export const fromDetailsStageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'from-details-mc-versions',
stageContent: markRaw(McVersionsStage),
title: 'Edit game versions',
title: 'Edit version',
nonProgressStage: true,
leftButtonConfig: (ctx) => ({
label: 'Back',

View File

@@ -9,7 +9,8 @@ import type { ManageVersionContextValue } from '../manage-version-modal'
export const stageConfig: StageConfigInput<ManageVersionContextValue> = {
id: 'metadata',
stageContent: markRaw(MetadataStage),
title: 'Metadata',
title: (ctx) => (ctx.editingVersion.value ? 'Edit version' : 'Metadata'),
nonProgressStage: (ctx) => ctx.editingVersion.value,
leftButtonConfig: (ctx) =>
ctx.editingVersion.value
? {