feat: close #2908 allow to disable parse settings from link

This commit is contained in:
Yidadaa
2023-11-08 00:30:02 +08:00
parent 638fdd8c3e
commit c5ca278253
7 changed files with 29 additions and 15 deletions

View File

@@ -16,6 +16,7 @@ const DEFAULT_ACCESS_STATE = {
hideUserApiKey: false,
hideBalanceQuery: false,
disableGPT4: false,
disableFastLink: false,
openaiUrl: DEFAULT_OPENAI_URL,
};
@@ -29,15 +30,6 @@ export const useAccessStore = createPersistStore(
return get().needCode;
},
updateCode(code: string) {
set(() => ({ accessCode: code?.trim() }));
},
updateToken(token: string) {
set(() => ({ token: token?.trim() }));
},
updateOpenAiUrl(url: string) {
set(() => ({ openaiUrl: url?.trim() }));
},
isAuthorized() {
this.fetch();