Merge pull request #314 from specklesystems/frontend/onboarding

feat(frontend): do no redirect after creating first stream
This commit is contained in:
Matteo Cominetti
2021-06-25 16:17:20 +01:00
committed by GitHub
4 changed files with 17 additions and 11 deletions
@@ -313,17 +313,10 @@
</v-btn>
</v-card-actions>
</v-card>
<v-dialog v-model="newStreamDialog" max-width="500">
<stream-new-dialog @created="finish" />
</v-dialog>
</div>
</template>
<script>
import StreamNewDialog from '../components/dialogs/StreamNewDialog'
export default {
components: { StreamNewDialog },
data: () => ({
length: 4,
onboarding: 0,
@@ -46,7 +46,7 @@
<v-btn block x-small text color="error" @click="showDelete = true">Delete Stream</v-btn>
</v-card-title>
<v-card-text v-show="showDelete" class="caption py-5">
<h2 class="error--text py-3">Deleting Stream {{ internalName }}</h2>
<h2 class="error--text py-3">Deleting Stream '{{ internalName }}'</h2>
<span class="error--text">
Type the name of the stream below to confirm you really want to delete it.
<b>You cannot undo this action.</b>
@@ -87,7 +87,16 @@ import UserAvatar from '../UserAvatar'
export default {
components: { UserAvatar },
props: ['open'],
props: {
open: {
type: Boolean,
default: false
},
redirect: {
type: Boolean,
default: true
}
},
apollo: {
userSearch: {
query: userSearchQuery,
@@ -183,7 +192,7 @@ export default {
}
}
this.$emit('created')
this.$router.push({ path: `/streams/${res.data.streamCreate}` })
if (this.redirect) this.$router.push({ path: `/streams/${res.data.streamCreate}` })
} catch (e) {
console.log(e)
}
+5 -1
View File
@@ -10,7 +10,11 @@
</v-btn>
</v-card-actions>
<v-dialog v-model="newStreamDialog" max-width="500">
<stream-new-dialog :open="newStreamDialog" />
<stream-new-dialog
:open="newStreamDialog"
:redirect="streams.items.length > 0"
@created="newStreamDialog = false"
/>
</v-dialog>
</v-card>
<div v-if="$apollo.loading" class="pa-3 mx-5 mt-5">