You've already forked AstralRinth
forked from didirus/AstralRinth
Improve editing project versions (#4933)
* add edit versions dropdown menu * implement improved edit version with individual edit stages * make changelog bigger * update button styles * remove hover button when hover on row * bring editing versions back to project settings * bring back gallery edit and upload in project page * fix progress value * fix admonition import * fix v3 upload for modpacks * fix modpack loader display for editing version and better open edit/create modal handling * fix currentMember prop * fix modpack loader displaying incorrectly * fix max length * fix version url after making an edit to version and fix delete * small max height fix * hide edit dependencies for modpack * pnpm run fix * fix import * add tooltip * update icons * update copy and create version button style
This commit is contained in:
@@ -14,15 +14,13 @@
|
||||
</template>
|
||||
|
||||
<progress
|
||||
v-if="currentStage?.nonProgressStage !== true"
|
||||
v-if="nonProgressStage !== true"
|
||||
:value="progressValue"
|
||||
max="100"
|
||||
class="w-full h-1 appearance-none border-none absolute top-0 left-0"
|
||||
></progress>
|
||||
|
||||
<div class="sm:w-[512px]">
|
||||
<component :is="currentStage?.stageContent" />
|
||||
</div>
|
||||
<component :is="currentStage?.stageContent" />
|
||||
|
||||
<template #actions>
|
||||
<div
|
||||
@@ -81,7 +79,7 @@ export interface StageConfigInput<T> {
|
||||
stageContent: Component
|
||||
title: MaybeCtxFn<T, string>
|
||||
skip?: MaybeCtxFn<T, boolean>
|
||||
nonProgressStage?: boolean
|
||||
nonProgressStage?: MaybeCtxFn<T, boolean>
|
||||
leftButtonConfig: MaybeCtxFn<T, StageButtonConfig | null>
|
||||
rightButtonConfig: MaybeCtxFn<T, StageButtonConfig | null>
|
||||
}
|
||||
@@ -174,9 +172,15 @@ const rightButtonConfig = computed(() => {
|
||||
return resolveCtxFn(stage.rightButtonConfig, props.context)
|
||||
})
|
||||
|
||||
const nonProgressStage = computed(() => {
|
||||
const stage = currentStage.value
|
||||
if (!stage) return false
|
||||
return resolveCtxFn(stage.nonProgressStage, props.context)
|
||||
})
|
||||
|
||||
const progressValue = computed(() => {
|
||||
const isProgressStage = (stage: StageConfigInput<T>) => {
|
||||
if (stage.nonProgressStage) return false
|
||||
if (resolveCtxFn(stage.nonProgressStage, props.context)) return false
|
||||
const skip = stage.skip ? resolveCtxFn(stage.skip, props.context) : false
|
||||
return !skip
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@update:query="updateQuery"
|
||||
/>
|
||||
|
||||
<ButtonStyled v-if="openModal" color="green">
|
||||
<ButtonStyled v-if="openModal" :color="createVersionButtonSecondary ? 'standard' : 'green'">
|
||||
<button @click="openModal"><PlusIcon /> Create version</button>
|
||||
</ButtonStyled>
|
||||
|
||||
@@ -238,6 +238,7 @@ const props = withDefaults(
|
||||
gameVersions: GameVersionTag[]
|
||||
versionLink?: (version: Version) => string
|
||||
openModal?: () => void
|
||||
createVersionButtonSecondary?: boolean
|
||||
}>(),
|
||||
{
|
||||
baseId: undefined,
|
||||
|
||||
Reference in New Issue
Block a user