Skip to content

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

Help links added, help button in the default perspective

Ilian Sapundshieve6e1ee16bb93
diff --git a/app/config.js b/app/config.js
index b93c41c2c..396f54c0a 100644
--- a/app/config.js
+++ b/app/config.js
@@ -21,8 +21,8 @@ const 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',
+ downloadURL: 'https://www.tagspaces.org/downloads/',
+ changelogURL: 'https://www.tagspaces.org/whatsnew/',
tagspacesAppPath: '/tagspaces/',
metaFolder: '.ts',
metaFolderFile: 'tsm.json',
@@ -43,6 +43,14 @@ export default {
// maxSearchResult: 1000,
defaultFileColor: '#808080',
defaultFolderColor: '#555', // transparent #FDEEBD #ff791b #2c001e #880e4f
+ documentationLinks: {
+ general: 'https://docs.tagspaces.org/',
+ defaultPerspective: 'https://docs.tagspaces.org/browsing-files.html#default-perspective',
+ locations: 'https://docs.tagspaces.org/ui/locations',
+ taglibrary: 'https://docs.tagspaces.org/ui/taglibrary',
+ search: 'https://docs.tagspaces.org/search',
+ settings: 'https://docs.tagspaces.org/ui/settings',
+ },
isElectron: (navigator.userAgent.toLowerCase().indexOf(' electron/') > -1),
isFirefox: (navigator.userAgent.toLowerCase().includes('firefox')), // typeof InstallTrigger !== 'undefined';
isWin: navigator.appVersion.includes('Win'),
diff --git a/app/perspectives/grid-perspective/components/MainContainer.js b/app/perspectives/grid-perspective/components/MainContainer.js
index d5abcb975..e2a5f49db 100644
--- a/app/perspectives/grid-perspective/components/MainContainer.js
+++ b/app/perspectives/grid-perspective/components/MainContainer.js
@@ -49,6 +49,7 @@ import CopyIcon from '@material-ui/icons/FileCopy';
import DeleteIcon from '@material-ui/icons/Delete';
import SelectAllIcon from '@material-ui/icons/CheckBox';
import DeSelectAllIcon from '@material-ui/icons/CheckBoxOutlineBlank';
+import HelpIcon from '@material-ui/icons/Help';
import {
type FileSystemEntry,
} from '../../../services/utils-io';
@@ -421,6 +422,11 @@ class GridPerspective extends React.Component<Props, State> {
);
};
+ openHelpWebPage = () => {
+ this.closeOptionsMenu();
+ this.props.openFileNatively(AppConfig.documentationLinks.defaultPerspective);
+ };
+
handleGridCellDblClick = (event, fsEntry: FileSystemEntry) => {
this.props.setSelectedEntries([]);
this.setState(
@@ -1036,6 +1042,18 @@ class GridPerspective extends React.Component<Props, State> {
</ListItemIcon>
<ListItemText primary={i18n.t('core:singleClickSelects')} />
</MenuItem>
+ <Divider />
+ <MenuItem
+ data-tid="gridPerspectiveHelp"
+ title={i18n.t('core:help')}
+ aria-label={i18n.t('core:perspectiveHelp')}
+ onClick={this.openHelpWebPage}
+ >
+ <ListItemIcon>
+ <HelpIcon />
+ </ListItemIcon>
+ <ListItemText primary={i18n.t('core:help')} />
+ </MenuItem>
</Menu>
</div>
);
@@ -1047,6 +1065,7 @@ function mapActionCreatorsToProps(dispatch) {
moveFiles: IOActions.moveFiles,
setSelectedEntries: AppActions.setSelectedEntries,
showNotification: AppActions.showNotification,
+ openFileNatively: AppActions.openFileNatively,
addTags: TaggingActions.addTags
}, dispatch);
}
diff --git a/app/services/electron-menus.js b/app/services/electron-menus.js
index ff9a3c168..a24994d54 100644
--- a/app/services/electron-menus.js
+++ b/app/services/electron-menus.js
@@ -260,7 +260,7 @@ export default function buildDesktopMenu(mainPageProps: Object) {
label: '&' + i18n.t('core:documentation'),
accelerator: mainPageProps.keyBindings.showHelp,
click: () => {
- mainPageProps.openFileNatively('http://docs.tagspaces.org');
+ mainPageProps.openFileNatively(AppConfig.documentationLinks.general);
}
},
{
@@ -278,7 +278,7 @@ export default function buildDesktopMenu(mainPageProps: Object) {
{
label: '&' + i18n.t('core:whatsNew'),
click: () => {
- mainPageProps.openFileNatively('http://www.tagspaces.org/whatsnew/');
+ mainPageProps.openFileNatively(AppConfig.changelogURL);
}
},
{