1
- import { Anchor , Box , Image , Modal , Table , Text , Tooltip } from '@mantine/core' ;
1
+ import { Box , Button , Modal , Text , Tooltip , px } from '@mantine/core' ;
2
2
import { FC , useEffect } from 'react' ;
3
3
import { useInfoModalStyles } from './styles' ;
4
- import docImage from '@/assets/images/doc.webp' ;
5
- import githubLogo from '@/assets/images/github-logo.webp' ;
6
- import slackLogo from '@/assets/images/slack-logo.webp' ;
7
4
import { useGetAbout } from '@/hooks/useGetAbout' ;
5
+ import { IconAlertCircle , IconBook2 , IconBrandGithub , IconBrandSlack , IconBusinessplan } from '@tabler/icons-react' ;
8
6
9
7
const helpResources = [
10
8
{
11
- image : slackLogo ,
9
+ icon : IconBrandSlack ,
12
10
title : 'Slack' ,
13
11
description : 'Connect with us' ,
14
12
href : 'https://launchpass.com/parseable' ,
15
13
} ,
16
14
{
17
- image : githubLogo ,
15
+ icon : IconBrandGithub ,
18
16
title : 'GitHub' ,
19
17
description : 'Find resources' ,
20
18
href : 'https://github.com/parseablehq/parseable' ,
21
19
} ,
22
20
{
23
- image : docImage ,
21
+ icon : IconBook2 ,
24
22
title : 'Documentation' ,
25
23
description : 'Learn more' ,
26
24
href : 'https://www.parseable.io/docs/introduction' ,
27
25
} ,
26
+ {
27
+ icon : IconBusinessplan ,
28
+ title : 'Get paid support' ,
29
+ description : 'Get paid support' ,
30
+ href :
'mailto:[email protected] ' , //https://www.parseable.io/pricing
31
+ } ,
28
32
] ;
29
33
30
34
type HelpCardProps = {
@@ -35,16 +39,14 @@ const HelpCard: FC<HelpCardProps> = (props) => {
35
39
const { data } = props ;
36
40
37
41
const { classes } = useInfoModalStyles ( ) ;
38
- const { HelpIconBox, helpToolip } = classes ;
42
+ const { HelpIconBox } = classes ;
39
43
40
44
return (
41
- < Box className = { HelpIconBox } >
42
- < Anchor underline = { false } href = { data . href } target = "_blank" className = { helpToolip } >
43
- < Tooltip label = { data . description } position = "bottom" withArrow >
44
- < Image maw = { 45 } src = { data . image } alt = { data . title } />
45
- </ Tooltip >
46
- </ Anchor >
47
- </ Box >
45
+ < Tooltip label = { data . description } position = "bottom" withArrow sx = { { color : 'white' , backgroundColor : 'black' } } >
46
+ < Button className = { HelpIconBox } component = { 'a' } href = { data . href } target = "_blank" >
47
+ < data . icon size = { px ( '1.2rem' ) } stroke = { 1.5 } />
48
+ </ Button >
49
+ </ Tooltip >
48
50
) ;
49
51
} ;
50
52
@@ -70,88 +72,110 @@ const InfoModal: FC<InfoModalProps> = (props) => {
70
72
const { classes } = useInfoModalStyles ( ) ;
71
73
const {
72
74
container,
73
- innerContainer,
74
- infoModal,
75
- helpTitle,
76
- helpDescription,
77
- aboutText,
75
+ parseableText,
78
76
aboutTitle,
79
77
aboutDescription,
78
+ actionBtn,
80
79
helpIconContainer,
80
+ aboutTextBox,
81
+ aboutTextKey,
82
+ aboutTextValue,
83
+ aboutTextInnerBox,
84
+ actionBtnRed
81
85
} = classes ;
82
86
83
87
return (
84
88
< Modal
85
- className = { infoModal }
86
89
opened = { opened }
87
90
onClose = { close }
88
91
withinPortal
89
92
withCloseButton = { false }
90
93
size = "xl"
91
94
centered >
92
95
< Box className = { container } >
93
- < Box className = { innerContainer } >
94
- < Text className = { aboutTitle } > About</ Text >
96
+
97
+ < Text className = { aboutTitle } >
98
+ About < span className = { parseableText } > Parseable</ span >
99
+ </ Text >
100
+ < Text className = { aboutDescription } id = "info-modal-description" >
101
+ Here you can find useful information about your Parseable instance.
102
+ </ Text >
95
103
{ error ? (
96
- < Text className = { aboutDescription } > Error...</ Text >
104
+ < Text className = { aboutDescription } > Error...</ Text >
97
105
) : loading ? (
98
106
< Text className = { aboutDescription } > Loading...</ Text >
99
107
) : data ? (
100
108
< >
101
- < Text className = { aboutDescription } id = "info-modal-description" >
102
- Here you can find useful information about your Parseable instance.
103
- </ Text >
104
-
105
- < Table highlightOnHover withBorder >
106
- < tbody className = { aboutText } >
107
- < tr >
108
- < td > Commit</ td >
109
- < td > { data . commit } </ td >
110
- </ tr >
111
- < tr >
112
- < td > Deployment Id</ td >
113
- < td > { data . deploymentId } </ td >
114
- </ tr >
115
- < tr >
116
- < td > Latest Version</ td >
117
- < td > { data . latestVersion } </ td >
118
- </ tr >
119
- < tr >
120
- < td > License</ td >
121
- < td > { data . license } </ td >
122
- </ tr >
123
- < tr >
124
- < td > Mode</ td >
125
- < td > { data . mode } </ td >
126
- </ tr >
127
- < tr >
128
- < td > Staging</ td >
129
- < td > { data . staging } </ td >
130
- </ tr >
131
- < tr >
132
- < td > Store</ td >
133
- < td > { data . store } </ td >
134
- </ tr >
135
- < tr >
136
- < td > Version</ td >
137
- < td > { data . version } </ td >
138
- </ tr >
139
- </ tbody >
140
- </ Table >
109
+ < Box className = { aboutTextBox } >
110
+ < Box className = { aboutTextInnerBox } >
111
+ < Text className = { aboutTextKey } > License: </ Text >
112
+ < Text className = { aboutTextValue } > { data . license } </ Text >
113
+ < Button
114
+ variant = "outline"
115
+ component = { 'a' }
116
+
117
+ target = "_blank"
118
+ className = { actionBtn }
119
+ >
120
+ Upgrade to commercial license
121
+ </ Button >
122
+ </ Box >
123
+
124
+ </ Box >
125
+ < Box className = { aboutTextBox } >
126
+ < Box className = { aboutTextInnerBox } >
127
+ < Text className = { aboutTextKey } > Commit: </ Text >
128
+ < Text className = { aboutTextValue } > { data . commit } </ Text >
129
+ </ Box >
130
+ < Box className = { aboutTextInnerBox } >
131
+ < Text className = { aboutTextKey } > Version: </ Text >
132
+ < Text className = { aboutTextValue } > { data . version } </ Text >
133
+ { data . updateAvailable ? (
134
+ < Button
135
+ variant = "outline"
136
+ component = { 'a' }
137
+ href = "https://github.com/parseablehq/parseable/releases/latest"
138
+ target = "_blank"
139
+ className = { actionBtnRed }
140
+ leftIcon = { < IconAlertCircle size = { px ( '1.2rem' ) } stroke = { 1.5 } /> }
141
+ >
142
+ Upgrade to latest version { data . latestVersion }
143
+ </ Button > ) : null }
144
+ </ Box >
145
+
146
+ </ Box >
147
+ < Box className = { aboutTextBox } >
148
+ < Box className = { aboutTextInnerBox } >
149
+ < Text className = { aboutTextKey } > Deployment Id: </ Text >
150
+ < Text className = { aboutTextValue } > { data . deploymentId } </ Text >
151
+ </ Box >
152
+ < Box className = { aboutTextInnerBox } >
153
+ < Text className = { aboutTextKey } > Mode</ Text >
154
+ < Text className = { aboutTextValue } > { data . mode } </ Text >
155
+ </ Box >
156
+ < Box className = { aboutTextInnerBox } >
157
+ < Text className = { aboutTextKey } > Staging</ Text >
158
+ < Text className = { aboutTextValue } > { data . staging } </ Text >
159
+ </ Box >
160
+ < Box className = { aboutTextInnerBox } >
161
+ < Text className = { aboutTextKey } > Store</ Text >
162
+ < Text className = { aboutTextValue } > { data . store } </ Text >
163
+ </ Box >
164
+ </ Box >
141
165
</ >
142
166
) : null }
143
- </ Box >
144
- < Box className = { innerContainer } >
145
- < Text className = { helpTitle } > Need any help?</ Text >
146
- < Text className = { helpDescription } > Here you can find useful resources and information.</ Text >
167
+
168
+
169
+ < Text className = { aboutTitle } > Need any help?</ Text >
170
+ < Text className = { aboutDescription } > Here you can find useful resources and information.</ Text >
147
171
148
- < Box mt = { 12 } className = { helpIconContainer } >
172
+ < Box mt = { 15 } className = { helpIconContainer } >
149
173
{ helpResources . map ( ( data ) => (
150
174
< HelpCard key = { data . title } data = { data } />
151
175
) ) }
152
176
</ Box >
153
177
</ Box >
154
- </ Box >
178
+
155
179
</ Modal >
156
180
) ;
157
181
} ;
0 commit comments