Skip to content

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

chore: small ui improvements

Ilian Sapundshievff82f98be90d
diff --git a/src/renderer/components/HelpFeedbackPanel.tsx b/src/renderer/components/HelpFeedbackPanel.tsx
index f7e40f350..a68c5b360 100644
--- a/src/renderer/components/HelpFeedbackPanel.tsx
+++ b/src/renderer/components/HelpFeedbackPanel.tsx
@@ -42,6 +42,7 @@ import { Box } from '@mui/material';
import Divider from '@mui/material/Divider';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
+import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import Typography from '@mui/material/Typography';
import { useTheme } from '@mui/material/styles';
@@ -84,149 +85,177 @@ function HelpFeedbackPanel(props: Props) {
marginRight: '5px',
}}
>
- <ListItem
- onClick={() => openAboutDialog()}
- title="Opens the about dialog"
- data-tid="aboutDialog"
- >
- <ListItemIcon>
- <AboutIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:aboutTagSpaces')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ data-tid="aboutDialog"
+ onClick={() => openAboutDialog()}
+ >
+ <ListItemIcon>
+ <AboutIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:aboutTagSpaces')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() =>
- openURLExternally(Links.documentationLinks.general, true)
- }
- >
- <ListItemIcon>
- <HelpIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:documentation')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() =>
+ openURLExternally(Links.documentationLinks.general, true)
+ }
+ >
+ <ListItemIcon>
+ <HelpIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:documentation')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem onClick={() => openKeyboardDialog()}>
- <ListItemIcon>
- <KeyShortcutsIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:shortcutKeys')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton onClick={openKeyboardDialog}>
+ <ListItemIcon>
+ <KeyShortcutsIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:shortcutKeys')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.changelogURL, true)}
- title="Opens the changelog of the app"
- >
- <ListItemIcon>
- <ChangeLogIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:whatsNew')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.changelogURL, true)}
+ >
+ <ListItemIcon>
+ <ChangeLogIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:whatsNew')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem onClick={() => openOnboardingDialog()}>
- <ListItemIcon>
- <OnboardingIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:onboardingWizard')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton onClick={openOnboardingDialog}>
+ <ListItemIcon>
+ <OnboardingIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:onboardingWizard')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.webClipper, true)}
- >
- <ListItemIcon>
- <WebClipperIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:webClipper')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.webClipper, true)}
+ >
+ <ListItemIcon>
+ <WebClipperIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:webClipper')}
+ </Typography>
+ </ListItemButton>
</ListItem>
<Divider />
- <ListItem
- onClick={() => openURLExternally(Links.links.suggestFeature, true)}
- >
- <ListItemIcon>
- <NewFeatureIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:suggestNewFeatures')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.suggestFeature, true)}
+ >
+ <ListItemIcon>
+ <NewFeatureIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:suggestNewFeatures')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.forumsUrl, true)}
- >
- <ListItemIcon>
- <ForumIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:forums')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.forumsUrl, true)}
+ >
+ <ListItemIcon>
+ <ForumIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:forums')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.reportIssue, true)}
- >
- <ListItemIcon>
- <IssueIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:reportIssues')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.reportIssue, true)}
+ >
+ <ListItemIcon>
+ <IssueIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:reportIssues')}
+ </Typography>
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.helpTranslating, true)}
- >
- <ListItemIcon>
- <TranslationIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:helpWithTranslation')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.helpTranslating, true)}
+ >
+ <ListItemIcon>
+ <TranslationIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:helpWithTranslation')}
+ </Typography>
+ </ListItemButton>
</ListItem>
<Divider />
- <ListItem
- onClick={() => openURLExternally(Links.links.emailContact, true)}
- >
- <ListItemIcon>
- <EmailIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:emailContact')}
- </Typography>
- </ListItem>
- {Pro && (
- <ListItem
- onClick={() =>
- openURLExternally(Links.links.cancelSubscription, true)
- }
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.emailContact, true)}
>
<ListItemIcon>
- <CancelSubscriptionIcon />
+ <EmailIcon />
</ListItemIcon>
<Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:cancelSubscription')}
+ {t('core:emailContact')}
</Typography>
+ </ListItemButton>
+ </ListItem>
+ {Pro && (
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() =>
+ openURLExternally(Links.links.cancelSubscription, true)
+ }
+ >
+ <ListItemIcon>
+ <CancelSubscriptionIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:cancelSubscription')}
+ </Typography>
+ </ListItemButton>
</ListItem>
)}
- <ListItem onClick={() => openURLExternally(Links.links.twitter, true)}>
- <ListItemIcon>
- <XIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('core:followOnX')}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.twitter, true)}
+ >
+ <ListItemIcon>
+ <XIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('core:followOnX')}
+ </Typography>
+ </ListItemButton>
</ListItem>
<Divider />
- <ListItem onClick={() => openProTeaserDialog()}>
- <ListItemIcon>
- <ProTeaserIcon />
- </ListItemIcon>
- <Typography sx={{ color: theme.palette.text.primary }}>
- {t('achieveMore') + ' TagSpaces Pro'}
- </Typography>
+ <ListItem disablePadding>
+ <ListItemButton onClick={() => openProTeaserDialog()}>
+ <ListItemIcon>
+ <ProTeaserIcon />
+ </ListItemIcon>
+ <Typography sx={{ color: theme.palette.text.primary }}>
+ {t('achieveMore') + ' TagSpaces Pro'}
+ </Typography>
+ </ListItemButton>
</ListItem>
</List>
</Box>
diff --git a/src/renderer/components/WelcomePanel.tsx b/src/renderer/components/WelcomePanel.tsx
index 5e345d556..e7dc33838 100644
--- a/src/renderer/components/WelcomePanel.tsx
+++ b/src/renderer/components/WelcomePanel.tsx
@@ -36,6 +36,8 @@ import { useCreateEditLocationDialogContext } from '-/components/dialogs/hooks/u
import { useKeyboardDialogContext } from '-/components/dialogs/hooks/useKeyboardDialogContext';
import { useLinkDialogContext } from '-/components/dialogs/hooks/useLinkDialogContext';
import { useNewFileDialogContext } from '-/components/dialogs/hooks/useNewFileDialogContext';
+import { historyKeys } from '-/hooks/HistoryContextProvider';
+import { useHistoryContext } from '-/hooks/useHistoryContext';
import { getDesktopMode } from '-/reducers/settings';
import { openURLExternally } from '-/services/utils-io';
import Box from '@mui/material/Box';
@@ -43,6 +45,7 @@ import Divider from '@mui/material/Divider';
import Grid from '@mui/material/Grid';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
+import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import Typography from '@mui/material/Typography';
@@ -51,8 +54,6 @@ import Links from 'assets/links';
import { useReducer } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
-import { useHistoryContext } from '-/hooks/useHistoryContext';
-import { historyKeys } from '-/hooks/HistoryContextProvider';
const PREFIX = 'WelcomePanel';
@@ -162,7 +163,7 @@ function WelcomePanel() {
return (
<List
dense={true}
- aria-label="useful link on welcome page"
+ aria-label="useful links in the welcome page"
style={{
height: 'calc(100% - 70px)',
marginTop: 45,
@@ -172,129 +173,158 @@ function WelcomePanel() {
backgroundColor: theme.palette.background.default,
}}
>
- <ListItem onClick={() => openNewFileDialog()}>
- <ListItemIcon>
- <CreateFileIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:create')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton onClick={() => openNewFileDialog()}>
+ <ListItemIcon>
+ <CreateFileIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:create')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem onClick={() => openCreateEditLocationDialog()}>
- <ListItemIcon>
- <LocalLocationIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('createLocationTitle')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton onClick={openCreateEditLocationDialog}>
+ <ListItemIcon>
+ <LocalLocationIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('createLocationTitle')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem onClick={() => openLinkDialog()}>
- <ListItemIcon>
- <OpenLinkIcon />
- </ListItemIcon>
- <ListItemText primary={t('openLink')} className={classes.listItem} />
+ <ListItem disablePadding>
+ <ListItemButton onClick={openLinkDialog}>
+ <ListItemIcon>
+ <OpenLinkIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('openLink')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
<Divider />
- <ListItem
- onClick={() =>
- openURLExternally(Links.documentationLinks.general, true)
- }
- >
- <ListItemIcon>
- <HelpIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('documentation')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() =>
+ openURLExternally(Links.documentationLinks.general, true)
+ }
+ >
+ <ListItemIcon>
+ <HelpIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('documentation')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem onClick={() => openKeyboardDialog()}>
- <ListItemIcon>
- <KeyShortcutsIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('shortcutKeys')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton onClick={openKeyboardDialog}>
+ <ListItemIcon>
+ <KeyShortcutsIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('shortcutKeys')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.changelogURL, true)}
- >
- <ListItemIcon>
- <ChangeLogIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:whatsNew')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.changelogURL, true)}
+ >
+ <ListItemIcon>
+ <ChangeLogIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:whatsNew')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.webClipper, true)}
- >
- <ListItemIcon>
- <WebClipperIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:webClipper')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.webClipper, true)}
+ >
+ <ListItemIcon>
+ <WebClipperIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:webClipper')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
<Divider />
- <ListItem
- onClick={() => openURLExternally(Links.links.suggestFeature, true)}
- >
- <ListItemIcon>
- <NewFeatureIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:suggestNewFeatures')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.suggestFeature, true)}
+ >
+ <ListItemIcon>
+ <NewFeatureIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:suggestNewFeatures')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.reportIssue, true)}
- >
- <ListItemIcon>
- <IssueIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:reportIssues')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.reportIssue, true)}
+ >
+ <ListItemIcon>
+ <IssueIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:reportIssues')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem
- onClick={() => openURLExternally(Links.links.helpTranslating, true)}
- >
- <ListItemIcon>
- <TranslationIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:helpWithTranslation')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.helpTranslating, true)}
+ >
+ <ListItemIcon>
+ <TranslationIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:helpWithTranslation')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
<Divider />
- <ListItem
- onClick={() => openURLExternally(Links.links.emailContact, true)}
- >
- <ListItemIcon>
- <EmailIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:emailContact')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.emailContact, true)}
+ >
+ <ListItemIcon>
+ <EmailIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:emailContact')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
- <ListItem onClick={() => openURLExternally(Links.links.twitter, true)}>
- <ListItemIcon>
- <XIcon />
- </ListItemIcon>
- <ListItemText
- primary={t('core:followOnX')}
- className={classes.listItem}
- />
+ <ListItem disablePadding>
+ <ListItemButton
+ onClick={() => openURLExternally(Links.links.twitter, true)}
+ >
+ <ListItemIcon>
+ <XIcon />
+ </ListItemIcon>
+ <ListItemText
+ primary={t('core:followOnX')}
+ className={classes.listItem}
+ />
+ </ListItemButton>
</ListItem>
</List>
);