diff --git a/main.js b/main.js index 5963102..5fd746c 100644 --- a/main.js +++ b/main.js @@ -201,6 +201,7 @@ function createOperatorWindow() { }); // operatorWin.webContents.openDevTools(); + operatorWin.webContents.executeJavaScript('localStorage.setItem("version","' + app.getVersion() + '")'); operatorWin.loadFile('operator.html'); @@ -264,8 +265,6 @@ function createFloatingWindow() { floatingWin.loadFile('floating.html'); - floatingWin.webContents.executeJavaScript('localStorage.setItem("version","' + app.getVersion() + '")'); - // Envia a contagem inicial para a janela flutuante const data = readData(); floatingWin.webContents.on('did-finish-load', () => { diff --git a/operator.html b/operator.html index a338341..d9ed711 100644 --- a/operator.html +++ b/operator.html @@ -19,6 +19,14 @@ +   +

+ Iniciar automaticamente com o sistema +

+ @@ -29,11 +37,11 @@ diff --git a/style.css b/style.css index 7d17be8..fd62a23 100644 --- a/style.css +++ b/style.css @@ -301,3 +301,66 @@ button{ #save-button:hover{ background-color: var(--warning-color); } + +/* Estilo do Switch */ +.switch { + position: relative; + display: inline-block; + width: 60px; + height: 34px; + z-index: 1; /* Garante que o switch esteja acima de outros elementos */ +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + -webkit-transition: .4s; + transition: .4s; +} + +.slider:before { + position: absolute; + content: ""; + height: 26px; + width: 26px; + left: 4px; + bottom: 4px; + background-color: white; + -webkit-transition: .4s; + transition: .4s; +} + +input:checked + .slider { + background-color: var(--success-color); +} + +input:focus + .slider { + box-shadow: 0 0 1px var(--success-color); +} + +input:checked + .slider:before { + -webkit-transform: translateX(26px); + -ms-transform: translateX(26px); + transform: translateX(26px); +} + +/* Rounded sliders */ +.slider.round { + border-radius: 34px; + /* width: 60px; */ +} + +.slider.round:before { + border-radius: 50%; +} \ No newline at end of file