File tree 2 files changed +46
-0
lines changed
2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ import classes from "./style.module.scss";
2
2
3
3
import {
4
4
Box ,
5
+ Button ,
5
6
Center ,
6
7
Flex ,
8
+ Stack ,
9
+ Text ,
7
10
} from "@mantine/core" ;
8
11
9
12
import { useStable } from "~/hooks/stable" ;
@@ -38,6 +41,10 @@ import { LegacyModal } from "./modals/legacy";
38
41
import { SandboxModal } from "./modals/sandbox" ;
39
42
import { executeUserQuery } from "~/connection" ;
40
43
import { ChangelogModal } from "./modals/changelog" ;
44
+ import { SurrealistLogo } from "../SurrealistLogo" ;
45
+ import { Icon } from "../Icon" ;
46
+ import { iconOpen } from "~/util/icons" ;
47
+ import { isMobile } from "~/util/helpers" ;
41
48
42
49
const PORTAL_ATTRS = {
43
50
attributes : {
@@ -99,6 +106,37 @@ export function Scaffold() {
99
106
</ Center >
100
107
) }
101
108
109
+ { isMobile ( ) && (
110
+ < Center
111
+ pos = "fixed"
112
+ inset = { 0 }
113
+ bg = "slate.9"
114
+ style = { { zIndex : 1000 } }
115
+ >
116
+ < Stack maw = { 250 } mx = "auto" >
117
+ < SurrealistLogo />
118
+
119
+ < Text c = "bright" mt = "lg" >
120
+ Surrealist is the ultimate way to visually manage your SurrealDB database
121
+ </ Text >
122
+
123
+ < Text c = "slate.3" >
124
+ Support for Surrealist on mobile platforms is currently unavailable, however you can visit Surrealist
125
+ on a desktop environment to get started.
126
+ </ Text >
127
+
128
+ < Button
129
+ mt = "lg"
130
+ variant = "gradient"
131
+ onClick = { ( ) => adapter . openUrl ( "https://surrealdb.com/surrealist" ) }
132
+ rightSection = { < Icon path = { iconOpen } /> }
133
+ >
134
+ Read more about Surrealist
135
+ </ Button >
136
+ </ Stack >
137
+ </ Center >
138
+ ) }
139
+
102
140
< Flex
103
141
direction = "column"
104
142
flex = { 1 }
Original file line number Diff line number Diff line change @@ -363,3 +363,11 @@ export function fuzzyMatch(query: string, target: string) {
363
363
364
364
return regex . test ( target ) ;
365
365
}
366
+
367
+ /**
368
+ * Check if the current platform is mobile
369
+ */
370
+ export function isMobile ( ) {
371
+ const userAgent = navigator . userAgent . toLowerCase ( ) ;
372
+ return / a n d r o i d | w e b o s | i p h o n e | i p a d | i p o d | b l a c k b e r r y | i e m o b i l e | o p e r a m i n i / . test ( userAgent ) ;
373
+ }
You can’t perform that action at this time.
0 commit comments