Files
mixtape/zero.Backoffice.UI/_notimplemented/setup/setup.vue
T

133 lines
2.6 KiB
Vue
Raw Normal View History

<template>
2020-04-03 16:45:47 +02:00
<div class="app">
<h1 class="app-headline">zero</h1>
<div class="setup">
<component v-bind:is="steps[step]" v-model="model" :on-back="prev" :on-next="next" />
<div class="setup-buttons" v-if="step < 3">
2020-04-13 12:14:19 +02:00
<ui-button v-if="step > 0" type="outline" label="Go back" @click="prev" caret="left" caret-position="left" />
<ui-button :label="nextLabel" @click="next" />
2020-04-03 16:45:47 +02:00
</div>
2020-03-30 17:11:56 +02:00
</div>
</div>
</template>
<script>
2020-03-26 22:14:16 +01:00
import Sass from '../Sass/setup.scss'
2020-10-15 14:10:23 +02:00
import UiButton from 'zero/components/buttons/button.vue'
2020-03-30 17:11:56 +02:00
import StepUser from './Steps/step-user.vue'
import StepApplication from './Steps/step-application.vue'
import StepDatabase from './Steps/step-database.vue'
2020-04-03 14:27:39 +02:00
import StepInstall from './Steps/step-install.vue'
import StepFinish from './Steps/step-finish.vue'
export default {
2020-03-26 22:14:16 +01:00
name: 'setup',
2020-04-03 14:27:39 +02:00
components: { UiButton, StepUser, StepApplication, StepDatabase, StepInstall, StepFinish },
2020-03-27 01:17:22 +01:00
data: () => ({
2020-04-03 16:45:47 +02:00
step: 0,
steps: ['step-user', 'step-database', 'step-application', 'step-install', 'step-finish'],
model: { "appName": "Brothers", "user": { "name": "Tobias Klika", "email": "", "password": "" }, "database": { "url": "http://localhost:9800", "name": "zero" } }
2020-04-03 16:45:47 +02:00
//model: {
// appName: null,
// user: {
// name: null,
// email: null,
// password: null
// },
// database: {
// url: 'http://localhost:9800',
// name: null
// }
//}
}),
2020-04-03 16:45:47 +02:00
computed: {
nextLabel()
{
return this.step < 2 ? 'Next' : 'Install application';
}
},
2020-04-03 14:27:39 +02:00
mounted()
{
2020-04-03 14:27:39 +02:00
},
methods: {
2020-04-03 14:27:39 +02:00
next()
{
if (this.step + 1 >= this.steps.length)
{
2020-04-03 16:45:47 +02:00
return;
2020-04-03 14:27:39 +02:00
}
this.step += 1;
},
prev()
{
this.step -= 1;
},
2020-03-30 17:11:56 +02:00
save()
{
}
}
}
2020-03-30 17:11:56 +02:00
</script>
<style lang="scss">
.setup
{
2020-04-03 14:27:39 +02:00
display: grid;
grid-template-rows: 1fr auto;
align-items: stretch;
2020-04-03 16:45:47 +02:00
max-width: 100%;
width: 520px;
2020-08-16 15:51:12 +02:00
background: var(--color-bg-bright);
2020-04-03 16:45:47 +02:00
border-radius: 3px;
min-height: 600px;
position: relative;
z-index: 2;
padding: 40px;
2020-03-30 17:11:56 +02:00
}
.setup-step
{
2020-04-03 14:27:39 +02:00
width: 100%;
2020-03-30 17:11:56 +02:00
}
.setup-step h2
{
2020-04-03 14:27:39 +02:00
display: block;
2020-03-30 17:11:56 +02:00
text-align: center;
}
.setup-step p
{
color: var(--color-text-dim);
2020-03-30 17:11:56 +02:00
font-size: 0.9rem;
line-height: 1.6;
margin: 0 0 2rem;
}
.setup-step p b
{
color: var(--color-text);
2020-03-30 17:11:56 +02:00
font-weight: 600;
}
.setup-step .ui-property + .ui-property
{
padding-top: 0;
border-top: none;
}
</style>