From 12426dd45df55a5bf46a67fad4cdf0d50fb6dd80 Mon Sep 17 00:00:00 2001 From: Yeon Vinzenz Varapragasam Date: Sat, 25 Sep 2021 15:34:11 +0200 Subject: [PATCH] fix type and cors --- main/background.ts | 3 ++- renderer/pages/home.jsx | 2 +- renderer/pages/yz.jsx | 2 +- renderer/styles/{LeftBar.styles.jsx => yz.styles.jsx} | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) rename renderer/styles/{LeftBar.styles.jsx => yz.styles.jsx} (99%) diff --git a/main/background.ts b/main/background.ts index 256c7f0..be40b5d 100644 --- a/main/background.ts +++ b/main/background.ts @@ -28,7 +28,8 @@ let tray = null; height: 800, titleBarStyle: "hidden", // <-- add this line if needed webPreferences: { - enableRemoteModule: true // <-- add this line + enableRemoteModule: true, // <-- add this line + webSecurity: false }, }); diff --git a/renderer/pages/home.jsx b/renderer/pages/home.jsx index 2dc1d98..58deacb 100644 --- a/renderer/pages/home.jsx +++ b/renderer/pages/home.jsx @@ -92,7 +92,7 @@ function Home() { useEffect(() => { bonjour = require('bonjour')() - bonjour.find({ type: 'http' }, (service) => { + bonjour.find({ type: 'wled' }, (service) => { if (service.referer && service.referer.address) { bonjour.destroy() setIp(service.referer.address) diff --git a/renderer/pages/yz.jsx b/renderer/pages/yz.jsx index f4d8844..3b95162 100644 --- a/renderer/pages/yz.jsx +++ b/renderer/pages/yz.jsx @@ -6,7 +6,7 @@ import { useRouter } from 'next/router'; import { ipcRenderer } from 'electron'; import { ChevronLeft, ChevronRight } from '@material-ui/icons'; import { Drawer, List, Divider, Card, Typography, Button } from '@material-ui/core'; -import useLeftBarStyles from '../styles/LeftBar.styles'; +import useLeftBarStyles from '../styles/yz.styles'; import { template } from '../components/MenuTemplate'; const LeftBar = () => { diff --git a/renderer/styles/LeftBar.styles.jsx b/renderer/styles/yz.styles.jsx similarity index 99% rename from renderer/styles/LeftBar.styles.jsx rename to renderer/styles/yz.styles.jsx index 63acd1c..27041b5 100644 --- a/renderer/styles/LeftBar.styles.jsx +++ b/renderer/styles/yz.styles.jsx @@ -76,6 +76,7 @@ const useLeftBarStyles = makeStyles((theme) => ({ width: 42, height: 42, border: '1px solid rgba(255, 255, 255, 0.12)', + borderLeft: 0, display: 'flex' }, contentShift: {