TagSpaces is an offline, open source, document manager with tagging support
chore: improving the pro teasing functionality
Ilian Sapundshieva2ce61492d3b
diff --git a/src/renderer/components/ProTeaser.tsx b/src/renderer/components/ProTeaser.tsxindex 5c6d9df75..505d77da3 100644--- a/src/renderer/components/ProTeaser.tsx+++ b/src/renderer/components/ProTeaser.tsx@@ -28,7 +28,6 @@ import AccountTreeTwoToneIcon from '@mui/icons-material/AccountTreeTwoTone';import AutoAwesomeTwoToneIcon from '@mui/icons-material/AutoAwesomeTwoTone';import CalendarMonthTwoToneIcon from '@mui/icons-material/CalendarMonthTwoTone';import CameraTwoToneIcon from '@mui/icons-material/CameraTwoTone';-import DescriptionTwoToneIcon from '@mui/icons-material/DescriptionTwoTone';import FolderTwoToneIcon from '@mui/icons-material/FolderTwoTone';import HistoryTwoToneIcon from '@mui/icons-material/HistoryTwoTone';import MapTwoToneIcon from '@mui/icons-material/MapTwoTone';@@ -101,17 +100,10 @@ const proAds: ProAd[] = [headlineKey: 'peri:proTeaserAiHeadline',subtextKey: 'peri:proTeaserAiSubtext',},- {- slideId: 'annotation',- Icon: DescriptionTwoToneIcon,- color: '#0288d1',- headlineKey: 'peri:proTeaserAnnotationHeadline',- subtextKey: 'peri:proTeaserAnnotationSubtext',- },{slideId: 'revisions',Icon: HistoryTwoToneIcon,- color: '#795548',+ color: '#0288d1',headlineKey: 'peri:proTeaserRevisionsHeadline',subtextKey: 'peri:proTeaserRevisionsSubtext',},diff --git a/src/renderer/components/dialogs/BuyProDialog.tsx b/src/renderer/components/dialogs/BuyProDialog.tsxindex 00368d041..c09b08e00 100644--- a/src/renderer/components/dialogs/BuyProDialog.tsx+++ b/src/renderer/components/dialogs/BuyProDialog.tsx@@ -33,6 +33,11 @@ import {restoreProPurchase,} from '-/services/iap';import { openURLExternally } from '-/services/utils-io';+import AutoAwesomeTwoToneIcon from '@mui/icons-material/AutoAwesomeTwoTone';+import FolderTwoToneIcon from '@mui/icons-material/FolderTwoTone';+import HistoryTwoToneIcon from '@mui/icons-material/HistoryTwoTone';+import ViewKanbanTwoToneIcon from '@mui/icons-material/ViewKanbanTwoTone';+import WorkspacePremiumRoundedIcon from '@mui/icons-material/WorkspacePremiumRounded';import {Alert,Box,@@ -44,10 +49,10 @@ import {Stack,Typography,} from '@mui/material';-import { useTheme } from '@mui/material/styles';+import { alpha, useTheme } from '@mui/material/styles';import useMediaQuery from '@mui/material/useMediaQuery';import Links from 'assets/links';-import React, { useEffect, useState } from 'react';+import { useEffect, useState } from 'react';import { useTranslation } from 'react-i18next';interface Props {@@ -145,44 +150,95 @@ function BuyProDialog(props: Props) {product?.price ||(loadingProduct ? t('core:loading') : t('core:priceUnavailable'));+ const buyDisabled =+ purchaseInFlight || restoreInFlight || loadingProduct || !product;++ const proFeatures = [+ { Icon: ViewKanbanTwoToneIcon, label: t('core:buyProFeaturePerspectives') },+ { Icon: AutoAwesomeTwoToneIcon, label: t('core:buyProFeatureAI') },+ { Icon: HistoryTwoToneIcon, label: t('core:buyProFeatureRevisions') },+ { Icon: FolderTwoToneIcon, label: t('core:buyProFeatureFolderColor') },+ ];+return (<Dialogopen={open}onClose={purchaseInFlight ? undefined : onClose}fullScreen={smallScreen}+ fullWidth+ maxWidth="xs"keepMountedscroll="paper"aria-labelledby="buy-pro-dialog-title"><TsDialogTitle- dialogTitle={t('core:tagSpacesPro')}+ dialogTitle={''}closeButtonTestId="closeBuyProDialogTID"onClose={purchaseInFlight ? undefined : onClose}/>- <DialogContent>- <Stack spacing={2} sx={{ paddingTop: 1 }}>- <Typography variant="body1">{t('core:buyProSubtitle')}</Typography>-+ <DialogContent sx={{ paddingTop: 0 }}>+ <Stack spacing={2.5}>+ {/* Hero header with Pro branding */}<Boxsx={{- borderRadius: AppConfig.defaultCSSRadius + 'px',- border: '1px solid',- borderColor: 'divider',- padding: 2,+ background: `linear-gradient(135deg, ${theme.palette.primary.main} 0%, ${theme.palette.primary.dark} 100%)`,+ color: theme.palette.primary.contrastText,+ borderRadius: AppConfig.defaultCSSRadius,+ padding: 3,+ textAlign: 'center',}}>- <Typography variant="body2">- {t('core:buyProFeaturesList')}+ <Box+ sx={{+ width: 64,+ height: 64,+ borderRadius: '50%',+ backgroundColor: 'rgba(255, 255, 255, 0.18)',+ display: 'flex',+ alignItems: 'center',+ justifyContent: 'center',+ margin: '0 auto 12px',+ }}+ >+ <WorkspacePremiumRoundedIcon sx={{ fontSize: 38 }} />+ </Box>+ <Typography variant="h5" sx={{ fontWeight: 700 }}>+ {t('core:tagSpacesPro')}+ </Typography>+ <Typography variant="body2" sx={{ opacity: 0.9, marginTop: 0.5 }}>+ {t('core:buyProSubtitle')}</Typography></Box>+ {/* Feature checklist */}+ <Stack spacing={1.5} sx={{ paddingX: 0.5 }}>+ {proFeatures.map((feature, index) => (+ <Box+ key={index}+ sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}+ >+ <feature.Icon+ sx={{ color: 'primary.main', fontSize: 26, flexShrink: 0 }}+ />+ <Typography variant="body2">{feature.label}</Typography>+ </Box>+ ))}+ </Stack>++ {/* Price emphasis */}<Boxsx={{textAlign: 'center',- paddingTop: 1,+ padding: 2,+ borderRadius: AppConfig.defaultCSSRadius,+ backgroundColor: alpha(theme.palette.primary.main, 0.08),}}>- <Typography variant="h4" data-tid="buyProPriceTID">+ <Typography+ variant="h4"+ data-tid="buyProPriceTID"+ sx={{ fontWeight: 700 }}+ >{priceLine}</Typography><Typography variant="caption" color="text.secondary">@@ -219,8 +275,6 @@ function BuyProDialog(props: Props) {paddingRight: 'max(16px, env(safe-area-inset-right))',paddingTop: 1,paddingBottom: 'max(16px, env(safe-area-inset-bottom))',- borderTop: '1px solid',- borderColor: 'divider',gap: 1,flexDirection: 'column',alignItems: 'stretch',@@ -230,13 +284,20 @@ function BuyProDialog(props: Props) {data-tid="buyProConfirmTID"variant="contained"onClick={onBuyClick}- disabled={- purchaseInFlight || restoreInFlight || loadingProduct || !product- }- sx={{ minHeight: 48 }}+ disabled={buyDisabled}+ sx={{+ minHeight: 52,+ fontWeight: 600,+ fontSize: '15px',+ ...(buyDisabled+ ? {}+ : {+ background: `linear-gradient(135deg, ${theme.palette.primary.main} 0%, ${theme.palette.primary.dark} 100%)`,+ }),+ }}>{purchaseInFlight ? (- <CircularProgress size={20} />+ <CircularProgress size={20} color="inherit" />) : (t('core:buyProAction', { price: product?.price ?? '' }))}diff --git a/src/renderer/components/dialogs/ProTeaserDialog.tsx b/src/renderer/components/dialogs/ProTeaserDialog.tsxindex 3aa14575d..216380ccd 100644--- a/src/renderer/components/dialogs/ProTeaserDialog.tsx+++ b/src/renderer/components/dialogs/ProTeaserDialog.tsx@@ -154,12 +154,13 @@ function Slide(props: SlideProps) {<br /><Box sx={{ whiteSpace: 'nowrap' }}><ButtonGroup>- <TsButton variant="contained" onClick={onUpgradeClick}>- {t('core:compareAndUpgrade')}+ <TsButton onClick={onUpgradeClick}>+ {AppConfig.isCapacitor+ ? t('core:upgrade')+ : t('core:compareAndUpgrade')}</TsButton>{ctaTitle && (<TsButton- variant="contained"onClick={onCtaClick}sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}>diff --git a/src/renderer/content/ProTeaserSlides.tsx b/src/renderer/content/ProTeaserSlides.tsxindex 42f412970..502fcd9c1 100644--- a/src/renderer/content/ProTeaserSlides.tsx+++ b/src/renderer/content/ProTeaserSlides.tsx@@ -19,7 +19,6 @@import AiToolsImage from '-/assets/images/ai-tools.jpg';import CalendarImage from '-/assets/images/calendar-perspective.avif';import CustomFolderColor from '-/assets/images/custom-folder-color.jpg';-import EntryDescription from '-/assets/images/entry-description.jpg';import FolderVizImage from '-/assets/images/folderviz-perspective.jpg';import GalleryImage from '-/assets/images/gallery-perspective.jpg';import KanbanImage from '-/assets/images/kanban-perspective.jpg';@@ -148,22 +147,6 @@ export function getProTeaserSlides(t) {pictureHeight: 300,};slidesEN[slidesNames[7]] = {- title: t('peri:ptsAnnotateLinkTitle'),- description: t('peri:ptsAnnotateLink'),- items: [- <>{t('peri:ptsAnnotateLinkSection1')}</>,- <>{t('peri:ptsAnnotateLinkSection2')}</>,- <>{t('peri:ptsAnnotateLinkSection3')}</>,- <>{t('peri:ptsAnnotateLinkSection4')}</>,- <>{t('peri:ptsAnnotateLinkSection5')}</>,- ],- ctaURL: Links.links.productProFileFolderMeta,- ctaTitle: t('showMeMore'),- pictureURL: EntryDescription,- pictureShadow: true,- pictureHeight: 300,- };- slidesEN[slidesNames[8]] = {title: t('peri:ptsRevisionsTitle'),description: (<>@@ -177,7 +160,7 @@ export function getProTeaserSlides(t) {pictureShadow: true,pictureHeight: 400,};- slidesEN[slidesNames[9]] = {+ slidesEN[slidesNames[8]] = {title: t('peri:ptsCustomBackgroundTitle'),description: t('peri:ptsCustomBackground'),ctaURL: Links.links.productProFolderColor,@@ -186,7 +169,7 @@ export function getProTeaserSlides(t) {pictureShadow: true,pictureHeight: 300,};- slidesEN[slidesNames[10]] = {+ slidesEN[slidesNames[9]] = {title: 'TagSpaces Pro Web',description: t('peri:ptsProWeb'),items: [diff --git a/src/renderer/hooks/IOActionsContextProvider.tsx b/src/renderer/hooks/IOActionsContextProvider.tsxindex 91fe17993..c844e6055 100644--- a/src/renderer/hooks/IOActionsContextProvider.tsx+++ b/src/renderer/hooks/IOActionsContextProvider.tsx@@ -577,10 +577,14 @@ export const IOActionsContextProvider = ({}function deleteFile(filePath: string, uuid: string) {+ const fileName = extractFileName(+ filePath,+ currentLocation?.getDirSeparator(),+ );return deleteEntriesPromise(currentLocation.toFsEntry(filePath, true)).then(() => {showNotification(- `Deleting file ${filePath} successful.`,+ `Deleting file ${fileName} successful.`,'default',true,);@@ -589,7 +593,7 @@ export const IOActionsContextProvider = ({.catch((error) => {console.log('Error while deleting file: ' + error);showNotification(- `Error while deleting file ${filePath}`,+ `Error while deleting file ${fileName}`,'error',true,);diff --git a/src/renderer/locales/en/core.json b/src/renderer/locales/en/core.jsonindex 79add88fc..4511e4458 100644--- a/src/renderer/locales/en/core.json+++ b/src/renderer/locales/en/core.json@@ -1152,6 +1152,10 @@"tagSpacesPro": "TagSpaces Pro","buyProSubtitle": "Unlock TagSpaces Pro on this device — one-time purchase, yours forever.","buyProFeaturesList": "Includes Kanban, Calendar, Mapique and FolderViz perspectives, annotations, AI chat, and more.",+ "buyProFeaturePerspectives": "All Pro perspectives — Kanban, Calendar, Mapique, FolderViz & Gallery",+ "buyProFeatureAI": "AI chat & smart assistance",+ "buyProFeatureRevisions": "File revisions & autosave",+ "buyProFeatureFolderColor": "Custom folder colors & backgrounds","buyProAction": "Buy TagSpaces Pro for {{price}}","restorePurchases": "Restore Purchases","redeemCode": "Redeem code",diff --git a/src/renderer/locales/en/peri.json b/src/renderer/locales/en/peri.jsonindex 453daf22f..fbf6d19c4 100644--- a/src/renderer/locales/en/peri.json+++ b/src/renderer/locales/en/peri.json@@ -78,13 +78,6 @@"ptsAISection3": "Smart tag extraction – from text, documents, and images.","ptsAISection4": "Batch processing – apply these features across multiple files at once.","ptsAINote": "Note: TagSpaces itself does not include built-in AI. It integrates with external local LLM models for all AI functionality.",- "ptsAnnotateLinkTitle": "Annotate and Link Your Files and Folders",- "ptsAnnotateLink": "With Pro, you can enrich any file or folder with detailed descriptions, annotations, and links.",- "ptsAnnotateLinkSection1": "Use Markdown for flexible, styled notes.",- "ptsAnnotateLinkSection2": "Apply simple text formatting like bold and italic.",- "ptsAnnotateLinkSection3": "Create to-do lists or numbered lists for tasks.",- "ptsAnnotateLinkSection4": "Add links to documents, folders, locations, or web pages.",- "ptsAnnotateLinkSection5": "Customize thumbnails for files and folders to visually highlight key content.","ptsRevisionsTitle": "File Revisions and Auto-Save","ptsRevisionsTitleSection1": "Never lose track of changes again. TagSpaces Pro can automatically create file revisions—storing full copies of edited files (TXT, MD, HTML) so you can trace your work over time.","ptsRevisionsTitleSection2": "Enable auto-save per file to ensure every change is saved instantly, keeping your progress safe at all times.",