Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: extending the PRO teaser, starting it from the folder container, introducing content folder (#1803)

Stanimira48483be03fb
diff --git a/app/assets/images/mapique-perspective.jpg b/app/assets/images/mapique-perspective.jpg
index 30b1c5bb3..329e7ddef 100644
Binary files a/app/assets/images/mapique-perspective.jpg and b/app/assets/images/mapique-perspective.jpg differ
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsx
index fa0055b93..431ef295f 100644
--- a/app/components/FolderContainer.tsx
+++ b/app/components/FolderContainer.tsx
@@ -64,7 +64,7 @@ import {
actions as LocationIndexActions,
getSearchQuery
} from '-/reducers/location-index';
-import Links from '-/links';
+import Links from '-/content/links';
import { PerspectiveIDs, AvailablePerspectives } from '-/perspectives';
import MainSearchField from '-/components/MainSearchField';
import LoadingAnimation from '-/components/LoadingAnimation';
@@ -198,6 +198,7 @@ interface Props {
isDesktopMode: boolean;
showNotification: (content: string) => void;
toggleDrawer?: () => void;
+ toggleProTeaser: (slidePage?: string) => void;
drawerOpened: boolean;
setCurrentDirectoryPerspective: (perspective: string) => void;
maxSearchResults: number;
@@ -312,6 +313,7 @@ function FolderContainer(props: Props) {
directoryContent,
classes,
toggleDrawer,
+ toggleProTeaser,
drawerOpened,
isDesktopMode,
theme,
@@ -465,29 +467,32 @@ function FolderContainer(props: Props) {
) {
props.setCurrentDirectoryPerspective(perspectiveId);
} else if (perspectiveId === PerspectiveIDs.GALLERY) {
- const openPersDocs = window.confirm(i18n.t('perspectiveInPro'));
- if (openPersDocs) {
- props.openURLExternally(
- Links.documentationLinks.galleryPerspective,
- true
- );
- }
+ toggleProTeaser(PerspectiveIDs.GALLERY);
+ // const openPersDocs = window.confirm(i18n.t('perspectiveInPro'));
+ // if (openPersDocs) {
+ // props.openURLExternally(
+ // Links.documentationLinks.galleryPerspective,
+ // true
+ // );
+ // }
} else if (perspectiveId === PerspectiveIDs.MAPIQUE) {
- const openPersDocs = window.confirm(i18n.t('perspectiveInPro'));
- if (openPersDocs) {
- props.openURLExternally(
- Links.documentationLinks.mapiquePerspective,
- true
- );
- }
+ toggleProTeaser(PerspectiveIDs.MAPIQUE);
+ // const openPersDocs = window.confirm(i18n.t('perspectiveInPro'));
+ // if (openPersDocs) {
+ // props.openURLExternally(
+ // Links.documentationLinks.mapiquePerspective,
+ // true
+ // );
+ // }
} else if (perspectiveId === PerspectiveIDs.KANBAN) {
- const openPersDocs = window.confirm(i18n.t('perspectiveInPro'));
- if (openPersDocs) {
- props.openURLExternally(
- Links.documentationLinks.kanbanPerspective,
- true
- );
- }
+ toggleProTeaser(PerspectiveIDs.KANBAN);
+ // const openPersDocs = window.confirm(i18n.t('perspectiveInPro'));
+ // if (openPersDocs) {
+ // props.openURLExternally(
+ // Links.documentationLinks.kanbanPerspective,
+ // true
+ // );
+ // }
}
};
diff --git a/app/components/HelpFeedbackPanel.tsx b/app/components/HelpFeedbackPanel.tsx
index 568684cc9..32eb24f64 100644
--- a/app/components/HelpFeedbackPanel.tsx
+++ b/app/components/HelpFeedbackPanel.tsx
@@ -39,7 +39,7 @@ import AppConfig from '@tagspaces/tagspaces-platforms/AppConfig';
import styles from '-/components/SidePanels.css';
import i18n from '-/services/i18n';
import { KeyShortcutsIcon, HelpIcon } from '-/components/CommonIcons';
-import Links from '-/links';
+import Links from '-/content/links';
import { connect } from 'react-redux';
import { getCurrentLanguage } from '-/reducers/settings';
import { Pro } from '-/pro';
@@ -51,7 +51,7 @@ interface Props {
toggleAboutDialog?: () => void;
toggleKeysDialog: () => void;
toggleOnboardingDialog: () => void;
- toggleProTeaser: () => void;
+ toggleProTeaser: (slidePage?: string) => void;
style?: any;
reduceHeightBy?: number;
}
@@ -233,7 +233,7 @@ function HelpFeedbackPanel(props: Props) {
</Typography>
</ListItem>
<Divider />
- <ListItem button onClick={toggleProTeaser}>
+ <ListItem button onClick={() => toggleProTeaser()}>
<ListItemIcon>
<ProTeaserIcon />
</ListItemIcon>
diff --git a/app/components/HowToStart.tsx b/app/components/HowToStart.tsx
index 3f4a7e974..0ecc3e4ad 100644
--- a/app/components/HowToStart.tsx
+++ b/app/components/HowToStart.tsx
@@ -9,7 +9,7 @@ import StepContent from '@mui/material/StepContent';
import Paper from '@mui/material/Paper';
import Typography from '@mui/material/Typography';
import i18n from '-/services/i18n';
-import Links from '-/links';
+import Links from '-/content/links';
import { ProSign } from '-/components/HelperComponents';
export const styles: any = (theme: any) => ({
diff --git a/app/components/MobileNavigation.tsx b/app/components/MobileNavigation.tsx
index 5c08d22e5..8d2030ca0 100644
--- a/app/components/MobileNavigation.tsx
+++ b/app/components/MobileNavigation.tsx
@@ -53,16 +53,13 @@ import {
isReadOnlyMode,
getDirectoryPath
} from '../reducers/app';
-import LoadingLazy from '-/components/LoadingLazy';
import {
actions as SettingsActions,
getCurrentLanguage
} from '-/reducers/settings';
-import Links from '-/links';
import StoredSearches from '-/components/StoredSearches';
import UserDetailsPopover from '-/components/UserDetailsPopover';
import { CreateFileIcon, LocalLocationIcon } from '-/components/CommonIcons';
-import { getUuid } from '-/services/utils-io';
const styles: any = (theme: any) => ({
selectedButton: {
@@ -70,19 +67,9 @@ const styles: any = (theme: any) => ({
}
});
-const ProTeaserDialog = React.lazy(() =>
- import(/* webpackChunkName: "ProTeaserDialog" */ './dialogs/ProTeaserDialog')
-);
-function ProTeaserDialogAsync(props) {
- return (
- <React.Suspense fallback={<LoadingLazy />}>
- <ProTeaserDialog {...props} />
- </React.Suspense>
- );
-}
-
interface Props {
classes: any;
+ toggleProTeaser: (slidePage?: string) => void;
toggleOnboardingDialog: () => void;
toggleCreateFileDialog: () => void;
toggleAboutDialog: () => void;
@@ -111,14 +98,9 @@ interface Props {
}
function MobileNavigation(props: Props) {
- const [isProTeaserVisible, setIsProTeaserVisible] = useState<boolean>(false);
const [showTeaserBanner, setShowTeaserBanner] = useState<boolean>(true);
const [anchorUser, setAnchorUser] = useState<HTMLButtonElement | null>(null);
- const toggleProTeaser = () => {
- setIsProTeaserVisible(!isProTeaserVisible);
- };
-
const showProTeaser = !Pro && showTeaserBanner;
const {
@@ -217,7 +199,7 @@ function MobileNavigation(props: Props) {
toggleAboutDialog={toggleAboutDialog}
toggleKeysDialog={toggleKeysDialog}
toggleOnboardingDialog={toggleOnboardingDialog}
- toggleProTeaser={toggleProTeaser}
+ toggleProTeaser={() => props.toggleProTeaser()}
/>
)}
</Box>
@@ -228,7 +210,7 @@ function MobileNavigation(props: Props) {
>
{showProTeaser && (
<ProTeaser
- toggleProTeaser={toggleProTeaser}
+ toggleProTeaser={props.toggleProTeaser}
setShowTeaserBanner={setShowTeaserBanner}
openURLExternally={openURLExternally}
/>
@@ -346,14 +328,6 @@ function MobileNavigation(props: Props) {
</IconButton>
</Tooltip>
)}
- {isProTeaserVisible && (
- <ProTeaserDialogAsync
- open={isProTeaserVisible}
- onClose={toggleProTeaser}
- openURLExternally={openURLExternally}
- key={getUuid()} // TODO rethink to remove this
- />
- )}
</Box>
</Box>
);
@@ -379,6 +353,7 @@ function mapActionCreatorsToProps(dispatch) {
toggleCreateFileDialog: AppActions.toggleCreateFileDialog,
toggleOnboardingDialog: AppActions.toggleOnboardingDialog,
toggleSettingsDialog: AppActions.toggleSettingsDialog,
+ toggleProTeaser: AppActions.toggleProTeaser,
toggleAboutDialog: AppActions.toggleAboutDialog,
toggleKeysDialog: AppActions.toggleKeysDialog,
openLocationManagerPanel: AppActions.openLocationManagerPanel,
diff --git a/app/components/ProTeaser.tsx b/app/components/ProTeaser.tsx
index 0988f3031..c967d75f8 100644
--- a/app/components/ProTeaser.tsx
+++ b/app/components/ProTeaser.tsx
@@ -27,10 +27,10 @@ import CloseIcon from '@mui/icons-material/Close';
import ProTeaserImage from '-/assets/images/pro-teaser.svg';
import ProTextLogo from '-/assets/images/text-logo-pro.svg';
import i18n from '../services/i18n';
-import Links from '-/links';
+import Links from '-/content/links';
interface Props {
- toggleProTeaser: () => void;
+ toggleProTeaser: (slidePage?: string) => void;
setShowTeaserBanner: (teaserVisibility: boolean) => void;
openURLExternally: (url: string, skipConfirmation?: boolean) => void;
}
@@ -40,7 +40,7 @@ function ProTeaser(props: Props) {
return (
<>
<CardContent
- onClick={toggleProTeaser}
+ onClick={() => toggleProTeaser()}
style={{
padding: 5,
paddingBottom: 0,
diff --git a/app/components/SearchPopover.tsx b/app/components/SearchPopover.tsx
index 3ebc96524..92cb2644a 100644
--- a/app/components/SearchPopover.tsx
+++ b/app/components/SearchPopover.tsx
@@ -76,7 +76,7 @@ import { parseGeoLocation, parseLatLon } from '-/utils/geo';
import { getSearches } from '-/reducers/searches';
import { TS } from '-/tagspaces.namespace';
import { ProLabel, BetaLabel, ProTooltip } from '-/components/HelperComponents';
-import Links from '-/links';
+import Links from '-/content/links';
const SaveSearchDialog = Pro && Pro.UI ? Pro.UI.SaveSearchDialog : false;
diff --git a/app/components/WelcomePanel.tsx b/app/components/WelcomePanel.tsx
index 74b729c85..793567cd9 100644
--- a/app/components/WelcomePanel.tsx
+++ b/app/components/WelcomePanel.tsx
@@ -51,7 +51,7 @@ import {
getDesktopMode,
actions as SettingsActions
} from '-/reducers/settings';
-import Links from '-/links';
+import Links from '-/content/links';
import { Pro } from '-/pro';
import { TS } from '-/tagspaces.namespace';
import { renderHistory } from '-/components/RenderHistory';
diff --git a/app/components/dialogs/AboutDialog.tsx b/app/components/dialogs/AboutDialog.tsx
index 2cd0afb2b..53e358fc1 100644
--- a/app/components/dialogs/AboutDialog.tsx
+++ b/app/components/dialogs/AboutDialog.tsx
@@ -31,7 +31,7 @@ import versionMeta from '-/version.json';
import { Pro } from '-/pro';
import { getLastVersionPromise } from '-/reducers/settings';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
-import Links from '-/links';
+import Links from '-/content/links';
import useMediaQuery from '@mui/material/useMediaQuery';
import useTheme from '@mui/styles/useTheme';
diff --git a/app/components/dialogs/OnboardingDialog.tsx b/app/components/dialogs/OnboardingDialog.tsx
index 0ba63228b..27cea26fe 100644
--- a/app/components/dialogs/OnboardingDialog.tsx
+++ b/app/components/dialogs/OnboardingDialog.tsx
@@ -47,7 +47,7 @@ import {
} from '-/reducers/settings';
import { actions as AppActions } from '-/reducers/app';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
-import Links from '-/links';
+import Links from '-/content/links';
import useTheme from '@mui/styles/useTheme';
import useMediaQuery from '@mui/material/useMediaQuery';
diff --git a/app/components/dialogs/ProTeaserDialog.tsx b/app/components/dialogs/ProTeaserDialog.tsx
index fd57ddc90..4bde541c9 100644
--- a/app/components/dialogs/ProTeaserDialog.tsx
+++ b/app/components/dialogs/ProTeaserDialog.tsx
@@ -26,24 +26,18 @@ import Typography from '@mui/material/Typography';
import MobileStepper from '@mui/material/MobileStepper';
import Dialog from '@mui/material/Dialog';
import AppConfig from '@tagspaces/tagspaces-platforms/AppConfig';
-import ProTeaserImage from '-/assets/images/pro-teaser.svg';
-import ThumbsImage from '-/assets/images/thumbnails-undraw.svg';
-import CloudImage from '-/assets/images/aws-s3-in-tagspaces.png';
-import SearchImage from '-/assets/images/search-undraw.svg';
-import MapImage from '-/assets/images/mapique-perspective.jpg';
-import GalleryImage from '-/assets/images/gallery-perspective.jpg';
-import KanbanImage from '-/assets/images/kanban-perspective.jpg';
-import CustomFolderColor from '-/assets/images/custom-folder-color.jpg';
-import EntryDescription from '-/assets/images/entry-description.jpg';
-import EnterpriseImage from '-/assets/images/world-undraw.svg';
import i18n from '-/services/i18n';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
-import Links from '-/links';
import useTheme from '@mui/styles/useTheme';
import useMediaQuery from '@mui/material/useMediaQuery';
+import { getProTeaserIndex } from '-/reducers/app';
+import { connect } from 'react-redux';
+import { getProTeaserSlides } from '-/content/ProTeaserSlides';
+import Links from '-/content/links';
interface Props {
open: boolean;
+ slideIndex: number;
openURLExternally: (url: string, skipConfirmation: boolean) => void;
onClose: () => void;
}
@@ -62,225 +56,7 @@ interface SlideProps {
pictureHeight?: number;
}
-const slidesEN = [];
-slidesEN['general'] = {
- title: 'Why TagSpaces Pro ?',
- description: (
- <>
- The TagSpaces project is entirely <b>subscriber-supported</b>. We do not
- make money through advertising or any form of data sharing, so buying a
- Pro subscription will support the further development of our core product
- TagSpaces Lite and our browser extensions, which are all freely available.
- <br />
- <br />
- On top of that you will get <b>a lot of useful features</b>, extended
- search functionalities, alternative perspectives for your files, geo
- tagging functionality. Some of these features are briefly presented on the
- next slides.
- </>
- ),
- ctaURL: Links.links.productsOverview,
- ctaTitle: 'Compare TagSpaces Lite vs. Pro',
- pictureURL: ProTeaserImage,
- pictureHeight: 150
-};
-slidesEN['kanban'] = {
- title: 'Kanban Perspectives',
- description: (
- <>
- This perspective can turn every folder into a Kanban board, where columns
- represents the sub folders of the current folder. Every file from the sub
- folders is shown as a tile and can be moved with drag and drop between the
- columns. The columns itself can be moved with drag and drop too. There is
- a built-in <b>Trello import</b>, where a Trello JSON export can be
- imported in the current folder.
- </>
- ),
- ctaURL: Links.documentationLinks.kanbanPerspective,
- ctaTitle: i18n.t('showMeMore'),
- pictureURL: KanbanImage,
- pictureShadow: true,
- pictureHeight: 300
-};
-slidesEN['gallery'] = {
- title: 'Gallery Perspectives',
- description: (
- <>
- This perspective is optimized for displaying folders with photos and other
- images. It has an integrated <b>presentation mode</b>, so by just clicking
- the play button, the images start to change automatically one after
- another. With the expand button you can start the presentation in{' '}
- <b>full screen</b>, so you can enjoy your photos in a distraction-free
- way.
- </>
- ),
- ctaURL: Links.documentationLinks.galleryPerspective,
- ctaTitle: i18n.t('showMeMore'),
- pictureURL: GalleryImage,
- pictureShadow: true,
- pictureHeight: 300
-};
-slidesEN['mapique'] = {
- title: 'Digital Map & Geo tagging',
- description: (
- <>
- The Mapique perspective displays files and folders tagged with geo-tags on
- a digital map. The perspective integrates an ability to{' '}
- <b>extract geo coordinates</b> from EXIF/IPTC data embedded in JPEG files.
- By default TagSpaces uses OpenStreetMap for the map, but other compatible
- map tile servers can be used instead.
- <br />
- In the PRO version, you can add tags containing geolocation data to any
- file or folder. This can be useful for example for planing and documenting
- trips or just to <b>privately annotate maps</b>.
- </>
- ),
- ctaURL: Links.documentationLinks.mapiquePerspective,
- ctaTitle: i18n.t('showMeMore'),
- pictureURL: MapImage,
- pictureShadow: true,
- pictureHeight: 300
-};
-slidesEN['annotation'] = {
- title: 'Annotate and link your files and folders',
- description: (
- <>
- In TagSpaces Pro you can add text description to every kind of file or
- folder.
- </>
- ),
- items: [
- <>
- The description text can be in <b>Markdown</b> format.
- </>,
- <>
- This will allow so you have basic text formatting such as <b>bold</b> or{' '}
- <i>italic</i>.
- </>,
- <>
- You can easily create plain or numbered (<b>to-do</b>) lists.
- </>,
- <>
- <b>Create links</b> to other documents, folder, locations or web pages
- </>,
- <>
- You can also set a <b>custom thumbnail</b> for every file or folder,
- allowing you to emphasize visually its content.
- </>
- ],
- ctaURL: Links.links.productProFileFolderMeta,
- ctaTitle: i18n.t('showMeMore'),
- pictureURL: EntryDescription,
- pictureShadow: true,
- pictureHeight: 300
-};
-slidesEN['search'] = {
- title: 'Extended Search',
- description: (
- <>
- The search is essential part of TagSpaces, which is significantly extended
- in the PRO version.
- </>
- ),
- items: [
- <>
- <b>Stored search queries</b> – save common or complex queries for later
- use
- </>,
- <>
- <b>Full text search</b> on TXT, Markdown and HTML files
- </>,
- <>
- <b>Global search</b> – searching all local locations at once
- </>,
- <>
- <b>Filter by file type</b> – documents, notes, audio or video files,
- archives, bookmarks, ebooks, ...
- </>,
- <>Filter for files, folders or untagged files</>,
- <>Filter by size and date</>
- ],
- ctaURL: Links.links.productProAdvancedSearch,
- ctaTitle: i18n.t('showMeMore'),
- pictureURL: SearchImage,
- pictureHeight: 150
-};
-slidesEN['folderColor'] = {
- title: 'Folders with custom backgrounds',
- description: (
- <>
- In the Pro version you can set a background color to any folder. The color
- is visible also in the parent folder. Once it is opened the whole
- background area is having the specified folder color. This can be useful
- if you have common sub-folders structure, where for example the sub-folder{' '}
- <i>Archive</i> can marked <i>yellow</i> for easy recognition.
- </>
- ),
- ctaURL: Links.links.productProFolderColor,
- ctaTitle: i18n.t('showMeMore'),
- pictureURL: CustomFolderColor,
- pictureShadow: true,
- pictureHeight: 300
-};
-slidesEN['enterprise'] = {
- title: 'TagSpaces Web Pro & Enterprise',
- description: (
- <>
- TagSpaces is offered also as a web application running in your web
- browser.
- </>
- ),
- items: [
- <>
- <b>On-prem web</b> version of TagSpaces Pro for <b>self-hosting</b>
- </>,
- <>
- <b>PWA</b> mode optimized for use on <b>mobile devices</b>
- </>,
- <>
- <b>White label</b> packages, with custom colors and logo
- </>,
- <>
- Easy deployable on the AWS cloud stack, providing user management and
- MFA/2FA by utilizing Cognito.
- </>,
- <>
- Development of custom <b>file viewers</b> or <b>perspectives</b>
- </>,
- <>Premium technical support</>
- ],
- ctaURL: Links.links.emailContact,
- ctaTitle: i18n.t('contactUs'),
- pictureURL: EnterpriseImage,
- pictureHeight: 200
-};
-// slidesEN['objectstorage'] = {
-// title: 'Connect AWS S3 or MinIO object storage',
-// items: [
-// <>
-// TagSpaces Pro supports connecting{' '}
-// <b>Amazon S3 compliant storage providers</b> as locations. Such storage is
-// offered by Amazon AWS, Wasabi and many others. You can also host an object
-// storage <b>privately</b> (e.g. on your NAS) with the help of open source
-// projects like MinIO.
-// </>,
-// <>
-// This allows you to <b>work collaboratively</b> on the same files with
-// family members or co-workers.
-// </>,
-// <>
-// By doing so, you are getting a Cloud based{' '}
-// <b>full-fledged file organizer and browser</b>, so you do not have to
-// download files in order to preview, edit or annotate them. On top of that
-// you can <b>stream audio and video</b> files from the Cloud location.
-// </>
-// ],
-// ctaURL: Links.links.productProObjectStore,
-// ctaTitle: i18n.t('showMeMore'),
-// pictureURL: CloudImage,
-// pictureShadow: true,
-// pictureHeight: 300
-// };
+const slidesEN = getProTeaserSlides();
function Slide(props: SlideProps) {
const {
@@ -352,11 +128,21 @@ function Slide(props: SlideProps) {
/>
)}
<br />
+ <Button
+ onClick={() => {
+ openURL(Links.links.productsOverview, true);
+ }}
+ variant="contained"
+ color="primary"
+ >
+ Compare TagSpaces Products
+ </Button>
{ctaTitle && openURL && (
<Button
onClick={() => {
openURL(ctaURL, true);
}}
+ style={{ marginLeft: 10 }}
variant="contained"
color="primary"
>
@@ -369,7 +155,9 @@ function Slide(props: SlideProps) {
}
function ProTeaserDialog(props: Props) {
- const [activeStep, setActiveStep] = useState<number>(0);
+ const [activeStep, setActiveStep] = useState<number>(
+ props.slideIndex && props.slideIndex > -1 ? props.slideIndex : 0
+ );
const maxSteps = Object.keys(slidesEN).length;
@@ -453,4 +241,9 @@ function ProTeaserDialog(props: Props) {
);
}
-export default ProTeaserDialog;
+function mapStateToProps(state) {
+ return {
+ slideIndex: getProTeaserIndex(state)
+ };
+}
+export default connect(mapStateToProps)(ProTeaserDialog);
diff --git a/app/components/dialogs/settings/SettingsDialog.tsx b/app/components/dialogs/settings/SettingsDialog.tsx
index 2c1a531ae..1ee311ea9 100644
--- a/app/components/dialogs/settings/SettingsDialog.tsx
+++ b/app/components/dialogs/settings/SettingsDialog.tsx
@@ -46,7 +46,7 @@ import { clearAllURLParams } from '-/utils/dom';
import SettingsAdvanced from '-/components/dialogs/settings/SettingsAdvanced';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
import { getUuid } from '-/services/utils-io';
-import Links from '-/links';
+import Links from '-/content/links';
const styles: any = () => ({
mainContent: {
diff --git a/app/components/menus/DirectoryMenu.tsx b/app/components/menus/DirectoryMenu.tsx
index ad15f9511..77b12ecb4 100644
--- a/app/components/menus/DirectoryMenu.tsx
+++ b/app/components/menus/DirectoryMenu.tsx
@@ -48,7 +48,7 @@ import FileUploadContainer, {
FileUploadContainerRef
} from '-/components/FileUploadContainer';
import { TS } from '-/tagspaces.namespace';
-import Links from '-/links';
+import Links from '-/content/links';
import { PerspectiveIDs } from '-/perspectives';
import PlatformFacade from '-/services/platform-facade';
import { getDirectoryMenuItems } from '-/perspectives/common/DirectoryMenuItems';
diff --git a/app/components/menus/LocationManagerMenu.tsx b/app/components/menus/LocationManagerMenu.tsx
index c0b2d6f2d..a1e03236f 100644
--- a/app/components/menus/LocationManagerMenu.tsx
+++ b/app/components/menus/LocationManagerMenu.tsx
@@ -35,7 +35,7 @@ import AppConfig from '@tagspaces/tagspaces-platforms/AppConfig';
import i18n from '-/services/i18n';
import { Pro } from '../../pro';
import { actions as AppActions } from '-/reducers/app';
-import Links from '-/links';
+import Links from '-/content/links';
import { ProLabel } from '-/components/HelperComponents';
import { actions as LocationIndexActions } from '-/reducers/location-index';
import { OpenLinkIcon, HelpIcon } from '-/components/CommonIcons';
diff --git a/app/components/menus/SearchMenu.tsx b/app/components/menus/SearchMenu.tsx
index 447b80e97..b5bede233 100644
--- a/app/components/menus/SearchMenu.tsx
+++ b/app/components/menus/SearchMenu.tsx
@@ -25,7 +25,7 @@ import HelpIcon from '@mui/icons-material/Help';
import ExportImportIcon from '@mui/icons-material/SwapHoriz';
import i18n from '-/services/i18n';
import { Pro } from '../../pro';
-import Links from '-/links';
+import Links from '-/content/links';
import { ProLabel } from '-/components/HelperComponents';
interface Props {
diff --git a/app/components/menus/TagLibraryMenu.tsx b/app/components/menus/TagLibraryMenu.tsx
index 2671080b2..0bb8cc26c 100644
--- a/app/components/menus/TagLibraryMenu.tsx
+++ b/app/components/menus/TagLibraryMenu.tsx
@@ -29,7 +29,7 @@ import AppConfig from '@tagspaces/tagspaces-platforms/AppConfig';
import ImportExportTagGroupsDialog from '../dialogs/ImportExportTagGroupsDialog';
import i18n from '-/services/i18n';
import { TS } from '-/tagspaces.namespace';
-import Links from '-/links';
+import Links from '-/content/links';
import { ProLabel, ProTooltip } from '-/components/HelperComponents';
import { Pro } from '-/pro';
diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsx
index b9997e6a4..bdc02a16d 100644
--- a/app/containers/MainPage.tsx
+++ b/app/containers/MainPage.tsx
@@ -71,7 +71,8 @@ import {
isImportKanBanDialogOpened,
getSelectedEntries,
currentUser,
- isLocationDialogOpened
+ isLocationDialogOpened,
+ isProTeaserVisible
} from '../reducers/app';
import TargetFileBox from '../components/TargetFileBox';
import i18n from '../services/i18n';
@@ -90,6 +91,7 @@ import { actions as LocationIndexActions } from '-/reducers/location-index';
import MoveOrCopyFilesDialog from '-/components/dialogs/MoveOrCopyFilesDialog';
import PlatformIO from '-/services/platform-facade';
import { Pro } from '-/pro';
+import { getUuid } from '-/services/utils-io';
const drawerWidth = 320;
const body = document.getElementsByTagName('body')[0];
@@ -145,6 +147,7 @@ interface Props {
isOnboardingDialogOpened: boolean;
isUploadProgressDialogOpened: boolean;
isProgressDialogOpened: boolean;
+ isProTeaserVisible: boolean;
toggleUploadDialog: () => void;
toggleOpenLinkDialog: () => void;
toggleProgressDialog: () => void;
@@ -168,6 +171,7 @@ interface Props {
toggleAboutDialog: () => void; // needed by electron-menus
toggleLocationDialog: () => void; // needed by electron-menus
toggleOnboardingDialog: () => void; // needed by electron-menus
+ toggleProTeaser: () => void; // needed by electron-menus
// setLastSelectedEntry: (path: string) => void; // needed by electron-menus
setSelectedEntries: (selectedEntries: Array<Object>) => void; // needed by electron-menus
openFsEntry: (fsEntry: TS.FileSystemEntry) => void; // needed by electron-menus
@@ -320,6 +324,19 @@ function OpenLinkDialogAsync(props) {
);
}
+const ProTeaserDialog = React.lazy(() =>
+ import(
+ /* webpackChunkName: "ProTeaserDialog" */ '../components/dialogs/ProTeaserDialog'
+ )
+);
+function ProTeaserDialogAsync(props) {
+ return (
+ <React.Suspense fallback={<LoadingLazy />}>
+ <ProTeaserDialog {...props} />
+ </React.Suspense>
+ );
+}
+
function MainPage(props: Props) {
const percent = useRef<number | undefined>(undefined);
const [ignored, forceUpdate] = useReducer(x => x + 1, 0);
@@ -525,6 +542,7 @@ function MainPage(props: Props) {
toggleProgressDialog,
toggleEditTagDialog,
toggleOpenLinkDialog,
+ toggleProTeaser,
setFirstRun,
openURLExternally,
loadDirectoryContent,
@@ -584,6 +602,7 @@ function MainPage(props: Props) {
windowHeight={dimensions.height}
windowWidth={dimensions.width}
toggleDrawer={toggleDrawer}
+ toggleProTeaser={toggleProTeaser}
drawerOpened={drawerOpened}
openedFiles={openedFiles}
currentDirectoryPath={directoryPath}
@@ -675,6 +694,14 @@ function MainPage(props: Props) {
onClose={toggleOpenLinkDialog}
/>
)}
+ {props.isProTeaserVisible && (
+ <ProTeaserDialogAsync
+ open={props.isProTeaserVisible}
+ onClose={toggleProTeaser}
+ openURLExternally={openURLExternally}
+ // key={getUuid()} // TODO rethink to remove this
+ />
+ )}
{props.isUploadProgressDialogOpened && (
<FileUploadDialog
open={props.isUploadProgressDialogOpened}
@@ -837,6 +864,7 @@ function mapStateToProps(state) {
isThirdPartyLibsDialogOpened: isThirdPartyLibsDialogOpened(state),
isUploadProgressDialogOpened: isUploadDialogOpened(state),
isOpenLinkDialogOpened: isOpenLinkDialogOpened(state),
+ isProTeaserVisible: isProTeaserVisible(state),
isProgressDialogOpened: isProgressOpened(state),
isReadOnlyMode: isReadOnlyMode(state),
isGeneratingThumbs: isGeneratingThumbs(state),
@@ -884,6 +912,7 @@ function mapDispatchToProps(dispatch) {
toggleLocationDialog: AppActions.toggleLocationDialog,
toggleOnboardingDialog: AppActions.toggleOnboardingDialog,
toggleOpenLinkDialog: AppActions.toggleOpenLinkDialog,
+ toggleProTeaser: AppActions.toggleProTeaser,
setSelectedEntries: AppActions.setSelectedEntries,
// setGeneratingThumbnails: AppActions.setGeneratingThumbnails,
openFsEntry: AppActions.openFsEntry,
@@ -933,6 +962,7 @@ const areEqual = (prevProp, nextProp) =>
prevProp.isLocationManagerPanelOpened &&
nextProp.isOnboardingDialogOpened === prevProp.isOnboardingDialogOpened &&
nextProp.isOpenLinkDialogOpened === prevProp.isOpenLinkDialogOpened &&
+ nextProp.isProTeaserVisible === prevProp.isProTeaserVisible &&
nextProp.isProgressDialogOpened === prevProp.isProgressDialogOpened &&
nextProp.isReadOnlyMode === prevProp.isReadOnlyMode &&
nextProp.isSearchPanelOpened === prevProp.isSearchPanelOpened &&
diff --git a/app/containers/PageNotification.tsx b/app/containers/PageNotification.tsx
index 7c34de93e..4e4d2f5c1 100644
--- a/app/containers/PageNotification.tsx
+++ b/app/containers/PageNotification.tsx
@@ -39,7 +39,7 @@ import {
} from '../reducers/location-index';
import i18n from '../services/i18n';
import { Pro } from '../pro';
-import Links from '-/links';
+import Links from '-/content/links';
interface Props {
notificationStatus: any;
diff --git a/app/content/ProTeaserSlides.tsx b/app/content/ProTeaserSlides.tsx
new file mode 100644
index 000000000..0bf0eb096
--- /dev/null
+++ b/app/content/ProTeaserSlides.tsx
@@ -0,0 +1,241 @@
+import Links from '-/content/links';
+import ProTeaserImage from '-/assets/images/pro-teaser.svg';
+import i18n from '-/services/i18n';
+import KanbanImage from '-/assets/images/kanban-perspective.jpg';
+import GalleryImage from '-/assets/images/gallery-perspective.jpg';
+import MapImage from '-/assets/images/mapique-perspective.jpg';
+import EntryDescription from '-/assets/images/entry-description.jpg';
+import SearchImage from '-/assets/images/search-undraw.svg';
+import CustomFolderColor from '-/assets/images/custom-folder-color.jpg';
+import EnterpriseImage from '-/assets/images/world-undraw.svg';
+import { PerspectiveIDs } from '-/perspectives';
+import React from 'react';
+
+export function getProTeaserSlideIndex(slideName: string): number {
+ if (!slideName) {
+ return -1;
+ }
+ return Object.keys(getProTeaserSlides()).findIndex(key => key === slideName);
+}
+
+export function getProTeaserSlides() {
+ const slidesEN = [];
+ slidesEN['general'] = {
+ title: 'Why TagSpaces Pro ?',
+ description: (
+ <>
+ The TagSpaces project is entirely <b>subscriber-supported</b>. We do not
+ make money through advertising or any form of data sharing, so buying a
+ Pro subscription will support the further development of our core
+ product TagSpaces Lite and our browser extensions, which are all freely
+ available.
+ <br />
+ <br />
+ On top of that you will get <b>a lot of useful features</b>, extended
+ search functionalities, alternative perspectives for your files, geo
+ tagging functionality. Some of these features are briefly presented on
+ the next slides.
+ </>
+ ),
+ pictureURL: ProTeaserImage,
+ pictureHeight: 150
+ };
+ slidesEN[PerspectiveIDs.KANBAN] = {
+ title: 'Kanban Perspectives',
+ description: (
+ <>
+ This perspective can turn every folder into a Kanban board, where
+ columns represents the sub folders of the current folder. Every file
+ from the sub folders is shown as a tile and can be moved with drag and
+ drop between the columns. The columns itself can be moved with drag and
+ drop too. There is a built-in <b>Trello import</b>, where a Trello JSON
+ export can be imported in the current folder.
+ </>
+ ),
+ ctaURL: Links.documentationLinks.kanbanPerspective,
+ ctaTitle: i18n.t('showMeMore'),
+ pictureURL: KanbanImage,
+ pictureShadow: true,
+ pictureHeight: 300
+ };
+ slidesEN[PerspectiveIDs.GALLERY] = {
+ title: 'Gallery Perspectives',
+ description: (
+ <>
+ This perspective is optimized for displaying folders with photos and
+ other images. It has an integrated <b>presentation mode</b>, so by just
+ clicking the play button, the images start to change automatically one
+ after another. With the expand button you can start the presentation in{' '}
+ <b>full screen</b>, so you can enjoy your photos in a distraction-free
+ way.
+ </>
+ ),
+ ctaURL: Links.documentationLinks.galleryPerspective,
+ ctaTitle: i18n.t('showMeMore'),
+ pictureURL: GalleryImage,
+ pictureShadow: true,
+ pictureHeight: 300
+ };
+ slidesEN[PerspectiveIDs.MAPIQUE] = {
+ title: 'Mapique Perspective & Geo tagging',
+ description: (
+ <>
+ The Mapique perspective displays files and folders tagged with geo-tags
+ on a digital map. The perspective integrates an ability to{' '}
+ <b>extract geo coordinates</b> from EXIF/IPTC data embedded in JPEG
+ files. By default TagSpaces uses OpenStreetMap for the map, but other
+ compatible map tile servers can be used instead.
+ <br />
+ In the PRO version, you can add tags containing geolocation data to any
+ file or folder. This can be useful for example for planing and
+ documenting trips or just to <b>privately annotate maps</b>.
+ </>
+ ),
+ ctaURL: Links.documentationLinks.mapiquePerspective,
+ ctaTitle: i18n.t('showMeMore'),
+ pictureURL: MapImage,
+ pictureShadow: true,
+ pictureHeight: 300
+ };
+ slidesEN['annotation'] = {
+ title: 'Annotate and link your files and folders',
+ description: (
+ <>
+ In TagSpaces Pro you can add text description to every kind of file or
+ folder.
+ </>
+ ),
+ items: [
+ <>
+ The description text can be in <b>Markdown</b> format.
+ </>,
+ <>
+ This will allow so you have basic text formatting such as <b>bold</b> or{' '}
+ <i>italic</i>.
+ </>,
+ <>
+ You can easily create plain or numbered (<b>to-do</b>) lists.
+ </>,
+ <>
+ <b>Create links</b> to other documents, folder, locations or web pages
+ </>,
+ <>
+ You can also set a <b>custom thumbnail</b> for every file or folder,
+ allowing you to emphasize visually its content.
+ </>
+ ],
+ ctaURL: Links.links.productProFileFolderMeta,
+ ctaTitle: i18n.t('showMeMore'),
+ pictureURL: EntryDescription,
+ pictureShadow: true,
+ pictureHeight: 300
+ };
+ slidesEN['search'] = {
+ title: 'Extended Search',
+ description: (
+ <>
+ The search is essential part of TagSpaces, which is significantly
+ extended in the PRO version.
+ </>
+ ),
+ items: [
+ <>
+ <b>Stored search queries</b> – save common or complex queries for later
+ use
+ </>,
+ <>
+ <b>Full text search</b> on TXT, Markdown and HTML files
+ </>,
+ <>
+ <b>Global search</b> – searching all local locations at once
+ </>,
+ <>
+ <b>Filter by file type</b> – documents, notes, audio or video files,
+ archives, bookmarks, ebooks, ...
+ </>,
+ <>Filter for files, folders or untagged files</>,
+ <>Filter by size and date</>
+ ],
+ ctaURL: Links.links.productProAdvancedSearch,
+ ctaTitle: i18n.t('showMeMore'),
+ pictureURL: SearchImage,
+ pictureHeight: 150
+ };
+ slidesEN['folderColor'] = {
+ title: 'Folders with custom backgrounds',
+ description: (
+ <>
+ In the Pro version you can set a background color to any folder. The
+ color is visible also in the parent folder. Once it is opened the whole
+ background area is having the specified folder color. This can be useful
+ if you have common sub-folders structure, where for example the
+ sub-folder <i>Archive</i> can marked <i>yellow</i> for easy recognition.
+ </>
+ ),
+ ctaURL: Links.links.productProFolderColor,
+ ctaTitle: i18n.t('showMeMore'),
+ pictureURL: CustomFolderColor,
+ pictureShadow: true,
+ pictureHeight: 300
+ };
+ slidesEN['enterprise'] = {
+ title: 'TagSpaces Web Pro & Enterprise',
+ description: (
+ <>
+ TagSpaces is offered also as a web application running in your web
+ browser.
+ </>
+ ),
+ items: [
+ <>
+ <b>On-prem web</b> version of TagSpaces Pro for <b>self-hosting</b>
+ </>,
+ <>
+ <b>PWA</b> mode optimized for use on <b>mobile devices</b>
+ </>,
+ <>
+ <b>White label</b> packages, with custom colors and logo
+ </>,
+ <>
+ Easy deployable on the AWS cloud stack, providing user management and
+ MFA/2FA by utilizing Cognito.
+ </>,
+ <>
+ Development of custom <b>file viewers</b> or <b>perspectives</b>
+ </>,
+ <>Premium technical support</>
+ ],
+ ctaURL: Links.links.emailContact,
+ ctaTitle: i18n.t('contactUs'),
+ pictureURL: EnterpriseImage,
+ pictureHeight: 200
+ };
+ return slidesEN;
+ // slidesEN['objectstorage'] = {
+ // title: 'Connect AWS S3 or MinIO object storage',
+ // items: [
+ // <>
+ // TagSpaces Pro supports connecting{' '}
+ // <b>Amazon S3 compliant storage providers</b> as locations. Such storage is
+ // offered by Amazon AWS, Wasabi and many others. You can also host an object
+ // storage <b>privately</b> (e.g. on your NAS) with the help of open source
+ // projects like MinIO.
+ // </>,
+ // <>
+ // This allows you to <b>work collaboratively</b> on the same files with
+ // family members or co-workers.
+ // </>,
+ // <>
+ // By doing so, you are getting a Cloud based{' '}
+ // <b>full-fledged file organizer and browser</b>, so you do not have to
+ // download files in order to preview, edit or annotate them. On top of that
+ // you can <b>stream audio and video</b> files from the Cloud location.
+ // </>
+ // ],
+ // ctaURL: Links.links.productProObjectStore,
+ // ctaTitle: i18n.t('showMeMore'),
+ // pictureURL: CloudImage,
+ // pictureShadow: true,
+ // pictureHeight: 300
+ // };
+}
diff --git a/app/links.ts b/app/content/links.ts
similarity index 100%
rename from app/links.ts
rename to app/content/links.ts
diff --git a/app/package.json b/app/package.json
index bec79d1dd..0385271c7 100644
--- a/app/package.json
+++ b/app/package.json
@@ -13,11 +13,11 @@
"license": "AGPL-3.0",
"scripts": {},
"webDependencies": {
- "@tagspaces/extensions": "1.0.41"
+ "@tagspaces/extensions": "1.0.42"
},
"nodeDependencies": {
"@tagspaces/tagspaces-ws": "2.0.45",
- "@tagspaces/extensions": "1.0.41",
+ "@tagspaces/extensions": "1.0.42",
"sharp": "^0.30.7"
}
}
diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsx
index 6ed82afe6..f026aea32 100644
--- a/app/perspectives/grid-perspective/components/MainContainer.tsx
+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx
@@ -68,7 +68,7 @@ import GridSettingsDialog from '-/perspectives/grid-perspective/components/GridS
import AddTagToTagGroupDialog from '-/components/dialogs/AddTagToTagGroupDialog';
import { TS } from '-/tagspaces.namespace';
import { Pro } from '-/pro';
-import Links from '-/links';
+import Links from '-/content/links';
import { defaultSettings } from '../index';
import { PerspectiveIDs } from '-/perspectives';
import { fileOperationsEnabled } from '-/perspectives/common/main-container';
diff --git a/app/perspectives/list/components/MainContainer.tsx b/app/perspectives/list/components/MainContainer.tsx
index d4289e1e9..b860a45e4 100644
--- a/app/perspectives/list/components/MainContainer.tsx
+++ b/app/perspectives/list/components/MainContainer.tsx
@@ -67,7 +67,7 @@ import GridSettingsDialog from '-/perspectives/grid-perspective/components/GridS
import AddTagToTagGroupDialog from '-/components/dialogs/AddTagToTagGroupDialog';
import { TS } from '-/tagspaces.namespace';
import { Pro } from '-/pro';
-import Links from '-/links';
+import Links from '-/content/links';
import { defaultSettings } from '../index';
import { PerspectiveIDs } from '-/perspectives';
import { fileOperationsEnabled } from '-/perspectives/common/main-container';
diff --git a/app/reducers/app.ts b/app/reducers/app.ts
index 1464e7b92..144746e89 100644
--- a/app/reducers/app.ts
+++ b/app/reducers/app.ts
@@ -67,6 +67,7 @@ import {
import { TS } from '-/tagspaces.namespace';
import { PerspectiveIDs } from '-/perspectives';
import versionMeta from '-/version.json';
+import { getProTeaserSlideIndex } from '-/content/ProTeaserSlides';
export const types = {
DEVICE_ONLINE: 'APP/DEVICE_ONLINE',
@@ -110,6 +111,7 @@ export const types = {
TOGGLE_KEYBOARD_DIALOG: 'APP/TOGGLE_KEYBOARD_DIALOG',
TOGGLE_LICENSE_DIALOG: 'APP/TOGGLE_LICENSE_DIALOG',
TOGGLE_OPENLINK_DIALOG: 'APP/TOGGLE_OPENLINK_DIALOG',
+ TOGGLE_OPEN_PRO_TEASER_DIALOG: 'APP/TOGGLE_OPEN_PRO_TEASER_DIALOG',
TOGGLE_THIRD_PARTY_LIBS_DIALOG: 'APP/TOGGLE_THIRD_PARTY_LIBS_DIALOG',
TOGGLE_SETTINGS_DIALOG: 'APP/TOGGLE_SETTINGS_DIALOG',
TOGGLE_CREATE_DIRECTORY_DIALOG: 'APP/TOGGLE_CREATE_DIRECTORY_DIALOG',
@@ -217,6 +219,7 @@ export const initialState = {
aboutDialogOpened: false,
locationDialogOpened: false,
openLinkDialogOpened: false,
+ proTeaserIndex: -1,
onboardingDialogOpened: false,
keysDialogOpened: false,
createFileDialogOpened: false,
@@ -412,6 +415,19 @@ export default (state: any = initialState, action: any) => {
openLinkDialogOpened: !state.openLinkDialogOpened
};
}
+ case types.TOGGLE_OPEN_PRO_TEASER_DIALOG: {
+ let index = -1;
+ const proTeaserIndex = getProTeaserSlideIndex(action.proTeaserPage);
+ if (proTeaserIndex && proTeaserIndex > -1) {
+ index = proTeaserIndex;
+ } else if (state.proTeaserIndex === -1) {
+ index = 0;
+ }
+ return {
+ ...state,
+ proTeaserIndex: index
+ };
+ }
case types.TOGGLE_KEYBOARD_DIALOG: {
return { ...state, keysDialogOpened: !state.keysDialogOpened };
}
@@ -998,6 +1014,10 @@ export const actions = {
toggleOnboardingDialog: () => ({ type: types.TOGGLE_ONBOARDING_DIALOG }),
toggleKeysDialog: () => ({ type: types.TOGGLE_KEYBOARD_DIALOG }),
toggleOpenLinkDialog: () => ({ type: types.TOGGLE_OPENLINK_DIALOG }),
+ toggleProTeaser: (slidePage?: string) => ({
+ type: types.TOGGLE_OPEN_PRO_TEASER_DIALOG,
+ proTeaserPage: slidePage
+ }),
toggleLicenseDialog: () => ({ type: types.TOGGLE_LICENSE_DIALOG }),
toggleThirdPartyLibsDialog: () => ({
type: types.TOGGLE_THIRD_PARTY_LIBS_DIALOG
@@ -2627,6 +2647,8 @@ export const isUploadDialogOpened = (state: any) =>
state.app.uploadDialogOpened;
export const isOpenLinkDialogOpened = (state: any) =>
state.app.openLinkDialogOpened;
+export const isProTeaserVisible = (state: any) => state.app.proTeaserIndex > -1;
+export const getProTeaserIndex = (state: any) => state.app.proTeaserIndex;
export const isProgressOpened = (state: any) => state.app.progressDialogOpened;
export const getOpenedFiles = (state: any) => state.app.openedFiles;
export const getNotificationStatus = (state: any) =>
diff --git a/app/reducers/settings.ts b/app/reducers/settings.ts
index 9228638ed..c10edfea1 100644
--- a/app/reducers/settings.ts
+++ b/app/reducers/settings.ts
@@ -21,7 +21,7 @@ import AppConfig from '@tagspaces/tagspaces-platforms/AppConfig';
import i18n from '-/services/i18n';
import defaultSettings from './settings-default';
import PlatformIO from '-/services/platform-facade';
-import Links from '-/links';
+import Links from '-/content/links';
import versionMeta from '-/version.json';
import { actions as AppActions } from './app';
import { TS } from '-/tagspaces.namespace';
diff --git a/app/services/electron-menus.ts b/app/services/electron-menus.ts
index 73b042e30..85006b102 100644
--- a/app/services/electron-menus.ts
+++ b/app/services/electron-menus.ts
@@ -17,7 +17,7 @@
*/
import { app, Menu } from 'electron';
-import Links from '-/links';
+import Links from '-/content/links';
export default function buildDesktopMenu(props: any, i18n) {
function quitApp() {