Fix logout (#289)

This commit is contained in:
Germey authored and GitHub committed 2025-11-29 20:19:57 +08:00
1 parent e23a84f8ee
commit a94a64f4a2
18 files changed
+38 -80

No files matched your search

@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix logout",
"packageName": "@acedatacloud/nexior",
"email": "cqc@cuiqingcai.com",
"dependentChangeType": "patch"
}
+1 -1
View File
@@ -1,4 +1,4 @@
export const NANOBANANA_SERVICE_ID = '';
export const NANOBANANA_SERVICE_ID = '44fa6ed2-1ad1-4c7e-a8bd-30002728c0d1';
export const NANOBANANA_DEFAULT_ACTION: 'generate' | 'edit' = 'generate';
+1 -1
View File
@@ -119,7 +119,7 @@ export default defineComponent({
return;
}
console.debug('start onGetTasks', payload);
const { limit = 5, createdAtMin, createdAtMax } = payload || {};
const { limit = 20, createdAtMin, createdAtMax } = payload || {};
console.debug('limit', limit, 'createdAtMin', createdAtMin, 'createdAtMax', createdAtMax);
await this.$store.dispatch('nanobanana/getTasks', {
limit,
+1 -12
View File
@@ -163,18 +163,7 @@ export default defineComponent({
text: this.$t('common.nav.logOut'),
icon: 'fa-solid fa-arrow-right-from-bracket',
callback: async () => {
await this.$store.dispatch('resetAll');
await this.$store.dispatch('chat/resetAll');
await this.$store.dispatch('midjourney/resetAll');
await this.$store.dispatch('qrart/resetAll');
await this.$store.dispatch('flux/resetAll');
await this.$store.dispatch('hailuo/resetAll');
await this.$store.dispatch('headshots/resetAll');
await this.$store.dispatch('kling/resetAll');
await this.$store.dispatch('luma/resetAll');
await this.$store.dispatch('pika/resetAll');
await this.$store.dispatch('suno/resetAll');
await this.$store.dispatch('login');
await this.$store.dispatch('logout');
}
}
];
+2 -4
View File
@@ -1,11 +1,9 @@
import { IApplication, IChatConversation, IChatModel, IChatModelGroup, ICredential, IService } from '@/models';
import initialState from './state';
import { IChatState } from './models';
export const resetAll = (state: IChatState): void => {
state.application = undefined;
state.conversations = undefined;
state.credential = undefined;
state.service = undefined;
Object.assign(state, initialState());
};
export const setModel = (state: IChatState, payload: IChatModel): void => {
+2
View File
@@ -224,7 +224,9 @@ export const logout = async ({ dispatch }: ActionContext<IRootState, IRootState>
await dispatch('pika/resetAll');
await dispatch('pixverse/resetAll');
await dispatch('qrart/resetAll');
await dispatch('sora/resetAll');
await dispatch('suno/resetAll');
await dispatch('nanobanana/resetAll');
await dispatch('veo/resetAll');
const currentUrl = window.location.href;
const baseUrlAuth = getBaseUrlAuth();
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IFluxConfig, IFluxTask, IService } from '@/models';
import initialState from './state';
import { IFluxState } from './models';
export const resetAll = (state: IFluxState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IFluxState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IHailuoConfig, IHailuoTask, IService } from '@/models';
import initialState from './state';
import { IHailuoState } from './models';
export const resetAll = (state: IHailuoState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IHailuoState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IHeadshotsConfig, IHeadshotsTask, IService } from '@/models';
import initialState from './state';
import { IHeadshotsState } from './models';
export const resetAll = (state: IHeadshotsState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IHeadshotsState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IKlingConfig, IKlingTask, IService } from '@/models';
import initialState from './state';
import { IKlingState } from './models';
export const resetAll = (state: IKlingState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IKlingState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, ILumaConfig, ILumaTask, IService } from '@/models';
import initialState from './state';
import { ILumaState } from './models';
export const resetAll = (state: ILumaState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: ILumaState, payload: IService): void => {
+2 -7
View File
@@ -1,14 +1,9 @@
import { IApplication, ICredential, IMidjourneyConfig, IService, IMidjourneyTask } from '@/models';
import initialState from './state';
import { IMidjourneyState } from './models';
export const resetAll = (state: IMidjourneyState): void => {
state.application = undefined;
state.applications = undefined;
state.config = {};
state.tasks = {
items: undefined,
total: undefined
};
Object.assign(state, initialState());
};
export const setTasksItems = (state: IMidjourneyState, payload: IMidjourneyTask[]): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, INanobananaConfig, INanobananaTask, IService } from '@/models';
import initialState from './state';
import { INanobananaState } from './models';
export const resetAll = (state: INanobananaState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: INanobananaState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IPikaConfig, IPikaTask, IService } from '@/models';
import initialState from './state';
import { IPikaState } from './models';
export const resetAll = (state: IPikaState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IPikaState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IPixverseConfig, IPixverseTask, IService } from '@/models';
import initialState from './state';
import { IPixverseState } from './models';
export const resetAll = (state: IPixverseState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IPixverseState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IQrartConfig, IQrartTask, IService } from '@/models';
import initialState from './state';
import { IQrartState } from './models';
export const resetAll = (state: IQrartState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IQrartState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, ISoraConfig, ISoraTask, IService } from '@/models';
import initialState from './state';
import { ISoraState } from './models';
export const resetAll = (state: ISoraState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: ISoraState, payload: IService): void => {
+2 -5
View File
@@ -1,12 +1,9 @@
import { IApplication, ICredential, IVeoConfig, IVeoTask, IService } from '@/models';
import initialState from './state';
import { IVeoState } from './models';
export const resetAll = (state: IVeoState): void => {
state.service = undefined;
state.application = undefined;
state.config = undefined;
state.credential = undefined;
state.tasks = undefined;
Object.assign(state, initialState());
};
export const setService = (state: IVeoState, payload: IService): void => {