Small version upload design changes

This commit is contained in:
Nassim Jahnke 2022-06-30 11:18:30 +02:00
parent 0cba1abaa3
commit 423af12ea1
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
2 changed files with 13 additions and 12 deletions

View File

@ -181,7 +181,7 @@ async function restoreVersion() {
</div>
</div>
<Card class="relative mt-4 erflow-clip overflow-hidden">
<Card class="relative mt-4 overflow-clip overflow-hidden">
<MarkdownEditor
v-if="hasPerms(NamedPermission.EDIT_VERSION)"
ref="editor"

View File

@ -204,36 +204,37 @@ useHead(
<Steps v-model="selectedStep" :steps="steps" button-lang-key="version.new.steps.">
<template #artifact>
<p>{{ t("version.new.form.artifactTitle") }}</p>
<Alert class="my-4 text-white" type="info">{{ t("version.new.form.externalLinkAlert") }}</Alert>
<div class="flex flex-wrap">
<!--<Alert class="my-4 text-white" type="info">{{ t("version.new.form.externalLinkAlert") }}</Alert>-->
<div class="flex flex-wrap mt-2">
<InputFile v-model="file" accept=".jar,.zip" />
<span class="basis-full my-3">or</span>
<InputText v-model="url" :label="t('version.new.form.externalUrl')" :rules="[validUrl()]" />
</div>
</template>
<template #basic>
<div class="flex flex-wrap">
<div class="flex flex-wrap space-x-2">
<!-- TODO validate version string against existing versions. complex because they only have to be unique per-platform -->
<div :class="'basis-full mt-2 ' + (isFile ? 'md:basis-4/12' : 'md:basis-6/12')">
<div class="basis-full mt-2 md:basis-4/12">
<InputText v-model="pendingVersion.versionString" :label="t('version.new.form.versionString')" :rules="[required()]" :disabled="isFile" />
</div>
<div v-if="isFile" :class="'basis-full mt-2 md:basis-4/12'">
<div v-if="isFile" class="basis-full mt-2 md:basis-4/12">
<InputText :model-value="pendingVersion.fileInfo.name" :label="t('version.new.form.fileName')" disabled />
</div>
<div v-if="isFile" :class="'basis-full mt-2 md:basis-4/12'">
<div v-if="isFile" class="basis-full mt-2 md:basis-2/12">
<InputText :model-value="formatSize(pendingVersion.fileInfo.sizeBytes)" :label="t('version.new.form.fileSize')" disabled />
</div>
<div v-if="!isFile" :class="'basis-full mt-2 md:basis-6/12'">
<div v-else class="basis-full mt-2 md:basis-6/12">
<InputText v-model="pendingVersion.externalUrl" :label="t('version.new.form.externalUrl')" />
</div>
<div class="basis-6/12 mt-2">
</div>
<div class="flex flex-wrap space-x-2 items-center">
<div class="basis-4/12 mt-2">
<InputSelect v-model="pendingVersion.channelName" :values="channels" item-text="name" item-value="name" :label="t('version.new.form.channel')" />
</div>
<div class="basis-4/12 mt-2">
<div class="basis-4/12">
<ChannelModal :project-id="project.id" @create="addChannel">
<template #activator="{ on, attrs }">
<Button class="basis-4/12 mt-2" v-bind="attrs" v-on="on">
<Button class="basis-4/12 mt-2" v-bind="attrs" size="medium" v-on="on">
{{ t("version.new.form.addChannel") }}
<IconMdiPlus />
</Button>