From 2a616de95c6eb65128762fbc8f622abb6dff86bf Mon Sep 17 00:00:00 2001 From: Charles Garrett Date: Tue, 5 Mar 2024 10:19:31 -0500 Subject: [PATCH 1/5] fix: only Required cookies were enabled for all users due to error in passing boolean values --- src/NearOrg/CookiePrompt.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NearOrg/CookiePrompt.jsx b/src/NearOrg/CookiePrompt.jsx index 4fdf159b..8fac71bb 100644 --- a/src/NearOrg/CookiePrompt.jsx +++ b/src/NearOrg/CookiePrompt.jsx @@ -65,7 +65,7 @@ if (state.cookieAcceptance) { const onAccept = ({ all, onlyRequired }) => { State.update({ cookieAcceptance: true }); State.update({ isDialogOpen: false }); - return ; + return ; }; const onCustomize = () => { From 1b4b5a0898d85814a2ba3b523cd722dc6a74d809 Mon Sep 17 00:00:00 2001 From: Dmitriy <34593263+shelegdmitriy@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:59:39 +0200 Subject: [PATCH 2/5] chore: add placeholders to events page (#686) Co-authored-by: Dmitriy Sheleg --- src/Events/Index.jsx | 129 ++++++++++++++++++++++++++----------------- 1 file changed, 77 insertions(+), 52 deletions(-) diff --git a/src/Events/Index.jsx b/src/Events/Index.jsx index 06b4f387..dea9faa7 100644 --- a/src/Events/Index.jsx +++ b/src/Events/Index.jsx @@ -204,9 +204,11 @@ const IconCircle = styled.div` } `; -const featuredEvent = [...eventsList].sort( - (a, b) => Math.abs(new Date(a.event.start_at) - new Date()) - Math.abs(new Date(b.event.start_at) - new Date()), -)[0].event; +const featuredEvent = + eventsList.length > 0 && + [...eventsList].sort( + (a, b) => Math.abs(new Date(a.event.start_at) - new Date()) - Math.abs(new Date(b.event.start_at) - new Date()), + )[0].event; return ( @@ -226,32 +228,34 @@ return ( -
- - - - Upcoming Event - - + {featuredEvent && ( +
+ + + + Upcoming Event + + - - -
+ +
+
+ )}
@@ -273,30 +277,51 @@ return ( )} - - {eventsList.map(({ event }) => { - const startAt = convertData(event?.start_at); - const endAt = convertData(event?.end_at); - const location = formatLocation(event.geo_address_json); - return ( - - ); - })} - + {eventsList.length > 0 ? ( + + {eventsList.map(({ event }) => { + const startAt = convertData(event?.start_at); + const endAt = convertData(event?.end_at); + const location = formatLocation(event.geo_address_json); + return ( + + ); + })} + + ) : ( + + + There are no upcoming events at the moment. + + + Subscribe to our Luma calendar to stay up to date with our events. + + + + )}
From c3b02950fc0219c467be8317b9681e9702c96698 Mon Sep 17 00:00:00 2001 From: Charles Garrett Date: Wed, 6 Mar 2024 09:16:52 -0500 Subject: [PATCH 3/5] chore: share details on a newly added 1st party cookie --- src/NearOrg/CookieDetails.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/NearOrg/CookieDetails.jsx b/src/NearOrg/CookieDetails.jsx index 871d9d5f..20f82141 100644 --- a/src/NearOrg/CookieDetails.jsx +++ b/src/NearOrg/CookieDetails.jsx @@ -5,6 +5,7 @@ const firstPartyCookies = `| Identifer | Purpose | | rl_session | product analytics | Rudderstack | .near.org | [Link](https://cookiedatabase.org/?lang=en&s=rl_session) | 1 year | Stores the session-related information including the ID. | | rl_page_init_referring_domain | product analytics | Rudderstack | .near.org | [Link](https://cookiedatabase.org/?lang=en&s=rl_page_init_referring_domain) | 1 year | to store referring website. | | rl_page_init_referrer | product analytics | Rudderstack | .near.org | [Link](https://cookiedatabase.org/?lang=en&s=rl_page_init_referrer) | 1 year | to store referring website. | +| user-country-code | product analytics | Discovery Domain | .near.org | n/a | 1 year | to store a visitor's country code | `; const thirdPartyCookies = `| Identifer | Purpose | Provider | Domain | Duration | From 93db2ae97f8559340407afbbbd32b755a617b2f0 Mon Sep 17 00:00:00 2001 From: Dmitriy <34593263+shelegdmitriy@users.noreply.github.com> Date: Wed, 6 Mar 2024 19:47:15 +0200 Subject: [PATCH 4/5] chore: style improvements of founders page (#689) --- src/NearOrg/FoundersPage.jsx | 97 +++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 36 deletions(-) diff --git a/src/NearOrg/FoundersPage.jsx b/src/NearOrg/FoundersPage.jsx index 14ca4095..26ef5f5d 100644 --- a/src/NearOrg/FoundersPage.jsx +++ b/src/NearOrg/FoundersPage.jsx @@ -119,7 +119,7 @@ const Pattern = styled.div` `; const PatternContent = styled.div` - padding: 1rem; + padding: 2rem 4rem; max-width: 496px; margin: 0 auto; background-color: var(--background-color); @@ -148,8 +148,19 @@ const IconCircle = styled.div` `; const TextLink = styled("Link")` - color: inherit; - text-decoration: underline; + font: var(--text-base); + font-weight: 600; + line-height: 150%; + color: var(--white); + background: transparent; + text-decoration: none; + padding: 16px 24px; + border-radius: 50px; + border: 1px solid var(--green10); + + &:hover { + text-decoration: none; + } `; const Resource = ({ name, description, icon, url, target }) => ( @@ -231,13 +242,19 @@ const ecosystemCommunityResources = [ }, ]; +function returnIpfsImage(cfid) { + return { + ipfs_cid: cfid, + }; +} + return (
- +

FounderHub

@@ -246,8 +263,8 @@ return (
- - + +

Welcome to NEAR, the best place to build Web3 projects

From idea to launch, the NEAR FounderHub guides you every step of the way. Get the tailored resources, @@ -260,17 +277,15 @@ return (

Self-Serve Resources

+ + Tap into our curated resources: proven templates, expert insights, and a vibrant founder network. +
{selfServeResources.map((item) => ( ))} - - - Tap into our curated resources: proven templates, expert insights, and a vibrant founder network. - -
@@ -278,42 +293,59 @@ return (

Ecosystem Community Resources

+ + Find your place within the ecosystem — your community is near. +
{ecosystemCommunityResources.map((item) => ( ))} - - - Find your place within the ecosystem: whether it's by joining our selective accelerator program, - getting involved with our builder groups or hanging out at a live event, your community is near. - -
-

Accelerate your Web3 journey

- - HZN3 applications are{" "} - - open. - - Over 50 projects have been accelerated through HZN, our equity-free accelerator and gone on to raise over - $10M in external capital. Get the equity-free education, mentorship, and a network to take your project to - the next level. - +

Accelerate your Web3 journey

+ + + + HZN3 applications are open + + + Over 50 projects have been accelerated through HZN, our equity-free accelerator and gone on to raise + over $10M in external capital. Get the equity-free education, mentorship, and a network to take your + project to the next level. + + + + Apply Now + + + + ), + image: returnIpfsImage("bafkreib55qq67nbthwpkzqx2upjnecwnrutpo3q26zjqt3wz3n5iw4o6da"), + imageSide: "left", + alt: "The HZN logo.", + }} + />
-
+
- Get in touch with us to provide any feedback or ask for specific support + Get in touch + + + Reach out to us to provide your feedback or to ask for specific support.
- - ); From a244b1b0fdd76ab6c458d243f769fd9a017495af Mon Sep 17 00:00:00 2001 From: Gabe Hamilton Date: Wed, 6 Mar 2024 18:23:31 -0700 Subject: [PATCH 5/5] fix: better validation for create or edit agents --- src/AI/Agent/AgentCreate.jsx | 17 +++++++++-------- src/AI/Agent/AgentHeader.jsx | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/AI/Agent/AgentCreate.jsx b/src/AI/Agent/AgentCreate.jsx index a31787b7..8c6276f5 100644 --- a/src/AI/Agent/AgentCreate.jsx +++ b/src/AI/Agent/AgentCreate.jsx @@ -1,9 +1,3 @@ -const { typeMatch } = VM.require("devhub.near/widget/core.lib.struct"); - -if (!typeMatch) { - return

Loading modules...

; -} - const { data, onSubmit, onCancel } = props; const onSubmitDefault = (formValues) => { const { name, ...rest } = formValues; @@ -77,7 +71,7 @@ const AgentInputsPartialSchema = { // }, component: { inputProps: { - min: 2, + min: 0, max: 255, placeholder: "The component used to run the agent, default is near/widget/AI.Agent.AgentChat", required: false, @@ -121,7 +115,14 @@ const AgentInputsPartialSchema = { }; const agentInputsValidator = (formValues) => - typeMatch(formValues) && Object.values(formValues).every((value) => typeof value === "string" && value.length > 0); + formValues !== null && + typeof formValues === "object" && + !Array.isArray(formValues) && + Object.keys(AgentInputsPartialSchema).every((key) => { + const val = AgentInputsPartialSchema[key]; + const required = val?.inputProps?.required; + return !required || typeof formValues[key] === "string"; + }); return (