Update onboarding and error handling experience (#29)

This commit is contained in:
AceDataCloud committed 2024-01-03 16:40:24 +08:00
1 parent 916df4b482
commit 9c54ffb7a8
23 files changed
+228 -43

No files matched your search

+4
View File
@@ -4,6 +4,7 @@
<api-status
:initializing="initializing"
:application="application"
:need-apply="needApply"
class="mb-4"
:api-id="channel.apiId"
@refresh="onGetApplications"
@@ -62,6 +63,9 @@ export default defineComponent({
initializing() {
return this.$store.state.midjourney.getApplicationsStatus === Status.Request;
},
needApply() {
return this.$store.state.midjourney.getApplicationsStatus === Status.Success && !this.application;
},
application() {
if (this.applications && this.applications.length > 0) {
return this.applications.filter((item: IApplication) => item.api_id === this.channel.apiId)[0];
+5 -1
View File
@@ -9,8 +9,9 @@
:initializing="initializing"
:application="application"
:api-id="channel.apiId"
:need-apply="needApply"
class="mb-4"
@apply="onGetApplications"
@refresh="onGetApplications"
/>
<div class="pt-4">
<reference-image class="mb-4" @change="references = $event" />
@@ -98,6 +99,9 @@ export default defineComponent({
applications() {
return this.$store.state.midjourney.applications;
},
needApply() {
return this.$store.state.midjourney.getApplicationsStatus === Status.Success && !this.application;
},
application() {
if (this.applications && this.applications.length > 0) {
return this.applications.filter((item: IApplication) => item.api_id === this.channel.apiId)[0];