diff --git a/src/components/NewUsersCTA.tsx b/src/components/NewUsersCTA.tsx index d444717..0618ce5 100644 --- a/src/components/NewUsersCTA.tsx +++ b/src/components/NewUsersCTA.tsx @@ -70,17 +70,14 @@ export const NewUsersCTA = ({ balance }) => { onClick={() => { if (window?.electronAPI?.openExternal) { window.electronAPI.openExternal( - 'https://link.qortal.dev/telegram-invite' + 'https://link.qortal.dev/support' ); } else { - window.open( - 'https://link.qortal.dev/telegram-invite', - '_blank' - ); + window.open('https://link.qortal.dev/support', '_blank'); } }} > - Telegram + Nextcloud MAX_SIZE_PUBLISH) { + throw new Error( + i18n.t('question:message.error.max_size_publish', { + size: 2, + postProcess: 'capitalizeFirstChar', + }) + ); + } + + if (file && file.size > MAX_SIZE_PUBLIC_NODE) { + const isPublicNode = await isRunningGateway(); + if (isPublicNode) { + throw new Error( + i18n.t('question:message.error.max_size_publish_public', { + size: 500, + postProcess: 'capitalizeFirstChar', + }) + ); + } + } + // Fill tags dynamically while maintaining backward compatibility for (let i = 0; i < 5; i++) { result[`tag${i + 1}`] = tags[i] || data[`tag${i + 1}`] || undefined; @@ -1542,6 +1567,36 @@ export const publishMultipleQDNResources = async ( }) ); } + const isPublicNode = await isRunningGateway(); + if (isPublicNode) { + const hasOversizedFilePublicNode = resources.some((resource) => { + const file = resource?.file; + return file instanceof File && file.size > MAX_SIZE_PUBLIC_NODE; + }); + + if (hasOversizedFilePublicNode) { + throw new Error( + i18n.t('question:message.error.max_size_publish_public', { + size: 500, + postProcess: 'capitalizeFirstChar', + }) + ); + } + } + + const hasOversizedFile = resources.some((resource) => { + const file = resource?.file; + return file instanceof File && file.size > MAX_SIZE_PUBLISH; + }); + + if (hasOversizedFile) { + throw new Error( + i18n.t('question:message.error.max_size_publish', { + size: 2, + postProcess: 'capitalizeFirstChar', + }) + ); + } const encrypt = data?.encrypt;