一键填入 code
This commit is contained in:
parent
1aa647688f
commit
a5289b39d0
|
@ -1411,6 +1411,7 @@ function _Chat() {
|
|||
const payload = JSON.parse(text) as {
|
||||
key?: string;
|
||||
url?: string;
|
||||
code?: string;
|
||||
};
|
||||
|
||||
console.log("[Command] got settings from url: ", payload);
|
||||
|
@ -1432,6 +1433,10 @@ function _Chat() {
|
|||
accessStore.update((access) => (access.useCustomConfig = true));
|
||||
});
|
||||
}
|
||||
|
||||
if (payload.code) {
|
||||
accessStore.update((access) => (access.accessCode = payload.code!));
|
||||
}
|
||||
} catch {
|
||||
console.error("[Command] failed to get settings from url: ", text);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue