Update onboarding and error handling experience (#29)
This commit is contained in:
1 parent
916df4b482
commit
9c54ffb7a8
23 files changed
+228
-43
No files matched your search
@@ -17,7 +17,7 @@
|
||||
}}</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<div v-else class="text-center info">
|
||||
<div v-if="needApply && api" class="text-center info">
|
||||
<span class="mr-2">{{ $t('chat.message.notApplied') }}</span>
|
||||
<span>
|
||||
<el-button type="primary" class="btn btn-apply" size="small" @click="confirming = true">
|
||||
@@ -61,18 +61,34 @@ export default defineComponent({
|
||||
initializing: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
needApply: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
emits: ['apply', 'refresh'],
|
||||
data(): IData {
|
||||
return {
|
||||
confirming: false,
|
||||
confirming: this.needApply,
|
||||
applicationType: IApplicationType,
|
||||
api: undefined
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
authenticated() {
|
||||
return !!this.$store.state.token.access;
|
||||
},
|
||||
user() {
|
||||
return this.$store.state.user;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
needApply(val) {
|
||||
if (val) {
|
||||
this.confirming = val;
|
||||
}
|
||||
},
|
||||
apiId() {
|
||||
this.onFetchApi();
|
||||
}
|
||||
|
||||
@@ -89,8 +89,10 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onLogout() {
|
||||
this.$store.dispatch('resetToken');
|
||||
async onLogout() {
|
||||
await this.$store.dispatch('resetAll');
|
||||
await this.$store.dispatch('chat/resetAll');
|
||||
await this.$store.dispatch('midjourney/resetAll');
|
||||
},
|
||||
onConsole() {
|
||||
this.$router.push({ name: ROUTE_CONSOLE_ROOT });
|
||||
|
||||
Reference in new issue
Block a user