-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
140 lines (136 loc) · 4.06 KB
/
Copy pathindex.html
File metadata and controls
140 lines (136 loc) · 4.06 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<title>GPG Bridge</title>
<style>
body {
font-family: Arial, sans-serif;
color: white;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
padding: 0;
position: relative;
background-color: #000000; /* Dark black background */
}
body::before {
content: "";
background-image: url("assets/bridge.png");
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
opacity: 0.50; /* Adjust this value to change the opacity (0.1 = 10% opacity) */
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
h1 {
color: white;
margin-bottom: 20px;
}
#passcode {
background-color: rgba(
255,
255,
255,
0.1
); /* Slightly visible white background */
padding: 10px;
border-radius: 10px;
text-align: left;
margin-bottom: 10px;
}
#status {
background-color: rgba(
255,
255,
255,
0.1
); /* Slightly visible white background */
padding: 20px;
border-radius: 10px;
text-align: center;
margin-bottom: 20px;
}
#log-container {
width: 400px; /* Set a fixed width */
height: 400px; /* Set height equal to width for square shape */
overflow-y: auto; /* Enable vertical scrolling if content exceeds height */
border: 1px solid rgba(255, 255, 255, 0.3);
border-radius: 10px; /* Add rounded corners */
padding: 10px;
background-color: rgba(0, 0, 0, 0.5);
font-family: monospace;
font-size: 11px;
line-height: 1.4;
white-space: pre-wrap; /* Preserve whitespace and wrap text */
word-break: break-all; /* Break long words to prevent horizontal scrolling */
}
.log-entry {
margin-bottom: 5px;
}
.error-log {
color: #ff6b6b;
}
/* Customize scrollbar for webkit browsers */
#log-container::-webkit-scrollbar {
width: 8px;
}
#log-container::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 0 10px 10px 0;
}
#log-container::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.3);
border-radius: 4px;
}
/* Add this new style for YubiKey messages */
#yubikey-message {
color: #00ff00; /* Bright green color */
font-weight: bold;
}
</style>
</head>
<body>
<h1>GPG Bridge</h1>
<!-- Updated YubiKey message div -->
<div id="yubikey-prompt" style="display: none">
<p id="yubikey-message"></p>
</div>
<div id="passcode"></div>
<div id="status">Checking server status...</div>
<div id="log-container"></div>
<script src="renderer.js"></script>
<script>
const logContainer = document.getElementById("log-container");
let lastLogMessage = "";
window.electronAPI.onLogMessage((message) => {
if (message !== lastLogMessage) {
lastLogMessage = message;
const logEntry = document.createElement("div");
logEntry.textContent = message;
logEntry.classList.add("log-entry");
if (message.includes("ERROR:")) {
logEntry.classList.add("error-log");
}
logContainer.appendChild(logEntry);
logContainer.scrollTop = logContainer.scrollHeight;
}
});
// Add a placeholder message if there are no logs
if (logContainer.childElementCount === 0) {
const placeholderEntry = document.createElement("div");
placeholderEntry.textContent = "";
placeholderEntry.classList.add("log-entry");
logContainer.appendChild(placeholderEntry);
}
</script>
</body>
</html>