diff --git a/assets/icons/openinappicon.svg b/assets/icons/openinappicon.svg
new file mode 100644
index 0000000..28251b8
--- /dev/null
+++ b/assets/icons/openinappicon.svg
@@ -0,0 +1,26 @@
+
+
+
diff --git a/assets/icons/openinbrowsericon.svg b/assets/icons/openinbrowsericon.svg
new file mode 100644
index 0000000..0ad76b0
--- /dev/null
+++ b/assets/icons/openinbrowsericon.svg
@@ -0,0 +1,13 @@
+
+
+
diff --git a/src/components/Dashboard/common/DashboardNavigation.jsx b/src/components/Dashboard/common/DashboardNavigation.jsx
index 79a4e4a..35ab1e1 100644
--- a/src/components/Dashboard/common/DashboardNavigation.jsx
+++ b/src/components/Dashboard/common/DashboardNavigation.jsx
@@ -38,6 +38,7 @@ import SettingsIcon from '../../Icons/SettingsIcon'
import DeveloperIcon from '../../Icons/DeveloperIcon'
import { ElectronContext } from '../context/ElectronContext'
import DashboardWindowButtons from './DashboardWindowButtons'
+import WebAppSwitcher from './WebAppSwitcher'
import {
getSidebarDefaultPath,
getSidebarMenuSections
@@ -223,6 +224,7 @@ const DashboardNavigation = () => {
style={{ marginTop: '-2px', marginRight: '6px' }}
>
+
{
+ const { isElectron, openExternalUrl } = useContext(ElectronContext)
+ const location = useLocation()
+ const navigate = useNavigate()
+
+ const getCurrentPath = () =>
+ `${location.pathname}${location.search}${location.hash}`
+
+ const handleClick = () => {
+ const path = getCurrentPath()
+
+ if (isElectron) {
+ const url = window.location.protocol.startsWith('http')
+ ? `${window.location.origin}${path}`
+ : `${config.webAppUrl}${path}`
+
+ openExternalUrl(url)
+ return
+ }
+
+ const redirectType =
+ import.meta.env.MODE === 'development' ? 'app-localhost' : 'app-scheme'
+ const redirect =
+ redirectType === 'app-localhost'
+ ? `http://localhost:3500${path}`
+ : `farmcontrol://app${path}`
+
+ const params = new URLSearchParams({
+ redirect,
+ redirectType
+ })
+
+ navigate(`/applaunch?${params.toString()}`)
+ }
+
+ return (
+
+ : }
+ type='text'
+ style={{ marginTop: '2px' }}
+ onClick={handleClick}
+ />
+
+ )
+}
+
+export default WebAppSwitcher
diff --git a/src/components/Icons/OpenInAppIcon.jsx b/src/components/Icons/OpenInAppIcon.jsx
new file mode 100644
index 0000000..ceb8668
--- /dev/null
+++ b/src/components/Icons/OpenInAppIcon.jsx
@@ -0,0 +1,6 @@
+import Icon from '@ant-design/icons'
+import CustomIconSvg from '../../../assets/icons/openinappicon.svg?react'
+
+const OpenInAppIcon = (props) =>
+
+export default OpenInAppIcon
diff --git a/src/components/Icons/OpenInBrowserIcon.jsx b/src/components/Icons/OpenInBrowserIcon.jsx
new file mode 100644
index 0000000..652300b
--- /dev/null
+++ b/src/components/Icons/OpenInBrowserIcon.jsx
@@ -0,0 +1,8 @@
+import Icon from '@ant-design/icons'
+import CustomIconSvg from '../../../assets/icons/openinbrowsericon.svg?react'
+
+const OpenInBrowserIcon = (props) => (
+
+)
+
+export default OpenInBrowserIcon
diff --git a/src/config.js b/src/config.js
index 32bc8b0..8de831b 100644
--- a/src/config.js
+++ b/src/config.js
@@ -1,12 +1,14 @@
const config = {
development: {
backendUrl: 'https://dev.tombutcher.work/api',
+ webAppUrl: 'https://dev.tombutcher.work',
printServerUrl: 'ws://192.168.68.53:8081',
apiServerUrl: 'https://dev-wss.tombutcher.work',
logLevel: 'trace'
},
production: {
backendUrl: 'https://api.farmcontrol.app',
+ webAppUrl: 'https://web.farmcontrol.app',
printServerUrl: 'ws://192.168.68.53:8081',
apiServerUrl: 'https://ws.farmcontrol.app',
logLevel: 'error'