check if on the web
This commit is contained in:
parent
accf97c38b
commit
21c5af6752
|
@ -8,6 +8,8 @@ import { PAGES } from 'constants/pages';
|
|||
import { useRouter } from 'next/router';
|
||||
import { AppContext } from 'pages/_app';
|
||||
import WatchModal from '../WatchModal';
|
||||
import isElectron from 'is-electron';
|
||||
import { downloadApp } from 'utils/common';
|
||||
|
||||
export default function UtilitySection({ closeSidebar }) {
|
||||
const router = useRouter();
|
||||
|
@ -24,7 +26,25 @@ export default function UtilitySection({ closeSidebar }) {
|
|||
const openTwoFactorModalView = () => setTwoFactorModalView(true);
|
||||
const closeTwoFactorModalView = () => setTwoFactorModalView(false);
|
||||
|
||||
const openWatchModalView = () => setWatchModalView(true);
|
||||
const openWatchModalView = () => {
|
||||
if (isElectron()) {
|
||||
setWatchModalView(true);
|
||||
} else {
|
||||
setDialogMessage({
|
||||
title: constants.DOWNLOAD_APP,
|
||||
content: constants.DOWNLOAD_APP_MESSAGE(),
|
||||
|
||||
proceed: {
|
||||
text: constants.DOWNLOAD,
|
||||
action: downloadApp,
|
||||
variant: 'success',
|
||||
},
|
||||
close: {
|
||||
text: constants.CLOSE,
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const redirectToChangePasswordPage = () => {
|
||||
closeSidebar();
|
||||
|
|
|
@ -237,7 +237,7 @@ const englishConstants = {
|
|||
DOWNLOAD_APP_MESSAGE: () => (
|
||||
<>
|
||||
<p>
|
||||
Sorry, this operation is currently only supported on our desktop
|
||||
Sorry, this feature is currently only supported on our desktop
|
||||
app
|
||||
</p>
|
||||
</>
|
||||
|
|
Loading…
Reference in a new issue