From 34680d244f0320f7e8990aea19767f3595dcfa8c Mon Sep 17 00:00:00 2001 From: kiwihodl Date: Tue, 1 Apr 2025 16:44:02 -0500 Subject: [PATCH 01/22] feat: add backdrop blur to all main application modals - Add global CSS styles for PrimeReact Dialog component backdrop - Apply 8px blur effect with semi-transparent black background - Style dialog components with dark theme matching application design - Affects all main modals including: - User badges and profile modals - Subscription and payment modals - Course and resource modals - Info and form modals --- src/styles/globals.css | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/styles/globals.css b/src/styles/globals.css index 9a45c40..30d3ed8 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -148,4 +148,32 @@ code { /* hide attribution */ div.react-flow__attribution { display: none !important; +} + +/* Dialog backdrop styles */ +.p-dialog-mask { + backdrop-filter: blur(8px); + background-color: rgba(0, 0, 0, 0.5); +} + +.p-dialog { + background: #1e1e1e; + border: 1px solid #333; + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); +} + +.p-dialog-header { + background: #1e1e1e; + border-bottom: 1px solid #333; + color: #fff; +} + +.p-dialog-content { + background: #1e1e1e; + color: #fff; +} + +.p-dialog-footer { + background: #1e1e1e; + border-top: 1px solid #333; } \ No newline at end of file From 62441e01a00eb0fe351fc6af6f5f3b6dca3fb5c3 Mon Sep 17 00:00:00 2001 From: kiwihodl Date: Wed, 2 Apr 2025 12:16:11 -0500 Subject: [PATCH 02/22] feat: Implement ZapThreads with access control for paid content - Add to CourseDetails, CourseTemplate, CourseLesson - Block comments for unpaid users - Allow comments for free content and authorized paid users --- src/components/ZapThreadsWrapper.js | 82 +++++++-- .../carousels/templates/CourseTemplate.js | 46 ++++- .../content/courses/CourseDetails.js | 51 +++++- .../content/courses/CourseLesson.js | 171 +++++++++++++----- 4 files changed, 277 insertions(+), 73 deletions(-) diff --git a/src/components/ZapThreadsWrapper.js b/src/components/ZapThreadsWrapper.js index 31d6261..4e4f1ad 100644 --- a/src/components/ZapThreadsWrapper.js +++ b/src/components/ZapThreadsWrapper.js @@ -1,58 +1,100 @@ -import React, { useEffect, useRef } from 'react'; +import React, { useEffect, useRef } from "react"; -const ZapThreadsWrapper = ({ anchor, user, relays, disable, className }) => { +const ZapThreadsWrapper = ({ + anchor, + user, + relays, + disable, + className, + isAuthorized, +}) => { // Create a ref to store the reference to the
element const zapRef = useRef(null); useEffect(() => { + // Only load the script if the user is authorized + if (!isAuthorized) { + return; + } + // Create a new