diff --git a/.gitignore b/.gitignore index 87ea7d89..8996fca1 100644 --- a/.gitignore +++ b/.gitignore @@ -159,11 +159,8 @@ yarn-debug.log* yarn-error.log* .vscode - -# YoYo AI version control directory -.yoyo/ - -# cursor .cursor +.playwright-mcp -.playwright-mcp \ No newline at end of file +# YoYo AI version control directory +.yoyo/ \ No newline at end of file diff --git a/src/components/challenge-modal/challenge-modal.module.css b/src/components/challenge-modal/challenge-modal.module.css index b761d5a6..682230c4 100644 --- a/src/components/challenge-modal/challenge-modal.module.css +++ b/src/components/challenge-modal/challenge-modal.module.css @@ -110,6 +110,8 @@ font-size: 14px; text-align: center; padding: 20px 0; + word-break: break-word; + overflow-wrap: break-word; } .iframeWrapper { diff --git a/src/components/challenge-modal/challenge-modal.tsx b/src/components/challenge-modal/challenge-modal.tsx index d10321ab..4b4f1c3b 100644 --- a/src/components/challenge-modal/challenge-modal.tsx +++ b/src/components/challenge-modal/challenge-modal.tsx @@ -101,6 +101,25 @@ const RegularChallengeContent = ({ challenge, closeModal }: RegularChallengeCont } }; + // Get URL for iframe challenge confirmation (hostname only for whitelisted sites, full URL otherwise) + const getChallengeUrl = () => { + try { + const iframeUrl = currentChallenge?.challenge; + if (!iframeUrl) return ''; + const url = new URL(iframeUrl); + + // Whitelist mintpass.org - only show hostname for trusted sites + if (url.hostname === 'mintpass.org') { + return url.hostname; + } + + // For other sites, show full URL for transparency + return url.href; + } catch { + return ''; + } + }; + const handleLoadIframe = () => { const iframeUrl = currentChallenge?.challenge; if (!iframeUrl) return; @@ -203,14 +222,16 @@ const RegularChallengeContent = ({ challenge, closeModal }: RegularChallengeCont <>
- {t('iframe_challenge_warning', { - defaultValue: 'This challenge requires loading an external website. Loading it will reveal your IP address to that website. Do you want to continue?', + {t('iframe_challenge_open_confirmation', { + subplebbit, + url: decodeURIComponent(getChallengeUrl()), + defaultValue: `p/${subplebbit} challenge wants to open ${decodeURIComponent(getChallengeUrl())}`, })}
- +
diff --git a/src/views/settings/plebbit-options/plebbit-options.tsx b/src/views/settings/plebbit-options/plebbit-options.tsx index dc8775ac..015f2398 100644 --- a/src/views/settings/plebbit-options/plebbit-options.tsx +++ b/src/views/settings/plebbit-options/plebbit-options.tsx @@ -46,8 +46,8 @@ const IPFSGatewaysSettings = ({ ipfsGatewayUrlsRef, mediaIpfsGatewayUrlRef }: Se const PubsubProvidersSettings = ({ pubsubProvidersRef }: SettingsProps) => { const account = useAccount(); const { plebbitOptions } = account || {}; - const { pubsubHttpClientsOptions } = plebbitOptions || {}; - const pubsubProvidersDefaultValue = pubsubHttpClientsOptions?.join('\n'); + const { pubsubKuboRpcClientsOptions } = plebbitOptions || {}; + const pubsubProvidersDefaultValue = pubsubKuboRpcClientsOptions?.join('\n'); return (
@@ -57,7 +57,7 @@ const PubsubProvidersSettings = ({ pubsubProvidersRef }: SettingsProps) => { autoCorrect='off' autoComplete='off' spellCheck='false' - rows={pubsubHttpClientsOptions?.length || 3} + rows={pubsubKuboRpcClientsOptions?.length || 3} />
); @@ -200,7 +200,7 @@ const PlebbitOptions = () => { const mediaIpfsGatewayUrl = mediaIpfsGatewayUrlRef.current?.value.trim() || undefined; - const pubsubHttpClientsOptions = pubsubProvidersRef.current?.value + const pubsubKuboRpcClientsOptions = pubsubProvidersRef.current?.value .split('\n') .map((url) => url.trim()) .filter((url) => url !== ''); @@ -242,7 +242,7 @@ const PlebbitOptions = () => { const newPlebbitOptions: any = {}; if (ipfsGatewayUrls?.length) newPlebbitOptions.ipfsGatewayUrls = ipfsGatewayUrls; - if (pubsubHttpClientsOptions?.length) newPlebbitOptions.pubsubHttpClientsOptions = pubsubHttpClientsOptions; + if (pubsubKuboRpcClientsOptions?.length) newPlebbitOptions.pubsubKuboRpcClientsOptions = pubsubKuboRpcClientsOptions; if (httpRoutersOptions?.length) newPlebbitOptions.httpRoutersOptions = httpRoutersOptions; if (plebbitRpcClientsOptions) newPlebbitOptions.plebbitRpcClientsOptions = plebbitRpcClientsOptions; if (dataPath) newPlebbitOptions.dataPath = dataPath; diff --git a/src/views/subplebbit-settings/subplebbit-settings.tsx b/src/views/subplebbit-settings/subplebbit-settings.tsx index 4558a34f..5cba568c 100644 --- a/src/views/subplebbit-settings/subplebbit-settings.tsx +++ b/src/views/subplebbit-settings/subplebbit-settings.tsx @@ -582,7 +582,7 @@ const SubplebbitSettings = () => { )} {isReadOnly && !userIsOwnerOrAdmin &&
{t('owner_settings_notice')}
} {isOffline &&
{offlineTitle}
} - {isChallengesReadOnly &&
cannot read or write anti-spam challenges, community node isn't reachable.
} + {isChallengesReadOnly &&
cannot read or write challenges, community node isn't reachable.
} <Description isReadOnly={isReadOnly} /> {!isInCreateSubplebbitView && <Address isReadOnly={isReadOnly} />}