mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 10:53:51 +00:00
small fixes + improvements
- open link in external browser - stop app from running after install - fix lowercase path - fix bug on file upload
This commit is contained in:
@@ -15,6 +15,12 @@ export default function InfoNif() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
const baseURL = `http://__IP__:${isDev ? 3000 : 4001}`;
|
||||
|
||||
const handleLink = (url) => {
|
||||
if (window.process.type === 'renderer') {
|
||||
window.ipcRenderer.send('send-to-link', url);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={style.container}>
|
||||
<div className={style.header}>
|
||||
@@ -33,9 +39,10 @@ export default function InfoNif() {
|
||||
{data?.networkInterfaces.map((e) => {
|
||||
return (
|
||||
<a
|
||||
href={baseURL.replace('__IP__', e.address)}
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
href='/'
|
||||
onClick={() =>
|
||||
handleLink(baseURL.replace('__IP__', e.address))
|
||||
}
|
||||
className={style.if}
|
||||
>{`${e.name} - ${e.address}`}</a>
|
||||
);
|
||||
|
||||
@@ -12,9 +12,6 @@ import HelpIconBtn from './buttons/HelpIconBtn';
|
||||
import UploadIconBtn from './buttons/UploadIconBtn';
|
||||
import { useRef } from 'react';
|
||||
|
||||
// const { ipcRenderer } = window.require('electron');
|
||||
// import { ipcRenderer, remote }from 'electron';
|
||||
|
||||
export default function MenuBar(props) {
|
||||
const { onOpen } = props;
|
||||
const hiddenFileInput = useRef(null);
|
||||
|
||||
Reference in New Issue
Block a user