一键填入 code

This commit is contained in:
JiangYingjin 2025-03-02 01:46:03 +08:00
parent 1aa647688f
commit a5289b39d0
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}