Skip to content
This repository was archived by the owner on May 2, 2022. It is now read-only.

Commit 4980cda

Browse files
authored
[WEB-62] Improve minor UI details in WebCatalog app (#1467)
1 parent 71d456f commit 4980cda

File tree

6 files changed

+34
-8
lines changed

6 files changed

+34
-8
lines changed

src/components/dialogs/dialog-catalog-app-details.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const DialogCatalogAppDetails = ({
8484
open,
8585
details,
8686
}) => {
87-
const shareUrl = details && !details.err ? `https://webcatalog.app/catalog/${details.id}` : '';
87+
const shareUrl = details && !details.err && details.url ? `https://webcatalog.io/webcatalog/apps/${details.id}/` : '';
8888
const hostname = details ? extractHostname(details.url) : null;
8989

9090
return (
@@ -187,7 +187,7 @@ const DialogCatalogAppDetails = ({
187187
)}
188188
</div>
189189

190-
{!details.id.startsWith('custom-') && (
190+
{!details.id.startsWith('custom-') && details.url && (
191191
<LinkSharing url={shareUrl} className={classes.shareInput} />
192192
)}
193193
</div>

src/components/pages/home/toolbar.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ const Toolbar = ({
8181
setSearchTerm,
8282
}) => {
8383
const categoryFilter = filters.find((filter) => filter.field === 'category');
84+
const typeFilter = filters.find((filter) => filter.field === 'type');
8485

8586
return (
8687
<div className={classes.root}>
@@ -95,6 +96,11 @@ const Toolbar = ({
9596
{categoryFilter.values[0]}
9697
</Typography>
9798
)}
99+
{!isLoading && categoryFilter == null && typeFilter && typeFilter.values[0] === 'Multisite' && (
100+
<Typography variant="body2" color="textSecondary" className={classes.statusText}>
101+
Spaces let you organize multiple services & accounts in one place.
102+
</Typography>
103+
)}
98104
</div>
99105
<div className={classes.right}>
100106
<Tooltip title="Refresh">

src/components/pages/preferences/section-sync.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const SectionSync = ({
6363
<ListItemAvatar>
6464
<Avatar alt={displayName} src={photoURL} />
6565
</ListItemAvatar>
66+
<ListItemText primary={displayName} secondary="-" />
6667
</ListItem>
6768
<Divider />
6869
<ListItem button onClick={() => requestOpenInBrowser('https://forms.gle/AAByYb4hYppP91YRA')}>

src/components/root/container.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ const styles = (theme) => ({
7575
});
7676

7777
const filters = [];
78-
// widevine is not supported on ARM64 Linux & Windows
79-
if (window.process.platform === 'win32' || (window.process.platform === 'linux' && window.process.platform !== 'x64')) {
80-
filters.push({ field: 'widevine', values: [0], type: 'all' });
81-
}
8278

8379
const Container = ({
8480
classes,

src/components/shared/app-card.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import HelpTooltip from './help-tooltip';
2020
import connectComponent from '../../helpers/connect-component';
2121
import isUrl from '../../helpers/is-url';
2222
import getEngineName from '../../helpers/get-engine-name';
23+
import isWidevineSupported from '../../helpers/is-widevine-supported';
2324

2425
import {
2526
INSTALLED,
@@ -321,7 +322,19 @@ const AppCard = (props) => {
321322
disabled={status !== null}
322323
onClick={(e) => {
323324
e.stopPropagation();
324-
onInstallApp(id, name, url, icon, combinedOpts);
325+
326+
// inform users that
327+
// widevine is not supported on Linux (ARM64) & Windows (x64 + arm64)
328+
if (!widevine || isWidevineSupported()) {
329+
onInstallApp(id, name, url, icon, combinedOpts);
330+
} else {
331+
window.remote.dialog.showMessageBox(window.remote.getCurrentWindow(), {
332+
message: `Due to technical limitations, ${name} app is not supported on this device.`,
333+
buttons: ['I Understand', 'Install Anyway'],
334+
cancelId: 0,
335+
defaultId: 0,
336+
}).catch(console.log); // eslint-disable-line
337+
}
325338
}}
326339
>
327340
{label}
@@ -371,7 +384,7 @@ const AppCard = (props) => {
371384
classes={{ root: classes.topLeft }}
372385
onClick={(e) => {
373386
e.stopPropagation();
374-
requestOpenInBrowser('https://help.webcatalog.app/article/18-what-is-the-difference-between-standard-apps-and-multisite-apps');
387+
requestOpenInBrowser('https://webcatalog.io/webcatalog/spaces/');
375388
}}
376389
>
377390
<GroupWorkIcon fontSize="small" />
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4+
// widevine is not supported on Linux (ARM64) & Windows (x64 + arm64)
5+
6+
const isWidevineSupported = () => !(
7+
window.process.platform === 'win32'
8+
|| (window.process.platform === 'linux' && window.process.platform !== 'x64'));
9+
10+
export default isWidevineSupported;

0 commit comments

Comments
 (0)