mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-22 07:29:08 +00:00
config: small improvements
- added small improvements to installation - show custom icons on install / uninstall - handle developer tools in app
This commit is contained in:
+18
-1
@@ -1,9 +1,10 @@
|
|||||||
import { lazy, Suspense } from 'react';
|
import { lazy, Suspense, useEffect } from 'react';
|
||||||
import { Route, Switch } from 'react-router-dom';
|
import { Route, Switch } from 'react-router-dom';
|
||||||
import './App.css';
|
import './App.css';
|
||||||
import { QueryClient, QueryClientProvider } from 'react-query';
|
import { QueryClient, QueryClientProvider } from 'react-query';
|
||||||
import SocketProvider from 'app/context/socketContext';
|
import SocketProvider from 'app/context/socketContext';
|
||||||
import withSocket from 'features/viewers/ViewWrapper';
|
import withSocket from 'features/viewers/ViewWrapper';
|
||||||
|
import tinykeys from 'tinykeys';
|
||||||
|
|
||||||
const Editor = lazy(() => import('features/editors/Editor'));
|
const Editor = lazy(() => import('features/editors/Editor'));
|
||||||
const PresenterView = lazy(() =>
|
const PresenterView = lazy(() =>
|
||||||
@@ -36,6 +37,22 @@ const SLowerThird = withSocket(Lower);
|
|||||||
const SPip = withSocket(Pip);
|
const SPip = withSocket(Pip);
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
useEffect(() => {
|
||||||
|
let unsubscribe = tinykeys(window, {
|
||||||
|
'Alt+t': () => {
|
||||||
|
// if we are in electron
|
||||||
|
if (window.process?.type === undefined) return;
|
||||||
|
if (window.process.type === 'renderer') {
|
||||||
|
// ask to see debug
|
||||||
|
window.ipcRenderer.send('set-window', 'show-dev');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return () => {
|
||||||
|
unsubscribe();
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SocketProvider>
|
<SocketProvider>
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
+3
-5
@@ -129,11 +129,6 @@ app.whenReady().then(() => {
|
|||||||
win.focus();
|
win.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
globalShortcut.register('Alt+t', () => {
|
|
||||||
// Show dev tools
|
|
||||||
win.webContents.openDevTools({ mode: 'detach' });
|
|
||||||
});
|
|
||||||
|
|
||||||
// recreate window if no others open
|
// recreate window if no others open
|
||||||
app.on('activate', () => {
|
app.on('activate', () => {
|
||||||
if (BrowserWindow.getAllWindows().length === 0) {
|
if (BrowserWindow.getAllWindows().length === 0) {
|
||||||
@@ -245,6 +240,9 @@ ipcMain.on('set-window', (event, arg) => {
|
|||||||
} else if (arg === 'to-tray') {
|
} else if (arg === 'to-tray') {
|
||||||
// window to tray
|
// window to tray
|
||||||
win.hide();
|
win.hide();
|
||||||
|
} else if (arg === 'show-dev') {
|
||||||
|
// Show dev tools
|
||||||
|
win.webContents.openDevTools({ mode: 'detach' });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -54,7 +54,9 @@
|
|||||||
"createStartMenuShortcut": true,
|
"createStartMenuShortcut": true,
|
||||||
"deleteAppDataOnUninstall": true,
|
"deleteAppDataOnUninstall": true,
|
||||||
"runAfterFinish": false,
|
"runAfterFinish": false,
|
||||||
"installerIcon": "icon.ico"
|
"installerIcon": "icon.ico",
|
||||||
|
"installerSidebar": "ontime-install.bmp",
|
||||||
|
"uninstallerSidebar": "ontime-uninstall.bmp"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"**/*",
|
"**/*",
|
||||||
|
|||||||
Reference in New Issue
Block a user