mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:57:08 +00:00
Show user-friendly message if a project cannot be found
This commit is contained in:
@@ -1,18 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container fluid fill-height class="ma-0 pa-0">
|
<v-container fluid fill-height class="ma-0 pa-0">
|
||||||
<v-row no-gutters align="stretch" class="fill-height">
|
<v-row no-gutters align="stretch" class="fill-height">
|
||||||
<v-col cols="12">
|
<v-col cols="12" v-if="projectFound">
|
||||||
<!-- Show component here according to selected route -->
|
<!-- Show component here according to selected route -->
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<router-view :key="$route.path"></router-view>
|
<router-view :key="$route.path"></router-view>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
<v-col cols="12" v-else>
|
||||||
|
<v-card>
|
||||||
|
<v-card-text>
|
||||||
|
Project does not exist.
|
||||||
|
</v-card-text>
|
||||||
|
</v-card>
|
||||||
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions, mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Project',
|
name: 'Project',
|
||||||
@@ -24,6 +31,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
projectFound () {
|
||||||
|
return this.loading || this.projectId;
|
||||||
|
},
|
||||||
|
|
||||||
|
...mapGetters(["loading", "projectId", "serverEvent"])
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(["getProject"])
|
...mapActions(["getProject"])
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user