-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecond.html
69 lines (66 loc) · 2.51 KB
/
second.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Widget-desk</title>
</head>
<body>
<style>
body {
overflow: hidden; /* Oculta las barras de desplazamiento */
}
img {
-webkit-user-drag:none;
/*user-drag: none; /* Deshabilita el arrastre de la imagen */
/*pointer-events: none; /*Evita la interacción con la imagen, si es necesario */
cursor: pointer;
/* box-shadow: 0px 0px 0px 1px rgba(255, 255, 255, 1) inset; */
/* background-color: rgba(255, 255, 255, 0.2); */
backdrop-filter: blur(5px);
/* border: 2px solid #09244b; */
border-radius: 10px;
width: 92%;
height: auto;
display: block;
margin-top: 5px;
margin-left: 9px;
}
.drag-area {
position: relative;
display: block;
-webkit-app-region: drag; /* Permite arrastrar la ventana */
width: 10px;
height: 10px;
background-color: #2196f3;
z-index: 1;
border-radius: 100%;
top: 8px;
left: 8px;
box-shadow: 0 0 5px rgba(255, 255, 255, 0.7),
0 0 10px rgba(255, 255, 255, 0.5),
0 0 15px rgba(255, 255, 255, 0.3);
}
</style>
<div class="drag-area"></div>
<img
id="widget-desk"
src="./images/Component-flotante/icono.png"
alt="widget-desk"
/>
<script>
const { ipcRenderer } = require('electron');
const image = document.querySelector("img");
image.addEventListener("dragstart", (event) => {
event.preventDefault(); // Evita que la imagen se arrastre
});
// Selecciona el ícono y añade un event listener al clic
const widgetIcon = document.getElementById('widget-desk');
widgetIcon.addEventListener('click', () => {
// Enviar mensaje al proceso principal para mostrar la ventana principal
ipcRenderer.send('show-main-window');
});
</script>
</body>
</html>