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:
@@ -8,7 +8,7 @@
|
||||
import { httpdStore } from "@app/lib/httpd";
|
||||
|
||||
import AssigneeInput from "@app/views/projects/Cob/AssigneeInput.svelte";
|
||||
import AuthenticationErrorModal from "@app/modals/AuthenticationErrorModal.svelte";
|
||||
import ErrorModal from "@app/modals/ErrorModal.svelte";
|
||||
import CobHeader from "@app/views/projects/Cob/CobHeader.svelte";
|
||||
import ErrorMessage from "@app/components/ErrorMessage.svelte";
|
||||
import ExtendedTextarea from "@app/components/ExtendedTextarea.svelte";
|
||||
@@ -45,16 +45,26 @@
|
||||
node: baseUrl,
|
||||
issue: result.id,
|
||||
});
|
||||
} catch {
|
||||
modal.show({
|
||||
component: AuthenticationErrorModal,
|
||||
props: {
|
||||
title: "Authentication failed",
|
||||
subtitle: [
|
||||
"Could not create the issue. Make sure you're still logged in.",
|
||||
],
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
modal.show({
|
||||
component: ErrorModal,
|
||||
props: {
|
||||
title: "Coult not create issue",
|
||||
subtitle: [
|
||||
"There was an error while updating the issue.",
|
||||
"Make sure you're authenticated.",
|
||||
"Check your radicle-httpd logs for details.",
|
||||
],
|
||||
error: {
|
||||
message: error.message,
|
||||
stack: error.stack,
|
||||
},
|
||||
},
|
||||
});
|
||||
} else {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user