TagSpaces is an offline, open source, document manager with tagging support
chore: added follow us on mastodon functionality
Ilian Sapundshievc39d54a0b036
diff --git a/assets/links.ts b/assets/links.tsindex d207fd18f..8b0843d19 100644--- a/assets/links.ts+++ b/assets/links.ts@@ -53,7 +53,8 @@ const Links = {webClipperFirefox:'https://addons.mozilla.org/en-US/firefox/addon/tagspaces/',webClipper: 'https://www.tagspaces.org/products/webclipper/' + urlParams,- twitter: 'https://twitter.com/tagspaces',+ twitter: 'https://x.com/tagspaces',+ mastodon: 'https://fosstodon.org/@tagspaces',emailContact: 'mailto:[email protected]?subject=App',cancelSubscription:'mailto:[email protected]?subject=Cancel%20subscription&body=Please%20enter%20here%20you%20order%20ID%20or%20the%20email%20with%20which%20the%20purchase%20was%20made.', // 'https://fastspring.com/consumer-support-form/?ulCase.Primary_Category__c=Cancel%20/%20Refund&Case.Category__c=Cancel%20Subscription'diff --git a/src/main/electron-menus.ts b/src/main/electron-menus.tsindex 282ea8035..db6a6606b 100644--- a/src/main/electron-menus.ts+++ b/src/main/electron-menus.ts@@ -211,6 +211,12 @@ export default function buildDesktopMenu(props: any, i18n) {shell.openExternal(Links.links.changelogURL);},},+ {+ label: '&' + i18n.t('followOnMastodon'),+ click: () => {+ shell.openExternal(Links.links.mastodon);+ },+ },{label: '&' + i18n.t('followOnX'),click: () => {diff --git a/src/renderer/components/CommonIcons.tsx b/src/renderer/components/CommonIcons.tsxindex 33e30ae4d..0033eac58 100644--- a/src/renderer/components/CommonIcons.tsx+++ b/src/renderer/components/CommonIcons.tsx@@ -19,6 +19,7 @@import ExportIcon from '@mui/icons-material/ExitToApp';import KeyboardReturnIcon from '@mui/icons-material/KeyboardReturn';import MarkdownRawIcon from '@mui/icons-material/SimCardDownloadOutlined';+import SvgIcon from '@mui/material/SvgIcon';export const ParentFolderIcon = (props) => (<KeyboardReturnIcon sx={{ transform: 'rotate(90deg)' }} {...props} />@@ -315,3 +316,22 @@ export { default as PinGroupingOffIcon } from '@mui/icons-material/Grain'; // Scexport { default as PinGroupingOnIcon } from '@mui/icons-material/ScatterPlotTwoTone';export { default as CopyToClipboardIcon } from '@mui/icons-material/ContentCopy';++export const MastodonIcon = (props) => (+ <SvgIcon>+ <svg+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="currentColor"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M 22.767835,5.656102 C 22.437586,3.2278293 20.298066,1.3141865 17.761829,0.94337338 17.333936,0.88071441 15.712708,0.6526794 11.957146,0.6526794 h -0.02804 c -3.7565788,0 -4.5625276,0.22803501 -4.9904209,0.29069398 C 4.4730526,1.3039152 2.2213928,3.0234214 1.6750926,5.4804304 1.412329,6.6904556 1.384287,8.0319662 1.4331009,9.2625334 c 0.069586,1.7647076 0.083087,3.5263166 0.2451076,5.2838396 0.1120088,1.167433 0.3074058,2.325564 0.5847276,3.465704 0.5192949,2.105736 2.6214069,3.858102 4.6809295,4.573042 2.2050327,0.745568 4.5763474,0.869316 6.8484844,0.357457 0.249933,-0.05751 0.49714,-0.1243 0.741539,-0.200299 0.551497,-0.173585 1.198551,-0.367742 1.674222,-0.70877 0.0065,-0.0048 0.01188,-0.01095 0.01564,-0.01808 0.0037,-0.0071 0.0059,-0.01497 0.0061,-0.02301 v -1.703052 c -1.17e-4,-0.0075 -0.0019,-0.0149 -0.0052,-0.02161 -0.0034,-0.0067 -0.0082,-0.01264 -0.01422,-0.01724 -0.006,-0.0047 -0.01292,-0.0079 -0.02031,-0.0095 -0.0074,-0.0016 -0.01509,-0.0016 -0.02249,8.7e-5 -1.455727,0.343925 -2.947469,0.516322 -4.444136,0.513599 -2.5757007,0 -3.2684481,-1.208983 -3.466836,-1.712323 -0.1594451,-0.434993 -0.2607103,-0.88873 -0.3011869,-1.349711 -3.946e-4,-0.0077 0.00105,-0.01547 0.00419,-0.02257 0.00315,-0.0071 0.00801,-0.01333 0.01405,-0.01823 0.0061,-0.0049 0.01324,-0.0083 0.020884,-0.01 0.00763,-0.0017 0.015584,-0.0015 0.023181,4.27e-4 1.4314771,0.341579 2.8988799,0.513976 4.3714409,0.513599 0.354153,0 0.707263,0 1.061445,-0.0092 1.481021,-0.04109 3.042012,-0.116071 4.499159,-0.397527 0.03636,-0.0071 0.0727,-0.01335 0.103873,-0.0226 2.298387,-0.436556 4.485657,-1.806809 4.707919,-5.276656 0.0083,-0.136613 0.02909,-1.430866 0.02909,-1.572609 10e-4,-0.481756 0.156838,-3.4174307 -0.02286,-5.2211683 z m -3.537443,8.658129 H 16.813616 V 8.4592788 c 0,-1.232625 -0.519307,-1.8612513 -1.575565,-1.8612513 -1.161144,0 -1.742746,0.7436835 -1.742746,2.2125359 v 3.2048176 h -2.40226 V 8.8105634 c 0,-1.4688524 -0.582643,-2.2125359 -1.7437891,-2.2125359 -1.05003,0 -1.5745237,0.6286263 -1.5755664,1.8612513 V 14.314231 H 5.3589707 V 8.2815796 c 0,-1.232625 0.318167,-2.2118695 0.9544715,-2.9377629 0.656384,-0.7241546 1.5173843,-1.0959818 2.5861022,-1.0959818 1.2369456,0 2.1716836,0.4704268 2.7948336,1.4103244 l 0.601362,0.9984252 0.602375,-0.9984252 c 0.623151,-0.9398976 1.557891,-1.4103244 2.792776,-1.4103244 1.067674,0 1.928646,0.3718272 2.587115,1.0959818 0.636334,0.7251983 0.954472,1.7044428 0.954472,2.9377629 z"+ fill="inherit"+ id="path148"+ style={{ strokeWidth: 0.289743 }}+ />+ </svg>+ </SvgIcon>+);diff --git a/src/renderer/components/HelpFeedbackPanel.tsx b/src/renderer/components/HelpFeedbackPanel.tsxindex a68c5b360..afe96dac7 100644--- a/src/renderer/components/HelpFeedbackPanel.tsx+++ b/src/renderer/components/HelpFeedbackPanel.tsx@@ -25,6 +25,7 @@ import {HelpIcon,IssueIcon,KeyShortcutsIcon,+ MastodonIcon,NewFeatureIcon,OnboardingIcon,ProTeaserIcon,@@ -38,13 +39,12 @@ import { useOnboardingDialogContext } from '-/components/dialogs/hooks/useOnboarimport { useProTeaserDialogContext } from '-/components/dialogs/hooks/useProTeaserDialogContext';import { Pro } from '-/pro';import { openURLExternally } from '-/services/utils-io';-import { Box } from '@mui/material';+import { Box, ListItemText } 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';import Links from 'assets/links';import { useTranslation } from 'react-i18next';@@ -76,7 +76,7 @@ function HelpFeedbackPanel(props: Props) {><SidePanelTitle title={t('core:helpFeedback')} /><List- dense={false}+ densecomponent="nav"aria-label="main help area"sx={{@@ -93,9 +93,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><AboutIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:aboutTagSpaces')}- </Typography>+ <ListItemText>{t('core:aboutTagSpaces')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -107,9 +105,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><HelpIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:documentation')}- </Typography>+ <ListItemText>{t('core:documentation')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -117,9 +113,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><KeyShortcutsIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:shortcutKeys')}- </Typography>+ <ListItemText>{t('core:shortcutKeys')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -129,9 +123,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><ChangeLogIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:whatsNew')}- </Typography>+ <ListItemText>{t('core:whatsNew')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -139,9 +131,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><OnboardingIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:onboardingWizard')}- </Typography>+ <ListItemText>{t('core:onboardingWizard')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -151,9 +141,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><WebClipperIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:webClipper')}- </Typography>+ <ListItemText>{t('core:webClipper')}</ListItemText></ListItemButton></ListItem><Divider />@@ -164,9 +152,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><NewFeatureIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:suggestNewFeatures')}- </Typography>+ <ListItemText>{t('core:suggestNewFeatures')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -176,9 +162,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><ForumIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:forums')}- </Typography>+ <ListItemText>{t('core:forums')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -188,9 +172,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><IssueIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:reportIssues')}- </Typography>+ <ListItemText>{t('core:reportIssues')}</ListItemText></ListItemButton></ListItem><ListItem disablePadding>@@ -200,9 +182,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><TranslationIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:helpWithTranslation')}- </Typography>+ <ListItemText>{t('core:helpWithTranslation')}</ListItemText></ListItemButton></ListItem><Divider />@@ -213,9 +193,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><EmailIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:emailContact')}- </Typography>+ <ListItemText>{t('core:emailContact')}</ListItemText></ListItemButton></ListItem>{Pro && (@@ -228,12 +206,20 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><CancelSubscriptionIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:cancelSubscription')}- </Typography>+ <ListItemText>{t('core:cancelSubscription')}</ListItemText></ListItemButton></ListItem>)}+ <ListItem disablePadding>+ <ListItemButton+ onClick={() => openURLExternally(Links.links.mastodon, true)}+ >+ <ListItemIcon>+ <MastodonIcon color="action" />+ </ListItemIcon>+ <ListItemText primary={t('core:followOnMastodon')} />+ </ListItemButton>+ </ListItem><ListItem disablePadding><ListItemButtononClick={() => openURLExternally(Links.links.twitter, true)}@@ -241,9 +227,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><XIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('core:followOnX')}- </Typography>+ <ListItemText>{t('core:followOnX')}</ListItemText></ListItemButton></ListItem><Divider />@@ -252,9 +236,7 @@ function HelpFeedbackPanel(props: Props) {<ListItemIcon><ProTeaserIcon /></ListItemIcon>- <Typography sx={{ color: theme.palette.text.primary }}>- {t('achieveMore') + ' TagSpaces Pro'}- </Typography>+ <ListItemText>{t('achieveMore') + ' TagSpaces Pro'}</ListItemText></ListItemButton></ListItem></List>diff --git a/src/renderer/components/WelcomePanel.tsx b/src/renderer/components/WelcomePanel.tsxindex d96821dd4..37d8e8fd5 100644--- a/src/renderer/components/WelcomePanel.tsx+++ b/src/renderer/components/WelcomePanel.tsx@@ -24,6 +24,7 @@ import {IssueIcon,KeyShortcutsIcon,LocalLocationIcon,+ MastodonIcon,NewFeatureIcon,OpenLinkIcon,TranslationIcon,@@ -162,7 +163,7 @@ function WelcomePanel() {function renderQuickLinks() {return (<List- dense={true}+ densearia-label="useful links in the welcome page"style={{height: 'calc(100% - 70px)',@@ -313,6 +314,19 @@ function WelcomePanel() {/></ListItemButton></ListItem>+ <ListItem disablePadding>+ <ListItemButton+ onClick={() => openURLExternally(Links.links.mastodon, true)}+ >+ <ListItemIcon>+ <MastodonIcon color="action" />+ </ListItemIcon>+ <ListItemText+ primary={t('core:followOnMastodon')}+ className={classes.listItem}+ />+ </ListItemButton>+ </ListItem><ListItem disablePadding><ListItemButtononClick={() => openURLExternally(Links.links.twitter, true)}diff --git a/src/renderer/locales/en/core.json b/src/renderer/locales/en/core.jsonindex 5e9c49c7d..b767611b0 100644--- a/src/renderer/locales/en/core.json+++ b/src/renderer/locales/en/core.json@@ -203,6 +203,7 @@"reportIssues": "Report a problem","forums": "Forums","followOnX": "Follow us on X",+ "followOnMastodon": "Follow us on Mastodon","searchPlaceholder": "Search current location","tagSearchOR": "At least one tag","tagSearchORTitle": "Entry should contain at least one of the tags (OR search)",