From edc27a66eed6160874315af63592e34f42bd34d5 Mon Sep 17 00:00:00 2001 From: "Japheth Louie M. Gofredo" <83058948+japhethLG@users.noreply.github.com> Date: Tue, 21 May 2024 06:34:56 +0800 Subject: [PATCH 1/5] revert: Revert to old pricing page (#2459) # Description Revert to old pricing page ## Type of change Please delete options that are not relevant. - [x] Revert feature (non-breaking change which reverts functionality) # How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. - [x] Manual Test # Screenshots / Screen recording ![image](https://github.com/zesty-io/website/assets/83058948/ab5a897a-282b-4b32-a82e-0f77d84da9bb) --- src/views/zesty/Pricing.js | 147 +++++++++++++++++++++++++------------ 1 file changed, 99 insertions(+), 48 deletions(-) diff --git a/src/views/zesty/Pricing.js b/src/views/zesty/Pricing.js index 13a65bfc4..83541f4b5 100644 --- a/src/views/zesty/Pricing.js +++ b/src/views/zesty/Pricing.js @@ -32,79 +32,130 @@ */ // Mui Imports -import React from 'react'; +import React, { useEffect, useState } from 'react'; +import { useTheme } from '@mui/material/styles'; +import Box from '@mui/material/Box'; // Components Import -import PricingHero from '../../blocks/pricing/revamp/PricingHero'; +import SimpleCardLogo from 'blocks/zesty/LogoGrid/SimpleCardLogo'; +// import Container from 'components/Container'; +import Container from 'blocks/container/Container'; +import PricingHero from '../../blocks/pricing/PricingHero/PricingHero'; +import SupportBanner from '../../blocks/pricing/SupportBanner/SupportBanner'; +import Faq from '../../blocks/pricing/Faq/Faq'; import useFetch from 'components/hooks/useFetch'; import FillerContent from 'components/globals/FillerContent'; -import { PricingTierCards } from 'blocks/pricing/revamp/PricingTierCards'; -import PricingTable from 'blocks/pricing/revamp/PricingTable'; -import AdditionalFeatures from 'blocks/pricing/revamp/AdditionalFeatures'; -import Testimonial from 'blocks/pricing/revamp/Testimonial'; -import FAQs from 'blocks/pricing/revamp/FAQs'; -import Brands from 'blocks/pricing/revamp/Brands'; - -const filterAdditionalFeatures = (features) => { - return features.filter((feature) => feature.classification[0] === "Add-on's"); -}; +function onlyUnique(value, index, self) { + return self.indexOf(value) === index; +} function Pricing({ content }) { - const { data: levers } = useFetch( - `/-/pricing-levers-revamp.json`, - content.zestyProductionMode, - ); - - const { data: leverClassification } = useFetch( - `/-/pricing-levers-classification.json`, - content.zestyProductionMode, - ); - + const theme = useTheme(); const heroProps = { title: content.title, subtitle: content.instance_definition, tiers: content.tiers.data, }; - const faqsProps = { - faqs: content?.related_faqs?.data, - title: content?.faqs_title, - subtitle: content?.faqs_subtitle, - }; - - const additionalFeaturesProps = { - features: filterAdditionalFeatures(levers), - title: content.additional_features_title, - }; + const [, setCategories] = useState([]); - const pricingTableProps = { - levers: levers, - classification: leverClassification, - tiers: content.pricing_tiers_revamp.data, - }; + const { data: pricingData } = useFetch( + `/-/pricing-levers.json`, + content.zestyProductionMode, + ); - const testimonialProps = { - testimonials: content.testimonials.data, - title: content.testimonial_title, - }; + useEffect(() => { + let leverCategories = []; + pricingData.forEach((item) => { + leverCategories.push(item.classification); + }); + leverCategories.filter(onlyUnique); + let cats = [...new Set(leverCategories)]; + setCategories(cats); + }, [pricingData]); return ( <> - - - - - - + + {/* {Pricing Comparison Table} */} + {/* + + + + {content?.comparison_heading} + + + + {active && ( + + {categories.map((cat, idx) => ( + + ))} + + )} + + */} + + + + + + {/* */} + {/* + + */} + + + + + ); } From 97a96fa6215e4939e772b7dafcd441f6c4887fb6 Mon Sep 17 00:00:00 2001 From: Gian Espinosa <44116036+glespinosa@users.noreply.github.com> Date: Mon, 10 Jun 2024 09:08:06 +0800 Subject: [PATCH 2/5] fix(user & domain): fixing invalid date (#2465) fixing invalid date on users and domains tab Will close : https://github.com/zesty-io/manager-ui/issues/2716 --- src/components/accounts/domains/DomainListings.js | 4 +++- src/views/accounts/instances/Users.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/accounts/domains/DomainListings.js b/src/components/accounts/domains/DomainListings.js index 9aa0ef5a8..e939ef546 100644 --- a/src/components/accounts/domains/DomainListings.js +++ b/src/components/accounts/domains/DomainListings.js @@ -107,7 +107,9 @@ export default function DomainListings({ renderCell: (params) => { return ( - {dayjs(params.row.createdAt).format('MMM DD, YYYY')} + {!dayjs(params.row.createdAt).isValid() + ? '' + : dayjs(params.row.createdAt).format('MMM DD, YYYY')} ); }, diff --git a/src/views/accounts/instances/Users.js b/src/views/accounts/instances/Users.js index 66fbadb8c..369069a32 100644 --- a/src/views/accounts/instances/Users.js +++ b/src/views/accounts/instances/Users.js @@ -152,7 +152,9 @@ const CustomTable = ({ editable: false, renderHeader: () => Last Active, renderCell: (params) => { - const date = dayjs(params.row.lastLogin).format('MMM DD, YYYY'); + const date = !dayjs(params.row.lastLogin).isValid() + ? '' + : dayjs(params.row.lastLogin).format('MMM DD, YYYY'); return ( {date} From 7c276a2d811eb590b9c45550e65665ffd215ca0f Mon Sep 17 00:00:00 2001 From: "Japheth Louie M. Gofredo" <83058948+japhethLG@users.noreply.github.com> Date: Sun, 23 Jun 2024 22:47:53 -0400 Subject: [PATCH 3/5] fix: Zesty.io Demo Page spacing edits (#2468) # Description Fixed the whitespace in demo form Fixes #2467 ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) # How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. - [x] Manual Test - [ ] Unit Test - [ ] E2E Test # Screenshots / Screen recording Please add screenshots or recording if applicable Before: ![image](https://github.com/zesty-io/website/assets/83058948/937f9c4b-fc71-4b24-a9fd-69bd33ee2246) After: ![image](https://github.com/zesty-io/website/assets/83058948/1045d539-5e81-4080-b60d-c0f6038438ce) --- src/revamp/ui/GetDemoSection/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/revamp/ui/GetDemoSection/index.js b/src/revamp/ui/GetDemoSection/index.js index c2394a33d..66c559887 100644 --- a/src/revamp/ui/GetDemoSection/index.js +++ b/src/revamp/ui/GetDemoSection/index.js @@ -118,7 +118,7 @@ const GetDemoSection = ({ })} > @@ -138,13 +138,13 @@ const GetDemoSection = ({ p: { component: Typography, props: { - mt: 1, + mt: 2, component: 'p', variant: 'h6', whiteSpace: 'pre-line', color: 'grey.300', fontSize: '18px', - lineHeight: '28px', + lineHeight: '24px', }, }, }, @@ -282,6 +282,9 @@ const GetDemoSection = ({ )} + + + @@ -294,7 +297,7 @@ export default GetDemoSection; function Testimonial({ review }) { return ( - + {review?.review} @@ -320,9 +323,6 @@ function TrustLogos() { return ( - - - ); } From 84915ea38d0b975cb95636c0c1e584c08a564c18 Mon Sep 17 00:00:00 2001 From: "Japheth Louie M. Gofredo" <83058948+japhethLG@users.noreply.github.com> Date: Thu, 27 Jun 2024 08:09:23 +0800 Subject: [PATCH 4/5] fix: Zesty.io Mindshare links falling back to old content/not displaying properly (#2470) # Description Fixed Zesty.io Mindshare links falling back to old content/not displaying properly Fixes #2463 ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) # How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. - [x] Manual Test - [ ] Unit Test - [ ] E2E Test # Screenshots / Screen recording Before: ![image](https://github.com/zesty-io/website/assets/83058948/a86c3600-4c11-4a84-a665-775085c253d5) After: ![image](https://github.com/zesty-io/website/assets/83058948/1ae206ce-91cc-4500-b5d2-984d513c3c09) --- src/layouts/Main/Main.js | 1 + src/lib/ZestyView.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/Main/Main.js b/src/layouts/Main/Main.js index adccd8689..a151737de 100644 --- a/src/layouts/Main/Main.js +++ b/src/layouts/Main/Main.js @@ -191,6 +191,7 @@ const Main = ({ isAuthenticated={isLoggedIn} userInfo={userInfo?.data} loading={loading} + cta={'Contact Sales'} /> )} diff --git a/src/lib/ZestyView.js b/src/lib/ZestyView.js index d2c07f1bb..9ea1a4bdb 100644 --- a/src/lib/ZestyView.js +++ b/src/lib/ZestyView.js @@ -46,7 +46,7 @@ export function ZestyView(props) { props.content.meta.layout?.json['layout:root:column:0']?.children, ) === '{}' ) { - return true; + return false; } // return only true if the layout is active and has components From a4ce1ca17fbec8de03785ea8d85a7f04d94560c4 Mon Sep 17 00:00:00 2001 From: "Japheth Louie M. Gofredo" <83058948+japhethLG@users.noreply.github.com> Date: Sat, 23 Nov 2024 01:11:15 +0800 Subject: [PATCH 5/5] chore: merge to production (#2493) #2459 #2468 #2470 #2474 #2477 #2488 #2490 #2491 --------- Signed-off-by: Japheth Louie M. Gofredo <83058948+japhethLG@users.noreply.github.com> --- .vscode/settings.json | 2 +- next.config.js | 5 ++ .../dashboard/ui/ZInstancesContainer.js | 6 +-- src/config/redirects.js | 49 +++++++++++++++++++ src/pages/docs/index.js | 6 +-- src/pages/login/index.js | 10 +++- src/revamp/ui/GetDemoSection/index.js | 30 +----------- src/revamp/ui/HeroV2/index.js | 16 ------ src/views/zesty/Article.js | 25 +++++++++- src/views/zesty/Homepage/EnterpriseGrowth.js | 4 +- 10 files changed, 96 insertions(+), 57 deletions(-) create mode 100644 src/config/redirects.js diff --git a/.vscode/settings.json b/.vscode/settings.json index 5f21e24fb..278c412c5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,5 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": { "source.fixAll.format": "never" - } + }, } diff --git a/next.config.js b/next.config.js index 77288aee4..4c398e613 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,5 @@ const zestyConfig = require('./zesty.config.json'); +const { docsRedirects } = require('./src/config/redirects'); module.exports = { trailingSlash: true, @@ -14,4 +15,8 @@ module.exports = { ], }, swcMinify: true, + + async redirects() { + return [...docsRedirects]; + }, }; diff --git a/src/components/accounts/dashboard/ui/ZInstancesContainer.js b/src/components/accounts/dashboard/ui/ZInstancesContainer.js index 48f358685..63ec39ff3 100644 --- a/src/components/accounts/dashboard/ui/ZInstancesContainer.js +++ b/src/components/accounts/dashboard/ui/ZInstancesContainer.js @@ -12,11 +12,9 @@ const ZInstancesContainer = ({ }) => { const dayTime = () => { const hour = new Date().getHours(); - if (hour >= 5 && hour <= 12) return 'Good Morning, '; + if (hour >= 0 && hour <= 12) return 'Good Morning, '; else if (hour > 12 && hour <= 17) return 'Good Afternoon, '; - else if (hour > 17 && hour <= 21) return 'Good Evening, '; - else if ((hour > 21 && hour <= 23) || (hour >= 0 && hour <= 4)) - return 'Good Night, '; + else if (hour > 17 && hour <= 23) return 'Good Evening, '; }; return ( <> diff --git a/src/config/redirects.js b/src/config/redirects.js new file mode 100644 index 000000000..3fea22eee --- /dev/null +++ b/src/config/redirects.js @@ -0,0 +1,49 @@ +const docsRedirects = [ + { + source: '/docs/instances/api-reference/:path*', + destination: 'https://docs.zesty.io/reference/instances-api-reference', + permanent: true, + }, + { + source: '/docs/authentication/api-reference/:path*', + destination: 'https://docs.zesty.io/reference/authentication-api-reference', + permanent: true, + }, + { + source: '/docs/accounts/api-reference/:path*', + destination: 'https://docs.zesty.io/reference/accounts-api-reference', + permanent: true, + }, + { + source: '/docs/parsley/api-reference/:path*', + destination: 'https://docs.zesty.io/docs/parsley', + permanent: true, + }, + { + source: '/docs/media/api-reference/manager/:path*', + destination: 'https://docs.zesty.io/reference/media-manager-api-reference', + permanent: true, + }, + { + source: '/docs/media/api-reference/storage/:path*', + destination: 'https://docs.zesty.io/reference/media-storage-api-reference', + permanent: true, + }, + { + source: '/docs/media/api-reference/modify/:path*', + destination: 'https://docs.zesty.io/reference/media-modify-api-reference', + permanent: true, + }, + { + source: '/docs/media/api-reference/resolver/:path*', + destination: 'https://docs.zesty.io/reference/media-resolver-api-reference', + permanent: true, + }, + { + source: '/docs/media/api-reference/:path*', + destination: 'https://docs.zesty.io/reference/media-api-reference', + permanent: true, + }, +]; + +module.exports = { docsRedirects }; diff --git a/src/pages/docs/index.js b/src/pages/docs/index.js index 76b6c95f5..4dfa00c8c 100644 --- a/src/pages/docs/index.js +++ b/src/pages/docs/index.js @@ -165,19 +165,19 @@ const cardData = [ title: 'Instances API', description: 'A collection of available REST endpoints scoped to your unique instance.', - link: '/docs/instances/api-reference/', + link: 'https://docs.zesty.io/reference/instances-api-reference', }, { title: 'Authentication API', description: 'Auth API is used to authenticate users with Zesty.io, which returns a token that grants to access services like Instances API, Accounts API, and Media API. Auth was setup as a stand alone service so it can connect to many services in our infrastructure.', - link: '/docs/authentication/api-reference/', + link: 'https://docs.zesty.io/reference/authentication-api-reference', }, { title: 'Accounts API', description: 'API used to control management of users, roles, instances, and teams.', - link: '/docs/accounts/api-reference/', + link: 'https://docs.zesty.io/reference/accounts-api-reference', }, { title: 'Guides', diff --git a/src/pages/login/index.js b/src/pages/login/index.js index 365518cd2..62d5cab91 100644 --- a/src/pages/login/index.js +++ b/src/pages/login/index.js @@ -15,7 +15,15 @@ const site = 'https://www.zesty.io'; const Login = (props) => { const router = useRouter(); - const content = props.data.data[0].content; + const content = + props.data.data + .sort( + (a, b) => + new Date(b.content.start_date_and_time) - + new Date(a.content.start_date_and_time), + ) + .map((item) => item.content)[0] || null; + const loginContent = props.loginData.data[0].content; const ogimage = content?.feature_image?.data[0]?.url; diff --git a/src/revamp/ui/GetDemoSection/index.js b/src/revamp/ui/GetDemoSection/index.js index 66c559887..98644fc75 100644 --- a/src/revamp/ui/GetDemoSection/index.js +++ b/src/revamp/ui/GetDemoSection/index.js @@ -19,11 +19,7 @@ import useGetDynamicData from './useGetDynamicData'; import { useRouter } from 'next/router'; import ZestyImage from 'blocks/Image/ZestyImage'; -const acorns = - 'https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Acorns%20Logo.svg', - bjs = `https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/BJ's%20Logo.svg`, - rocketLeague = `https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Horizontal_Text.svg`, - cornershop = `https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Logo_de_Cornershop%201.svg`, +const rocketLeague = `https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Horizontal_Text.svg`, phoenixSuns = `https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Phoenix%20Suns.svg`, singlife = `https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Singlife%20Logo.svg`, sony = `https://storage.googleapis.com/assets.zesty.io/website/images/assets/demo/Sony%20Logo.svg`, @@ -369,14 +365,6 @@ export function Logos({ invert = false, alignLeft }) { height="32px" alt={generateAlt('Singlife')} /> - {generateAlt('Acorns')} {generateAlt('Wattpad')} - {generateAlt('Corner - {generateAlt('Bjs')} ); diff --git a/src/revamp/ui/HeroV2/index.js b/src/revamp/ui/HeroV2/index.js index 94e7b05fb..ba466aca5 100644 --- a/src/revamp/ui/HeroV2/index.js +++ b/src/revamp/ui/HeroV2/index.js @@ -9,8 +9,6 @@ import Logos from './Logos'; const media = 'https://kfg6bckb.media.zestyio.com/Zesty-io-2023-Homepage-Graphic.webp', - acorns = 'https://kfg6bckb.media.zestyio.com/acornsHero.svg', - bjs = 'https://kfg6bckb.media.zestyio.com/bjsHero.svg', phoenixSuns = 'https://kfg6bckb.media.zestyio.com/phoenixSunsHero.svg', rocketLeague = 'https://kfg6bckb.media.zestyio.com/rocketLeagueHero.svg', singlife = 'https://kfg6bckb.media.zestyio.com/singlifeHero.svg', @@ -38,20 +36,6 @@ const logos = [ title: 'Singlife', alt: generateAlt('Singlife'), }, - { - src: acorns, - width: 94, - height: 32, - title: 'Acorns', - alt: generateAlt('Acorns'), - }, - { - src: bjs, - width: 36.48, - height: 32, - title: 'Bjs', - alt: generateAlt('Bjs'), - }, { src: phoenixSuns, width: 31.59, diff --git a/src/views/zesty/Article.js b/src/views/zesty/Article.js index 40dcaf1e1..3c08d10c5 100644 --- a/src/views/zesty/Article.js +++ b/src/views/zesty/Article.js @@ -89,6 +89,26 @@ function Article({ content }) { // Define a regular expression pattern to match [_CTA_] let regexPattern = /\[CALL TO ACTION (\d+)\]/g; + useEffect(() => { + const removeSpansInHeadings = (html) => { + let tempDiv = document.createElement('div'); + tempDiv.innerHTML = html; + + let headings = tempDiv.querySelectorAll('h1, h2, h3, h4, h5, h6'); + + headings.forEach((heading) => { + let spans = heading.querySelectorAll('span'); + spans.forEach((span) => { + span.replaceWith(...span.childNodes); + }); + }); + + return tempDiv.innerHTML; + }; + + setNewContent(removeSpansInHeadings(newContent)); + }, [newContent]); + useEffect(() => { const validateWysiwyg = () => { if (newContent?.includes('Error hydrating')) { @@ -209,7 +229,10 @@ function Article({ content }) { ? `:is(span, p, h1, h2, h3, h4, h5, h6) :is(img) { width: auto; max-width: 100%; -}` + } + :h1 span, :h2 span { + color: black; + }` : ``; // Match CTA component sort order id from array to return its props diff --git a/src/views/zesty/Homepage/EnterpriseGrowth.js b/src/views/zesty/Homepage/EnterpriseGrowth.js index 59f20d63c..b35efe140 100644 --- a/src/views/zesty/Homepage/EnterpriseGrowth.js +++ b/src/views/zesty/Homepage/EnterpriseGrowth.js @@ -6,12 +6,12 @@ const Child = dynamic(() => import('revamp/ui/EnterpriseGrowth'), { loading: Placeholder, }); -const Index = () => { +const Index = (props) => { const { ref, inView } = useInView({ triggerOnce: true, threshold: 0, }); - return
{inView && }
; + return
{inView && }
; }; export default Index;