Help.js
453 lines
| 1 | /** |
| 2 | * External Dependencies |
| 3 | */ |
| 4 | import { |
| 5 | Button, |
| 6 | Grid, |
| 7 | Heading, |
| 8 | HStack, |
| 9 | Image, |
| 10 | Link, |
| 11 | Stack, |
| 12 | Text, |
| 13 | } from "@chakra-ui/react"; |
| 14 | import { __ } from "@wordpress/i18n"; |
| 15 | import React, { useState, useEffect } from "react"; |
| 16 | |
| 17 | /** |
| 18 | * Internal Dependencies |
| 19 | */ |
| 20 | import * as Icon from "../../components/Icon/Icon"; |
| 21 | import facebook from "../../images/facebook.webp"; |
| 22 | import x from "../../images/x.webp"; |
| 23 | import youtube from "../../images/youtube.webp"; |
| 24 | import ShortcodesLists from "./Lists/ShortcodesLists/ShortcodesLists"; |
| 25 | import SmartTagsLists from "./Lists/SmartTagsLists/SmartTagsLists"; |
| 26 | import { |
| 27 | facebookUrl, |
| 28 | youtubeChannelUrl, |
| 29 | twitterUrl, |
| 30 | reviewUrl, |
| 31 | } from "../../Constants"; |
| 32 | |
| 33 | /* global _EVF_DASHBOARD_ */ |
| 34 | const { newFormURL, allFormsURL, utmCampaign } = |
| 35 | typeof _EVF_DASHBOARD_ !== "undefined" && _EVF_DASHBOARD_; |
| 36 | export const supportURL = |
| 37 | "https://everestforms.net/support/?utm_source=dashboard-help&utm_medium=support-button&utm_campaign=" + |
| 38 | utmCampaign; |
| 39 | export const helpURL = |
| 40 | "https://docs.everestforms.net/?utm_source=dashboard-help&utm_medium=help-button&utm_campaign=" + |
| 41 | utmCampaign; |
| 42 | export const featureRequestURL = |
| 43 | "https://everestforms.net/feature-requests/?utm_source=dashboard-help&utm_medium=sidebar-link&utm_campaign=" + |
| 44 | utmCampaign; |
| 45 | |
| 46 | const Help = () => { |
| 47 | const [isListViewerOpen, setIsListViewerOpen] = useState(false); |
| 48 | const [listViewerType, setListViewerType] = useState(""); |
| 49 | |
| 50 | useEffect(() => {}, [isListViewerOpen]); |
| 51 | |
| 52 | return ( |
| 53 | <Grid |
| 54 | my="8" |
| 55 | mx="6" |
| 56 | gridGap="5" |
| 57 | gridTemplateColumns={{ |
| 58 | sm: "1fr", |
| 59 | md: "3fr 1fr", |
| 60 | }} |
| 61 | > |
| 62 | <Stack gap="5"> |
| 63 | {isListViewerOpen ? ( |
| 64 | listViewerType === "shortcodes" ? ( |
| 65 | <ShortcodesLists |
| 66 | setIsListViewerOpen={setIsListViewerOpen} |
| 67 | /> |
| 68 | ) : ( |
| 69 | <SmartTagsLists |
| 70 | setIsListViewerOpen={setIsListViewerOpen} |
| 71 | /> |
| 72 | ) |
| 73 | ) : ( |
| 74 | <Grid |
| 75 | gridTemplateColumns={{ |
| 76 | sm: "1fr", |
| 77 | md: "1fr 1fr", |
| 78 | }} |
| 79 | gridGap="5" |
| 80 | > |
| 81 | <Stack |
| 82 | px="6" |
| 83 | py="8" |
| 84 | align="center" |
| 85 | gap="3" |
| 86 | bgColor="white" |
| 87 | borderRadius="base" |
| 88 | border="1px" |
| 89 | borderColor="gray.100" |
| 90 | textAlign="center" |
| 91 | > |
| 92 | <Icon.Shortcode w="8" h="8" fill="primary.500" /> |
| 93 | <Heading as="h3" size="sm" fontWeight="semibold"> |
| 94 | {__("Shortcodes", "everest-forms")} |
| 95 | </Heading> |
| 96 | <Text fontSize="13px" color="gray.700"> |
| 97 | {__( |
| 98 | "Find the complete list of shortcodes with their usage information and parameter details.", |
| 99 | "everest-forms" |
| 100 | )} |
| 101 | </Text> |
| 102 | <Button |
| 103 | mt="10" |
| 104 | variant="outline" |
| 105 | colorScheme="primary" |
| 106 | borderRadius="base" |
| 107 | fontSize="14px" |
| 108 | fontWeight="normal" |
| 109 | onClick={() => { |
| 110 | setIsListViewerOpen(true); |
| 111 | setListViewerType("shortcodes"); |
| 112 | }} |
| 113 | > |
| 114 | {__("View all Shortcodes", "everest-forms")} |
| 115 | </Button> |
| 116 | </Stack> |
| 117 | <Stack |
| 118 | px="6" |
| 119 | py="8" |
| 120 | align="center" |
| 121 | gap="3" |
| 122 | bgColor="white" |
| 123 | borderRadius="base" |
| 124 | border="1px" |
| 125 | borderColor="gray.100" |
| 126 | textAlign="center" |
| 127 | > |
| 128 | <Icon.SmartTag w="8" h="8" fill="primary.500" /> |
| 129 | <Heading as="h3" size="sm" fontWeight="semibold"> |
| 130 | {__("Smart Tags", "everest-forms")} |
| 131 | </Heading> |
| 132 | <Text fontSize="13px" color="gray.700"> |
| 133 | {__( |
| 134 | "Find the complete list of smart tags with their usage information and parameter details.", |
| 135 | "everest-forms" |
| 136 | )} |
| 137 | </Text> |
| 138 | <Button |
| 139 | mt="10" |
| 140 | variant="outline" |
| 141 | colorScheme="primary" |
| 142 | borderRadius="base" |
| 143 | fontSize="14px" |
| 144 | fontWeight="normal" |
| 145 | onClick={() => { |
| 146 | setIsListViewerOpen(true); |
| 147 | setListViewerType("smartTags"); |
| 148 | }} |
| 149 | > |
| 150 | {__("View Tags", "everest-forms")} |
| 151 | </Button> |
| 152 | </Stack> |
| 153 | <Stack |
| 154 | px="6" |
| 155 | py="8" |
| 156 | align="center" |
| 157 | gap="3" |
| 158 | bgColor="white" |
| 159 | borderRadius="base" |
| 160 | border="1px" |
| 161 | borderColor="gray.100" |
| 162 | textAlign="center" |
| 163 | > |
| 164 | <Icon.Chat w="8" h="8" fill="primary.500" /> |
| 165 | <Heading as="h3" size="sm" fontWeight="semibold"> |
| 166 | {__("Support", "everest-forms")} |
| 167 | </Heading> |
| 168 | <Text fontSize="13px" color="gray.700"> |
| 169 | {__( |
| 170 | "If you have any issues or questions, our team is on standby to help you instantly.", |
| 171 | "everest-forms" |
| 172 | )} |
| 173 | </Text> |
| 174 | <Button |
| 175 | mt="10" |
| 176 | as={Link} |
| 177 | variant="outline" |
| 178 | colorScheme="primary" |
| 179 | borderRadius="base" |
| 180 | fontSize="14px" |
| 181 | fontWeight="normal" |
| 182 | href={supportURL} |
| 183 | isExternal |
| 184 | textDecor="none !important" |
| 185 | > |
| 186 | {__("Contact Support", "everest-forms")} |
| 187 | </Button> |
| 188 | </Stack> |
| 189 | <Stack |
| 190 | px="6" |
| 191 | py="8" |
| 192 | align="center" |
| 193 | gap="3" |
| 194 | bgColor="white" |
| 195 | borderRadius="base" |
| 196 | border="1px" |
| 197 | borderColor="gray.100" |
| 198 | textAlign="center" |
| 199 | > |
| 200 | <Icon.DocsLines w="8" h="8" fill="primary.500" /> |
| 201 | <Heading as="h3" size="sm" fontWeight="semibold"> |
| 202 | {__("Need Some Help?", "everest-forms")} |
| 203 | </Heading> |
| 204 | <Text fontSize="13px" color="gray.700"> |
| 205 | {__( |
| 206 | "Check our documentation for detailed information on Everest Forms features and how to use them.", |
| 207 | "everest-forms" |
| 208 | )} |
| 209 | </Text> |
| 210 | <Button |
| 211 | mt="10" |
| 212 | as={Link} |
| 213 | colorScheme="primary" |
| 214 | borderRadius="base" |
| 215 | fontSize="14px" |
| 216 | fontWeight="normal" |
| 217 | textDecor="none !important" |
| 218 | href={helpURL} |
| 219 | isExternal |
| 220 | variant="outline" |
| 221 | > |
| 222 | {__("View Now", "everest-forms")} |
| 223 | </Button> |
| 224 | </Stack> |
| 225 | </Grid> |
| 226 | )} |
| 227 | <Stack> |
| 228 | <Heading as="h3" fontSize="lg" fontWeight="semibold"> |
| 229 | {__("Join Our Community", "everest-forms")} |
| 230 | </Heading> |
| 231 | </Stack> |
| 232 | <Grid |
| 233 | gridTemplateColumns="1fr 1fr" |
| 234 | p="4" |
| 235 | bgColor="white" |
| 236 | border="1px" |
| 237 | borderColor="gray.100" |
| 238 | borderRadius="base" |
| 239 | gridGap="7" |
| 240 | > |
| 241 | <Image src={facebook} w="full" /> |
| 242 | <Stack gap="2" justify="center"> |
| 243 | <Heading |
| 244 | as="h3" |
| 245 | fontSize="xl" |
| 246 | fontWeight="normal" |
| 247 | color="gray.700" |
| 248 | > |
| 249 | {__("Facebook Community", "everest-forms")} |
| 250 | </Heading> |
| 251 | <Text fontSize="13px" color="gray.700"> |
| 252 | {__( |
| 253 | "Join our exclusive group and connect with fellow Everest Forms members. Ask questions, contribute to discussions, and share feedback!", |
| 254 | "everest-forms" |
| 255 | )} |
| 256 | </Text> |
| 257 | <Button |
| 258 | as={Link} |
| 259 | colorScheme="primary" |
| 260 | borderRadius="base" |
| 261 | fontSize="14px" |
| 262 | fontWeight="normal" |
| 263 | alignSelf="start" |
| 264 | mt="5" |
| 265 | color="white !important" |
| 266 | isExternal |
| 267 | href={facebookUrl} |
| 268 | textDecor="none !important" |
| 269 | > |
| 270 | {__("Join Group", "everest-forms")} |
| 271 | </Button> |
| 272 | </Stack> |
| 273 | </Grid> |
| 274 | <Grid |
| 275 | gridTemplateColumns="1fr 1fr" |
| 276 | p="4" |
| 277 | bgColor="white" |
| 278 | border="1px" |
| 279 | borderColor="gray.100" |
| 280 | borderRadius="base" |
| 281 | gridGap="7" |
| 282 | > |
| 283 | <Image src={x} /> |
| 284 | <Stack gap="2" justify="center"> |
| 285 | <Heading |
| 286 | as="h3" |
| 287 | fontSize="xl" |
| 288 | fontWeight="normal" |
| 289 | color="gray.700" |
| 290 | > |
| 291 | {__("X ( Twitter )", "everest-forms")} |
| 292 | </Heading> |
| 293 | <Text fontSize="13px" color="gray.700"> |
| 294 | {__( |
| 295 | "Follow us on X to get the latest news and updates about Everest Forms and the team behind it.", |
| 296 | "everest-forms" |
| 297 | )} |
| 298 | </Text> |
| 299 | <Button |
| 300 | as={Link} |
| 301 | borderRadius="base" |
| 302 | fontSize="14px" |
| 303 | fontWeight="normal" |
| 304 | alignSelf="start" |
| 305 | mt="5" |
| 306 | color="white !important" |
| 307 | bgColor="black !important" |
| 308 | isExternal |
| 309 | href={twitterUrl} |
| 310 | textDecor="none !important" |
| 311 | > |
| 312 | {__("Follow", "everest-forms")} |
| 313 | </Button> |
| 314 | </Stack> |
| 315 | </Grid> |
| 316 | <Grid |
| 317 | gridTemplateColumns="1fr 1fr" |
| 318 | p="4" |
| 319 | bgColor="white" |
| 320 | border="1px" |
| 321 | borderColor="gray.100" |
| 322 | borderRadius="base" |
| 323 | gridGap="7" |
| 324 | > |
| 325 | <Image src={youtube} /> |
| 326 | <Stack gap="2" justify="center"> |
| 327 | <Heading |
| 328 | as="h3" |
| 329 | fontSize="xl" |
| 330 | fontWeight="normal" |
| 331 | color="gray.700" |
| 332 | > |
| 333 | {__("YouTube", "everest-forms")} |
| 334 | </Heading> |
| 335 | <Text fontSize="13px" color="gray.700"> |
| 336 | {__( |
| 337 | "Subscribe to our YouTube channel, where we guide you on using Everest Forms’s features and add-ons.", |
| 338 | "everest-forms" |
| 339 | )} |
| 340 | </Text> |
| 341 | <Button |
| 342 | as={Link} |
| 343 | colorScheme="red" |
| 344 | borderRadius="base" |
| 345 | fontSize="14px" |
| 346 | fontWeight="normal" |
| 347 | alignSelf="start" |
| 348 | mt="5" |
| 349 | color="white !important" |
| 350 | isExternal |
| 351 | href={youtubeChannelUrl} |
| 352 | textDecor="none !important" |
| 353 | > |
| 354 | {__("Subscribe", "everest-forms")} |
| 355 | </Button> |
| 356 | </Stack> |
| 357 | </Grid> |
| 358 | </Stack> |
| 359 | <Stack gap="5"> |
| 360 | <Stack |
| 361 | p="4" |
| 362 | gap="3" |
| 363 | bgColor="white" |
| 364 | borderRadius="base" |
| 365 | border="1px" |
| 366 | borderColor="gray.100" |
| 367 | > |
| 368 | <HStack gap="2"> |
| 369 | <Icon.Video w="5" h="5" fill="primary.500" /> |
| 370 | <Heading as="h3" size="sm" fontWeight="semibold"> |
| 371 | {__("Video Tutorials", "everest-forms")} |
| 372 | </Heading> |
| 373 | </HStack> |
| 374 | <Text fontSize="13px" color="gray.700"> |
| 375 | {__( |
| 376 | "Watch our step-by-step video tutorials that’ll help you get the best out of Everest Forms’s features.", |
| 377 | "everest-forms" |
| 378 | )} |
| 379 | </Text> |
| 380 | <Link |
| 381 | isExternal |
| 382 | color="var(--chakra-colors-primary-500) !important" |
| 383 | textDecor="underline" |
| 384 | href={youtubeChannelUrl} |
| 385 | > |
| 386 | {__("Watch Videos", "everest-forms")} |
| 387 | </Link> |
| 388 | </Stack> |
| 389 | <Stack |
| 390 | p="4" |
| 391 | gap="3" |
| 392 | bgColor="white" |
| 393 | borderRadius="base" |
| 394 | border="1px" |
| 395 | borderColor="gray.100" |
| 396 | > |
| 397 | <HStack gap="2"> |
| 398 | <Icon.Bulb w="5" h="5" fill="primary.500" /> |
| 399 | <Heading as="h3" size="sm" fontWeight="semibold"> |
| 400 | {__("Feature Request", "everest-forms")} |
| 401 | </Heading> |
| 402 | </HStack> |
| 403 | <Text fontSize="13px" color="gray.700"> |
| 404 | {__( |
| 405 | "Don’t find a feature you’re looking for? Suggest any features you think would enhance our product.", |
| 406 | "everest-forms" |
| 407 | )} |
| 408 | </Text> |
| 409 | <Link |
| 410 | href={featureRequestURL} |
| 411 | color="var(--chakra-colors-primary-500) !important" |
| 412 | textDecor="underline" |
| 413 | isExternal |
| 414 | > |
| 415 | {__("Request a Feature", "everest-forms")} |
| 416 | </Link> |
| 417 | </Stack> |
| 418 | <Stack |
| 419 | p="4" |
| 420 | gap="3" |
| 421 | bgColor="white" |
| 422 | borderRadius="base" |
| 423 | border="1px" |
| 424 | borderColor="gray.100" |
| 425 | > |
| 426 | <HStack gap="2"> |
| 427 | <Icon.Star w="5" h="5" fill="primary.500" /> |
| 428 | <Heading as="h3" size="sm" fontWeight="semibold"> |
| 429 | {__("Submit a Review", "everest-forms")} |
| 430 | </Heading> |
| 431 | </HStack> |
| 432 | <Text fontSize="13px" color="gray.700"> |
| 433 | {__( |
| 434 | "Please take a moment to give us a review. We appreciate honest feedback that’ll help us improve our plugin.", |
| 435 | "everest-forms" |
| 436 | )} |
| 437 | </Text> |
| 438 | <Link |
| 439 | href={reviewUrl} |
| 440 | color="var(--chakra-colors-primary-500) !important" |
| 441 | textDecor="underline" |
| 442 | isExternal |
| 443 | > |
| 444 | {__("Submit a Review", "everest-forms")} |
| 445 | </Link> |
| 446 | </Stack> |
| 447 | </Stack> |
| 448 | </Grid> |
| 449 | ); |
| 450 | }; |
| 451 | |
| 452 | export default Help; |
| 453 |