super rough outline of the version creation page as a basis for discussions

This commit is contained in:
MiniDigger | Martin 2022-04-03 22:22:19 +02:00
parent 651bda322c
commit d686c21fde

View File

@ -7,7 +7,13 @@ import { useRoute } from "vue-router";
import { useI18n } from "vue-i18n";
import Steps, { Step } from "~/components/design/Steps.vue";
import { ref } from "vue";
import Card from "~/components/design/Card.vue";
import Alert from "~/components/design/Alert.vue";
import InputFile from "~/components/ui/InputFile.vue";
import InputText from "~/components/ui/InputText.vue";
import InputSelect from "~/components/ui/InputSelect.vue";
import Button from "~/components/design/Button.vue";
import InputCheckbox from "~/components/ui/InputCheckbox.vue";
import MarkdownEditor from "~/components/MarkdownEditor.vue";
const route = useRoute();
const i18n = useI18n();
@ -15,10 +21,13 @@ const props = defineProps<{
project: HangarProject;
}>();
const selectedStep = ref("test");
const selectedStep = ref("artifact");
// TODO i18n
const steps: Step[] = [
{ value: "test", header: "Test" },
{ value: "test2", header: "Test2" },
{ value: "artifact", header: "Artifact" },
{ value: "basic", header: "Basic Info" },
{ value: "dependencies", header: "Dependencies" },
{ value: "changelog", header: "Changelog" },
];
useHead(
@ -31,10 +40,44 @@ useHead(
);
</script>
<!-- todo functionality, design, i18n, all the things -->
<template>
<Steps v-model="selectedStep" :steps="steps">
<template #test> test </template>
<template #test2> test2 </template>
<Steps v-model="selectedStep" :steps="steps" button-lang-key="dum">
<template #artifact>
<p>Please specify the artifact. You can either upload a jar or a zip file, or you can link to an external site.</p>
<Alert>An external link needs to be a direct download link!</Alert>
<div class="flex flex-wrap">
<InputFile />
<span class="basis-full">or</span>
<InputText label="External url" />
</div>
</template>
<template #basic>
<p>We detected the following settings based on the artifact you provided. Please fill out the remaining fields.</p>
<div class="flex flex-wrap">
<div class="basis-full md:basis-4/12"><InputText label="Version" /></div>
<div class="basis-full md:basis-4/12"><InputText label="File name" /></div>
<div class="basis-full md:basis-4/12"><InputText label="File size" /></div>
<div class="basis-8/12"><InputSelect label="Channel" /></div>
<Button class="basis-4/12">Add channel</Button>
<div class="basis-4/12"><InputCheckbox label="Unstable" /></div>
<div class="basis-4/12"><InputCheckbox label="Recommended" /></div>
<div class="basis-4/12"><InputCheckbox label="Forum Post" /></div>
</div>
</template>
<template #dependencies>
<p>We detected the following dependencies based on the artifact you provided. Please fill out the remaining fields.</p>
<div class="flex flex-wrap">
Platform dependency stuff<br />
Plugin dependency stuff
</div>
</template>
<template #changelog>
<p>Whats new?</p>
<MarkdownEditor raw="# dum" :editing="true" />
</template>
</Steps>
</template>