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:
dakkar 2025-07-23 10:46:01 +01:00
parent ed68230811
commit df0f682518
2 changed files with 3 additions and 3 deletions

View file

@ -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 => {