make trustedDomains persist across reloads
we can't just write to `prefer.s.*`, we need to `.commit` also, there's no need to use the reactive view (`prefer.r.*`) in non-reactive contexts
This commit is contained in:
parent
ed68230811
commit
df0f682518
2 changed files with 3 additions and 3 deletions
|
|
@ -36,8 +36,8 @@ export async function warningExternalWebsite(url: string) {
|
|||
}
|
||||
});
|
||||
|
||||
const isTrustedByUser = prefer.r.trustedDomains.value.includes(hostname);
|
||||
const isDisabledByUser = !prefer.r.warnExternalUrl.value;
|
||||
const isTrustedByUser = prefer.s.trustedDomains.includes(hostname);
|
||||
const isDisabledByUser = !prefer.s.warnExternalUrl;
|
||||
|
||||
if (!isTrustedByInstance && !isTrustedByUser && !isDisabledByUser) {
|
||||
const confirm = await new Promise<{ canceled: boolean }>(resolve => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue