TagSpaces is an offline, open source, document manager with tagging support
- extracting links in separate config object - optimizing the onboarding dialog - optimzing update process for PRO users
Ilian Sapundshiev3e3cdeab50d2
diff --git a/app/components/HelpFeedbackPanel.js b/app/components/HelpFeedbackPanel.jsindex 9dca65a93..a37f680b6 100644--- a/app/components/HelpFeedbackPanel.js+++ b/app/components/HelpFeedbackPanel.js@@ -36,20 +36,31 @@ import TranslationIcon from '@material-ui/icons/Translate';import NewFeatureIcon from '@material-ui/icons/Gesture';import SocialIcon from '@material-ui/icons/ThumbUp';import Social2Icon from '@material-ui/icons/Mood';+import KeyShortcutsIcon from '@material-ui/icons/Keyboard';import CustomLogo from './CustomLogo';import styles from './SidePanels.css';import AppConfig from '../config';import i18n from '../services/i18n';+import { Pro } from '../pro';type Props = {classes: Object,openFileNatively: (url: string) => void,+ toggleKeysDialog: () => void,+ toggleOnboardingDialog: () => void,+ toggleProTeaser: () => void,style: Object};class HelpFeedbackPanel extends React.Component<Props> {render() {- const { classes, openFileNatively } = this.props;+ const {+ classes,+ openFileNatively,+ toggleKeysDialog,+ toggleOnboardingDialog,+ toggleProTeaser+ } = this.props;return (<div className={classes.panel} style={this.props.style}>@@ -62,17 +73,23 @@ class HelpFeedbackPanel extends React.Component<Props> {</ListItemIcon><ListItemText primary="Open Documentation" /></ListItem>- <ListItem button onClick={() => openFileNatively(AppConfig.changelogURL)}>+ <ListItem button onClick={() => toggleKeysDialog()}>+ <ListItemIcon>+ <KeyShortcutsIcon />+ </ListItemIcon>+ <ListItemText primary={i18n.t('core:shortcutKeys')} title="" />+ </ListItem>+ <ListItem button onClick={() => openFileNatively(AppConfig.links.changelogURL)}><ListItemIcon><ChangeLogIcon /></ListItemIcon><ListItemText primary={i18n.t('core:whatsNew')} title="Opens the changelog of the app" /></ListItem>- <ListItem button onClick={() => openFileNatively(AppConfig.documentationLinks.general)}>+ <ListItem button onClick={() => toggleOnboardingDialog()}><ListItemIcon><OnboardingIcon /></ListItemIcon>- <ListItemText primary="Onboarding Wizard" />+ <ListItemText primary={i18n.t('core:onboardingWizard')} /></ListItem><Divider /><ListItem button onClick={() => openFileNatively(AppConfig.links.suggestFeature)}>@@ -125,6 +142,13 @@ class HelpFeedbackPanel extends React.Component<Props> {</ListItemIcon><ListItemText primary={i18n.t('core:webClipperFirefox')} /></ListItem>+ <Divider />+ <ListItem button onClick={() => toggleProTeaser()}>+ <ListItemIcon>+ <WebClipperIcon />+ </ListItemIcon>+ <ListItemText primary={i18n.t('core:proTeaser')} />+ </ListItem></List></div>);diff --git a/app/components/dialogs/AboutDialog.js b/app/components/dialogs/AboutDialog.jsindex e562f0d3a..351fda052 100644--- a/app/components/dialogs/AboutDialog.js+++ b/app/components/dialogs/AboutDialog.js@@ -56,7 +56,7 @@ const AboutDialog = (props: Props) => {function checkForUpdates() {if (updateAvailable) {- PlatformIO.openUrl(AppConfig.downloadURL);+ PlatformIO.openUrl(AppConfig.links.downloadURL);} else {getLastVersionPromise().then(lastVersion => {diff --git a/app/components/dialogs/OnboardingDialog.js b/app/components/dialogs/OnboardingDialog.jsindex 486d847d1..b40883873 100644--- a/app/components/dialogs/OnboardingDialog.js+++ b/app/components/dialogs/OnboardingDialog.js@@ -113,13 +113,14 @@ class OnboardingDialog extends React.Component<Props, State> {><Typography variant="h4">Welcome to TagSpaces</Typography><Typography variant="h6"> </Typography>- <Typography variant="h6">Your favorite file organizer has a fresh new look</Typography>+ {/* <Typography variant="h6">Your favorite file organizer has a fresh new look</Typography> */}<imgstyle={{ maxHeight: 340, marginTop: 15 }}src={NewLook}alt=""/>- <Typography variant="h6">Try out our new themes</Typography>+ <Typography variant="h6">Try our user interface themes</Typography>+ <Typography variant="h6"> </Typography><ToggleButtonGroupvalue={this.props.currentTheme}exclusive@@ -139,7 +140,7 @@ class OnboardingDialog extends React.Component<Props, State> {textAlign: 'center'}}>- <Typography variant="h4">Explanation of the app navigation</Typography>+ <Typography variant="h4">Understand main app navigation</Typography><imgstyle={{ marginTop: 15 }}src={NavigationV3}diff --git a/app/config.js b/app/config.jsindex b46c0ee60..058bcca17 100644--- a/app/config.js+++ b/app/config.js@@ -20,9 +20,6 @@ const isCordovaiOS = /^file:\/{3}[^\/]/i.test(window.location.href) && /ios|iphoconst isCordovaAndroid = document.URL.indexOf('file:///android_asset') === 0;export default {- checkNewVersionURL: 'https://www.tagspaces.org/releases/tagspaces.json',- downloadURL: 'https://www.tagspaces.org/downloads/',- changelogURL: 'https://www.tagspaces.org/whatsnew/',tagspacesAppPath: '/tagspaces/',metaFolder: '.ts',metaFolderFile: 'tsm.json',@@ -44,6 +41,10 @@ export default {defaultFileColor: '#808080',defaultFolderColor: '#555', // transparent #FDEEBD #ff791b #2c001e #880e4flinks: {+ checkNewVersionURL: 'https://www.tagspaces.org/releases/tagspaces.json',+ productsOverview: 'https://www.tagspaces.org/products/',+ downloadURL: 'https://www.tagspaces.org/downloads/',+ changelogURL: 'https://www.tagspaces.org/whatsnew/',suggestFeature: 'https://trello.com/b/TGeG5bi9',reportIssue: 'https://github.com/tagspaces/tagspaces/issues/',helpTranslating: 'https://www.transifex.com/tagspaces/tagspaces/',diff --git a/app/containers/MainPage.js b/app/containers/MainPage.jsindex 9dce8cbce..df9bd10db 100644--- a/app/containers/MainPage.js+++ b/app/containers/MainPage.js@@ -36,7 +36,6 @@ import VerticalNavigation from '../components/VerticalNavigation';import FolderContainer from '../components/FolderContainer';import EntryContainer from '../components/EntryContainer';import {- isFirstRun,getDesktopMode,getKeyBindingObject,getLeftVerticalSplitSize,@@ -68,12 +67,13 @@ import AppConfig from '../config';import buildDesktopMenu from '../services/electron-menus';import buildTrayIconMenu from '../services/electron-tray-menu';import i18n from '../services/i18n';+import { Pro } from '../pro';const initialSplitSize = 44;const drawerWidth = 300;const body = document.getElementsByTagName('body')[0];-const showOneColumnThreshold = 600;-const bufferedMainSplitResize = buffer({ timeout: 50, id: 'buffered-mainsplit-resize' });+// const showOneColumnThreshold = 600;+// const bufferedMainSplitResize = buffer({ timeout: 50, id: 'buffered-mainsplit-resize' });const bufferedLeftSplitResize = buffer({ timeout: 300, id: 'buffered-leftsplit-resize' });const styles = theme => ({@@ -117,7 +117,6 @@ type Props = {notificationStatus: Object,lastPublishedVersion: string,isUpdateAvailable: boolean,- isFirstRun: boolean,isReadOnlyMode: boolean,setEntryFullWidth: (isFullWidth: boolean) => void,hideNotifications: () => void,@@ -137,7 +136,7 @@ type Props = {toggleOnboardingDialog: () => void, // needed by electron-menussetLastSelectedEntry: (path: string) => void, // needed by electron-menusopenFile: (path: string) => void, // needed by electron-menus- openFileNatively: () => void, // needed by electron-menus+ openFileNatively: (url: string) => void, // needed by electron-menusgetNextFile: () => void, // needed by electron-menusgetPrevFile: () => void, // needed by electron-menusopenLocationManagerPanel: () => void,@@ -156,13 +155,13 @@ type Props = {isSearchPanelOpened: boolean,isPerspectivesPanelOpened: boolean,isHelpFeedbackPanelOpened: boolean,- directoryPath?: string,+ directoryPath: string,showNotification: (text: string,- notificationType: string,- autohide: boolean+ notificationType?: string,+ autohide?: boolean) => void,- reflectCreateEntry?: (path: string, isFile: boolean) => void+ reflectCreateEntry: (path: string, isFile: boolean) => void};type State = {@@ -285,13 +284,17 @@ class MainPage extends Component<Props, State> {this.props.setUpdateAvailable(false);}- openDownloadPage = () => {+ getLatestVersion = () => {+ if (Pro) {+ this.props.showNotification(i18n.t('core:getLatestVersionPro'), 'default', false);+ } else {+ this.props.openFileNatively(AppConfig.links.downloadURL);+ }this.props.setUpdateAvailable(false);- PlatformIO.openFile(AppConfig.downloadURL);- }+ };openChangelogPage = () => {- PlatformIO.openFile(AppConfig.changelogURL);+ this.props.openFileNatively(AppConfig.links.changelogURL);}handleFileDrop = (item, monitor) => {@@ -522,9 +525,7 @@ class MainPage extends Component<Props, State> {color="secondary"size="small"onClick={this.props.cancelDirectoryIndexing}- >- Cancel indexing- </Button>+ >{i18n.t('core:cancelIndexing')}</Button>]}/><Snackbar@@ -537,23 +538,17 @@ class MainPage extends Component<Props, State> {color="secondary"size="small"onClick={this.skipRelease}- >- Later- </Button>,+ >{i18n.t('core:later')}</Button>,<Buttoncolor="secondary"size="small"onClick={this.openChangelogPage}- >- Release Notes- </Button>,+ >{i18n.t('core:releaseNotes')}</Button>,<Buttoncolor="primary"size="small"- onClick={this.openDownloadPage}- >- Get Now- </Button>,+ onClick={this.getLatestVersion}+ >{i18n.t('core:getItNow')}</Button>,]}/></TargetFileBox>@@ -565,7 +560,6 @@ class MainPage extends Component<Props, State> {function mapStateToProps(state) {return {isIndexing: isIndexing(state),- isFirstRun: isFirstRun(state),isReadOnlyMode: isReadOnlyMode(state),isGeneratingThumbs: isGeneratingThumbs(state),isFileOpened: isFileOpened(state),diff --git a/app/locales/en/core.json b/app/locales/en/core.jsonindex d5db73379..567fa5f03 100644--- a/app/locales/en/core.json+++ b/app/locales/en/core.json@@ -170,8 +170,8 @@"aboutTagSpaces": "About TagSpaces","startingHints": "Starting Tips","whatsNew": "What's New",- "suggestNewFeatures": "Suggest New Features",- "reportIssues": "Report Issues",+ "suggestNewFeatures": "Suggest a feature",+ "reportIssues": "Report a problem","followOnTwitter": "Follow us on Twitter","likeUsOnFacebook": "Contact us on Facebook","searchPlaceholder": "Search current location",@@ -326,7 +326,7 @@"tagSelectedEntries": "Tag selected entries","copyMoveSelectedEntries": "Copy or move selected entries","deleteSelectedEntries": "Delete selected entries",- "showHideDirectories": "Show / hide directories",+ "showHideDirectories": "Show / hide folders","sort": "Sort","thirdPartyLibs": "Third Party Libraries","indexLocation": "Refresh Location Index",@@ -439,5 +439,12 @@"helpWithTranslation": "Help with translation","helpFeedback": "Get help, send feedback","emailContact": "Write us an email",+ "onboardingWizard": "Onboarding wizard",+ "getItNow": "Get it now",+ "later": "Later",+ "releaseNotes": "Release Notes",+ "cancelIndexing": "Cancel Indexing",+ "getLatestVersionPro": "Please download the latest version from the link in the purchase confirmation email.",+ "noFileButFoldersFound": "Some folders found, turn on folders from the perspective's toolbar in order to view them.","-": "-"}diff --git a/app/reducers/settings.js b/app/reducers/settings.jsindex 61cd4972b..6e292f3d5 100644--- a/app/reducers/settings.js+++ b/app/reducers/settings.js@@ -386,7 +386,7 @@ export function getLastVersionPromise(): Promise<string> {return new Promise((resolve, reject) => {console.log('Checking for new version...');const xhr = new XMLHttpRequest();- const updateUrl = AppConfig.checkNewVersionURL + '?cv=' + versionMeta.version;+ const updateUrl = AppConfig.links.checkNewVersionURL + '?cv=' + versionMeta.version;xhr.open('GET', updateUrl, true);xhr.responseType = 'json';xhr.onerror = reject;diff --git a/app/services/electron-menus.js b/app/services/electron-menus.jsindex e98cf283d..0fc243839 100644--- a/app/services/electron-menus.js+++ b/app/services/electron-menus.js@@ -279,7 +279,7 @@ export default function buildDesktopMenu(mainPageProps: Object) {{label: '&' + i18n.t('core:whatsNew'),click: () => {- mainPageProps.openFileNatively(AppConfig.changelogURL);+ mainPageProps.openFileNatively(AppConfig.links.changelogURL);}},{diff --git a/app/third-party.txt b/app/third-party.txtindex f4b5e1503..8b6af7db4 100644--- a/app/third-party.txt+++ b/app/third-party.txt@@ -16249,7 +16249,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.------The following software may be included in this product: lodash._baseuniq, lodash._createset, lodash.assignin, lodash.bind, lodash.clonedeep, lodash.defaults, lodash.filter, lodash.flatten, lodash.foreach, lodash.get, lodash.isarguments, lodash.ismatch, lodash.isplainobject, lodash.map, lodash.memoize, lodash.omitby, lodash.pick, lodash.range, lodash.reduce, lodash.reject, lodash.set, lodash.some, lodash.sortby, lodash.union, lodash.uniq, lodash.without. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git (lodash._baseuniq), https://github.com/lodash/lodash.git (lodash._createset), https://github.com/lodash/lodash.git (lodash.assignin), https://github.com/lodash/lodash.git (lodash.bind), https://github.com/lodash/lodash.git (lodash.clonedeep), https://github.com/lodash/lodash.git (lodash.defaults), https://github.com/lodash/lodash.git (lodash.filter), https://github.com/lodash/lodash.git (lodash.flatten), https://github.com/lodash/lodash.git (lodash.foreach), https://github.com/lodash/lodash.git (lodash.get), https://github.com/lodash/lodash.git (lodash.isarguments), https://github.com/lodash/lodash.git (lodash.ismatch), https://github.com/lodash/lodash.git (lodash.isplainobject), https://github.com/lodash/lodash.git (lodash.map), https://github.com/lodash/lodash.git (lodash.memoize), https://github.com/lodash/lodash.git (lodash.omitby), https://github.com/lodash/lodash.git (lodash.pick), https://github.com/lodash/lodash.git (lodash.range), https://github.com/lodash/lodash.git (lodash.reduce), https://github.com/lodash/lodash.git (lodash.reject), https://github.com/lodash/lodash.git (lodash.set), https://github.com/lodash/lodash.git (lodash.some), https://github.com/lodash/lodash.git (lodash.sortby), https://github.com/lodash/lodash.git (lodash.union), https://github.com/lodash/lodash.git (lodash.uniq), https://github.com/lodash/lodash.git (lodash.without). This software contains the following license and notice below:+The following software may be included in this product: lodash._baseuniq, lodash._createset, lodash.assignin, lodash.bind, lodash.clonedeep, lodash.debounce, lodash.defaults, lodash.filter, lodash.flatten, lodash.foreach, lodash.get, lodash.isarguments, lodash.ismatch, lodash.isplainobject, lodash.map, lodash.memoize, lodash.omitby, lodash.pick, lodash.range, lodash.reduce, lodash.reject, lodash.set, lodash.some, lodash.sortby, lodash.throttle, lodash.union, lodash.uniq, lodash.without. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git (lodash._baseuniq), https://github.com/lodash/lodash.git (lodash._createset), https://github.com/lodash/lodash.git (lodash.assignin), https://github.com/lodash/lodash.git (lodash.bind), https://github.com/lodash/lodash.git (lodash.clonedeep), https://github.com/lodash/lodash.git (lodash.debounce), https://github.com/lodash/lodash.git (lodash.defaults), https://github.com/lodash/lodash.git (lodash.filter), https://github.com/lodash/lodash.git (lodash.flatten), https://github.com/lodash/lodash.git (lodash.foreach), https://github.com/lodash/lodash.git (lodash.get), https://github.com/lodash/lodash.git (lodash.isarguments), https://github.com/lodash/lodash.git (lodash.ismatch), https://github.com/lodash/lodash.git (lodash.isplainobject), https://github.com/lodash/lodash.git (lodash.map), https://github.com/lodash/lodash.git (lodash.memoize), https://github.com/lodash/lodash.git (lodash.omitby), https://github.com/lodash/lodash.git (lodash.pick), https://github.com/lodash/lodash.git (lodash.range), https://github.com/lodash/lodash.git (lodash.reduce), https://github.com/lodash/lodash.git (lodash.reject), https://github.com/lodash/lodash.git (lodash.set), https://github.com/lodash/lodash.git (lodash.some), https://github.com/lodash/lodash.git (lodash.sortby), https://github.com/lodash/lodash.git (lodash.throttle), https://github.com/lodash/lodash.git (lodash.union), https://github.com/lodash/lodash.git (lodash.uniq), https://github.com/lodash/lodash.git (lodash.without). This software contains the following license and notice below:Copyright jQuery Foundation and other contributors <https://jquery.org/>@@ -21305,6 +21305,30 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE-----+The following software may be included in this product: react-image-gallery. A copy of the source code may be downloaded from https://github.com/xiaolin/react-image-gallery.git. This software contains the following license and notice below:++Copyright (c) 2017 Xiao Lin++Permission is hereby granted, free of charge, to any person obtaining a copy of+this software and associated documentation files (the "Software"), to deal in+the Software without restriction, including without limitation the rights to+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies+of the Software, and to permit persons to whom the Software is furnished to do+so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.++-----+The following software may be included in this product: react-input-autosize. A copy of the source code may be downloaded from https://github.com/JedWatson/react-input-autosize.git. This software contains the following license and notice below:The MIT License (MIT)@@ -21487,6 +21511,32 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI-----+The following software may be included in this product: react-swipeable. A copy of the source code may be downloaded from http://github.com/dogfessional/react-swipeable.git. This software contains the following license and notice below:++The MIT License (MIT)++Copyright (C) 2014-present Dogfessional++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.++-----+The following software may be included in this product: react-swipeable-views, react-swipeable-views-core, react-swipeable-views-utils. A copy of the source code may be downloaded from https://github.com/oliviertassinari/react-swipeable-views.git (react-swipeable-views), https://github.com/oliviertassinari/react-swipeable-views.git (react-swipeable-views-core), https://github.com/oliviertassinari/react-swipeable-views.git (react-swipeable-views-utils). This software contains the following license and notice below:MIT License@@ -22105,6 +22155,32 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.-----+The following software may be included in this product: resize-observer-polyfill. A copy of the source code may be downloaded from https://github.com/que-etc/resize-observer-polyfill.git. This software contains the following license and notice below:++The MIT License (MIT)++Copyright (c) 2016 Denis Rul++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.++-----+The following software may be included in this product: resolve. A copy of the source code may be downloaded from git://github.com/browserify/resolve.git. This software contains the following license and notice below:MIT License