upd: add option to disable external url warning

This commit is contained in:
Marie 2024-10-10 02:00:41 +02:00
parent 72a0f16b38
commit 7bd971c036
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
6 changed files with 15 additions and 1 deletions

View file

@ -29,8 +29,9 @@ export async function warningExternalWebsite(url: string) {
});
const isTrustedByUser = defaultStore.reactiveState.trustedDomains.value.includes(domain);
const isDisabledByUser = !defaultStore.reactiveState.warnExternalUrl.value;
if (!isTrustedByInstance && !isTrustedByUser) {
if (!isTrustedByInstance && !isTrustedByUser && !isDisabledByUser) {
const confirm = await new Promise<{ canceled: boolean }>(resolve => {
const { dispose } = os.popup(MkUrlWarningDialog, {
url,