Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Cross-promote Squeezer app (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
quanglam2807 authored Feb 22, 2021
1 parent c738954 commit be55989
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/components/pages/preferences/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import {
import webcatalogIconPng from '../../../images/products/[email protected]';
import translatiumIconPng from '../../../images/products/[email protected]';
import singleboxIconPng from '../../../images/products/[email protected]';
import squeezerIconPng from '../../../images/products/[email protected]';
import cloveryIconPng from '../../../images/products/[email protected]';
import dynamailIconPng from '../../../images/products/[email protected]';
import dynacalIconPng from '../../../images/products/[email protected]';
Expand Down Expand Up @@ -517,6 +518,39 @@ const Preferences = (props) => {
</ListItem>
</>
)}
{!window.process.windowsStore && (
<>
<Divider />
<ListItem
button
onClick={() => {
let url = `https://squeezer.app?utm_source=${utmSource}`;
if (window.process.mas) {
url = 'macappstore://apps.apple.com/us/app/squeezer-image-compression/id1554751184';
}
requestOpenInBrowser(url);
}}
className={classes.listItemPromotion}
>
<div className={classes.promotionBlock}>
<div className={classes.promotionLeft}>
<img src={squeezerIconPng} alt="Squeezer" className={classes.appIcon} />
</div>
<div className={classes.promotionRight}>
<div>
<Typography variant="body1" className={classes.appTitle}>
Squeezer
</Typography>
<Typography variant="body2" color="textSecondary">
Compress, Resize, Convert Images
</Typography>
</div>
</div>
</div>
<ChevronRightIcon color="action" />
</ListItem>
</>
)}
<Divider />
<ListItem
button
Expand Down Expand Up @@ -682,24 +716,34 @@ const Preferences = (props) => {
<List dense disablePadding>
<ListItem button>
<ListItemText primary={getLocale('about')} onClick={onOpenDialogAbout} />
<ChevronRightIcon color="action" />
</ListItem>
<Divider />
<ListItem button>
<ListItemText primary={getLocale('website')} onClick={() => requestOpenInBrowser('https://translatium.app?utm_source=translatium_app')} />
<ChevronRightIcon color="action" />
</ListItem>
<Divider />
<ListItem button>
<ListItemText primary={getLocale('support')} onClick={() => requestOpenInBrowser('https://translatium.app/support?utm_source=translatium_app')} />
<ChevronRightIcon color="action" />
</ListItem>
<Divider />
<ListItem button onClick={() => requestOpenInBrowser(`https://webcatalog.app/privacy?utm_source=${utmSource}`)}>
<ListItemText primary="Privacy Policy" />
<ChevronRightIcon color="action" />
</ListItem>
<Divider />
<ListItem button>
<ListItemText primary="Open Source Notices" onClick={onOpenDialogOpenSourceNotices} />
<ChevronRightIcon color="action" />
</ListItem>
{window.process.mas && (
<>
<Divider />
<ListItem button>
<ListItemText primary={getLocale('rateMacAppStore')} onClick={() => requestOpenInBrowser('macappstore://apps.apple.com/app/id1547052291?action=write-review')} />
<ChevronRightIcon color="action" />
</ListItem>
</>
)}
Expand All @@ -708,12 +752,14 @@ const Preferences = (props) => {
<Divider />
<ListItem button>
<ListItemText primary={getLocale('rateMicrosoftStore')} onClick={() => requestOpenInBrowser('ms-windows-store://review/?ProductId=9wzdncrcsg9k')} />
<ChevronRightIcon color="action" />
</ListItem>
</>
)}
<Divider />
<ListItem button>
<ListItemText primary={getLocale('quit')} onClick={() => window.remote.app.quit()} />
<ChevronRightIcon color="action" />
</ListItem>
</List>
</Paper>
Expand Down
Binary file added src/images/products/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit be55989

Please sign in to comment.