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