File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { Dialog } from "~/base-components/dialog" ;
2+ import { AlertDialog } from "@kobalte/core" ;
3+
4+ export function SafariNotSupportedDialog ( ) {
5+ const isSafari = / ^ ( (? ! c h r o m e | a n d r o i d ) .) * s a f a r i / i. test ( navigator . userAgent ) ;
6+
7+ return (
8+ < Dialog
9+ title = "Safari is not supported"
10+ buttons = {
11+ < AlertDialog . CloseButton class = "border border-neutral-400 hover:bg-neutral-800 hover:border-neutral-100 text-white text-lg py-2 px-4 rounded focus:outline-dashed focus:outline-white focus:outline-offset-2" >
12+ Dismiss
13+ </ AlertDialog . CloseButton >
14+ }
15+ defaultOpen = { isSafari }
16+ >
17+ < p >
18+ DevTools Web currently does not support the use of Safari. Sadly Safari
19+ does not allow you to make requests to localhost. More information in
20+ our docs:{ " " }
21+ < strong >
22+ < a
23+ class = "break-words underline"
24+ href = "https://docs.crabnebula.dev/devtools/troubleshoot/broken-connection/#safari-not-supported"
25+ >
26+ docs.crabnebula.dev/devtools/troubleshoot/broken-connection/#safari-not-supported
27+ </ a >
28+ </ strong >
29+ </ p >
30+ </ Dialog >
31+ ) ;
32+ }
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ import { checkConnection } from "~/lib/connection/transport";
77import { GithubIcon } from "~/components/icons/github" ;
88import { ConnectionFailedDialog } from "~/components/dialogs/connection-failed-dialog" ;
99import { createStore } from "solid-js/store" ;
10- import { createSignal } from "solid-js" ;
10+ import { createSignal , DEV , Show } from "solid-js" ;
11+ import { SafariNotSupportedDialog } from "~/components/dialogs/safari-not-supported-dialog" ;
1112
1213export default function Connect ( ) {
1314 const navigate = useNavigate ( ) ;
@@ -134,6 +135,9 @@ export default function Connect() {
134135 port = { connectionStore . port }
135136 retry = { tryToConnect }
136137 />
138+ < Show when = { ! DEV } >
139+ < SafariNotSupportedDialog />
140+ </ Show >
137141 </ div >
138142 ) ;
139143}
You can’t perform that action at this time.
0 commit comments