implement "new catalog" in editor

This commit is contained in:
Seth Ladygo
2019-05-04 14:44:34 -07:00
parent 7431f23b67
commit 829df7667e
4 changed files with 45 additions and 8 deletions

View File

@ -2,6 +2,8 @@
<v-stepper v-model="step">
<v-stepper-header>
<v-stepper-step :complete="step > 1" step="1">Catalog info</v-stepper-step>
<Loading text="Loading" :show="loadingCatalog"/>
<v-divider></v-divider>
<v-stepper-step :complete="step > 2" step="2">Contents</v-stepper-step>
<v-divider></v-divider>
@ -40,17 +42,32 @@
</template>
<script>
import Loading from './Loading'
import CatalogInfo from './CatalogInfo'
import CatalogContents from './CatalogContents'
export default {
components: {
Loading,
CatalogInfo,
CatalogContents
},
data: () => ({
step: 1,
}),
computed: {
loadingCatalog() {
return this.$store.getters.loadingCatalog
},
savingCatalog() {
return this.$store.getters.savingCatalog
},
},
methods: {
saveCatalog() {
this.$store.dispatch('saveCatalog')
},
},
mounted: function() {
// catalogID is set by django
// in a script block in our parent page.

View File

@ -0,0 +1,21 @@
<template>
<v-dialog v-model="show" persistent width="300">
<v-card color="green" dark>
<v-card-text class="white--text">
{{ text }}
<v-progress-linear indeterminate color="white" class="mb-0" />
</v-card-text>
</v-card>
</v-dialog>
</template>
<script>
export default {
data: () => ({
}),
props: {
text: String,
show: Boolean,
},
}
</script>