persist channel
This commit is contained in:
1 parent
a75a000974
commit
fbdcc8b920
8 files changed
+33
-36
No files matched your search
@@ -4,7 +4,7 @@
|
||||
<preset-panel />
|
||||
</div>
|
||||
<div class="main">
|
||||
<channel-selector v-model="channel" class="mb-4" @select="onSelectChannel" />
|
||||
<channel-selector class="mb-4" @select="onSelectChannel" />
|
||||
<api-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
@@ -43,7 +43,6 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import { Status } from '@/store/common/models';
|
||||
|
||||
interface IData {
|
||||
channel: IMidjourneyChannel;
|
||||
prompt: string;
|
||||
elements: string[];
|
||||
ignore: string;
|
||||
@@ -63,13 +62,15 @@ export default defineComponent({
|
||||
},
|
||||
data(): IData {
|
||||
return {
|
||||
channel: MIDJOURNEY_CHANNEL_FAST,
|
||||
prompt: '',
|
||||
elements: [],
|
||||
ignore: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
channel() {
|
||||
return this.$store.state.midjourney.channel;
|
||||
},
|
||||
applications() {
|
||||
return this.$store.state.midjourney.applications;
|
||||
},
|
||||
@@ -95,9 +96,6 @@ export default defineComponent({
|
||||
async onGetApplications() {
|
||||
await this.$store.dispatch('midjourney/getApplications');
|
||||
},
|
||||
async onSelectChannel() {
|
||||
await this.onGetApplications();
|
||||
},
|
||||
async onStartTask(request: IMidjourneyImagineRequest) {
|
||||
const token = this.application?.credential?.token;
|
||||
const endpoint = this.application?.api?.endpoint;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<preset-panel />
|
||||
</div>
|
||||
<div class="main">
|
||||
<channel-selector v-model="channel" class="mb-4" @select="onSelectChannel" />
|
||||
<channel-selector class="mb-4" />
|
||||
<api-status
|
||||
:initializing="initializing"
|
||||
:application="application"
|
||||
@@ -56,7 +56,6 @@ import { ERROR_CODE_DUPLICATION } from '@/constants/errorCode';
|
||||
import { Status } from '@/store/common/models';
|
||||
|
||||
interface IData {
|
||||
channel: IMidjourneyChannel;
|
||||
prompt: string;
|
||||
elements: string[];
|
||||
ignore: string;
|
||||
@@ -81,7 +80,6 @@ export default defineComponent({
|
||||
},
|
||||
data(): IData {
|
||||
return {
|
||||
channel: MIDJOURNEY_CHANNEL_FAST,
|
||||
prompt: '',
|
||||
elements: [],
|
||||
ignore: '',
|
||||
@@ -89,6 +87,9 @@ export default defineComponent({
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
channel() {
|
||||
return this.$store.state.midjourney.channel;
|
||||
},
|
||||
preset() {
|
||||
return this.$store.state.midjourney.preset;
|
||||
},
|
||||
@@ -168,9 +169,6 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
},
|
||||
async onSelectChannel() {
|
||||
await this.onGetApplications();
|
||||
},
|
||||
async onGetApplications() {
|
||||
await this.$store.dispatch('midjourney/getApplications');
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user