mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
Improve authentication error modal
We tell users to check their firewall and ad blocker settings in case they bump into authentication problems. This also separates out the modal to be only used by the session view.
This commit is contained in:
@@ -1,15 +1,36 @@
|
||||
<script lang="ts">
|
||||
import { baseUrlToString } from "@app/lib/utils";
|
||||
import * as httpd from "@app/lib/httpd";
|
||||
|
||||
import Modal from "@app/components/Modal.svelte";
|
||||
import Icon from "@app/components/Icon.svelte";
|
||||
|
||||
export let title: string;
|
||||
export let subtitle: string[];
|
||||
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41532
|
||||
const isBrave = navigator.brave !== undefined;
|
||||
const url = baseUrlToString(httpd.api.baseUrl);
|
||||
</script>
|
||||
|
||||
<Modal {title} showCloseButton>
|
||||
<Modal title="Authentication failed" showCloseButton>
|
||||
<Icon name="alert" size="48" slot="icon" />
|
||||
|
||||
<div slot="subtitle">
|
||||
{@html subtitle.join("<br />")}
|
||||
Make sure your browser is able to connect to <a href={url}>{url}</a>
|
||||
​.
|
||||
|
||||
<br />
|
||||
|
||||
{#if isBrave}
|
||||
It seems like you're using Brave browser, to make authentication work, <br />
|
||||
disable trackers and ad blockers in settings/shields.
|
||||
{:else}
|
||||
Firewalls and ad blockers can interfere with authentication, <br />
|
||||
try disabling them and try again.
|
||||
{/if}
|
||||
|
||||
<br />
|
||||
<br />
|
||||
If the above doesn't help, check for errors in the browser console and
|
||||
<br />
|
||||
in the terminal where you ran the auth command.
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user