persist channel
This commit is contained in:
1 parent
a75a000974
commit
fbdcc8b920
8 files changed
+33
-36
No files matched your search
@@ -17,6 +17,8 @@ const store = createStore({
|
||||
'user',
|
||||
'chat.applications',
|
||||
'chat.conversations',
|
||||
'midjourney.preset',
|
||||
'midjourney.channel',
|
||||
'midjourney.applications',
|
||||
'midjourney.imagineTasks'
|
||||
]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
IApplication,
|
||||
IMidjourneyChannel,
|
||||
IMidjourneyImagineTask,
|
||||
IMidjourneyPreset,
|
||||
MIDJOURNEY_CHANNEL_FAST,
|
||||
@@ -18,6 +19,10 @@ export const setPreset = ({ commit }: any, payload: IMidjourneyPreset) => {
|
||||
commit('setPreset', payload);
|
||||
};
|
||||
|
||||
export const setChannel = ({ commit }: any, payload: IMidjourneyChannel) => {
|
||||
commit('setChannel', payload);
|
||||
};
|
||||
|
||||
export const setApplications = ({ commit }: any, payload: IApplication[]) => {
|
||||
commit('setApplications', payload);
|
||||
};
|
||||
@@ -75,6 +80,7 @@ export const getImagineTasks = async (
|
||||
|
||||
export default {
|
||||
setPreset,
|
||||
setChannel,
|
||||
setApplications,
|
||||
getApplications,
|
||||
setImagineTasks,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IApplication, IMidjourneyImagineTask, IMidjourneyPreset } from '@/operators';
|
||||
import { IApplication, IMidjourneyChannel, IMidjourneyImagineTask, IMidjourneyPreset } from '@/operators';
|
||||
import { Status } from '../common/models';
|
||||
|
||||
export interface IMidjourneyState {
|
||||
@@ -8,4 +8,5 @@ export interface IMidjourneyState {
|
||||
getImagineTasksStatus: Status | undefined;
|
||||
imagineTasksTotal: number | undefined;
|
||||
preset: IMidjourneyPreset;
|
||||
channel: IMidjourneyChannel;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IApplication } from '@/operators';
|
||||
import { IApplication, IMidjourneyChannel, IMidjourneyPreset } from '@/operators';
|
||||
import { IMidjourneyState } from './models';
|
||||
import { Status } from '../common/models';
|
||||
|
||||
@@ -6,10 +6,14 @@ export const setApplications = (state: IMidjourneyState, payload: IApplication[]
|
||||
state.applications = payload;
|
||||
};
|
||||
|
||||
export const setPreset = (state: IMidjourneyState, payload: any): void => {
|
||||
export const setPreset = (state: IMidjourneyState, payload: IMidjourneyPreset): void => {
|
||||
state.preset = payload;
|
||||
};
|
||||
|
||||
export const setChannel = (state: IMidjourneyState, payload: IMidjourneyChannel): void => {
|
||||
state.channel = payload;
|
||||
};
|
||||
|
||||
export const setGetApplicationsStatus = (state: IMidjourneyState, payload: Status): void => {
|
||||
state.getApplicationsStatus = payload;
|
||||
};
|
||||
@@ -29,6 +33,7 @@ export const setImagineTasksTotal = (state: IMidjourneyState, payload: number):
|
||||
export default {
|
||||
setApplications,
|
||||
setPreset,
|
||||
setChannel,
|
||||
setGetApplicationsStatus,
|
||||
setImagineTasks,
|
||||
setGetImagineTasksStatus,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { MIDJOURNEY_CHANNEL_FAST } from '@/operators';
|
||||
import { IMidjourneyState } from './models';
|
||||
|
||||
export default (): IMidjourneyState => {
|
||||
@@ -7,6 +8,7 @@ export default (): IMidjourneyState => {
|
||||
imagineTasks: undefined,
|
||||
getImagineTasksStatus: undefined,
|
||||
imagineTasksTotal: undefined,
|
||||
preset: {}
|
||||
preset: {},
|
||||
channel: MIDJOURNEY_CHANNEL_FAST
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user