Skip to content

Commit 74cca67

Browse files
authored
Add files via upload
1 parent 02e824b commit 74cca67

File tree

6 files changed

+1232
-0
lines changed

6 files changed

+1232
-0
lines changed

index.html

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>.:: GhzhHost Desktop APP ::.</title>
5+
<style>
6+
body {
7+
margin: 0;
8+
padding: 0;
9+
font-family: Arial, sans-serif;
10+
background-color: #f8f9fa;
11+
height: 100vh;
12+
display: flex;
13+
flex-direction: column;
14+
}
15+
.tabs {
16+
display: flex;
17+
background-color: #000a20;
18+
padding: 10px;
19+
position: relative;
20+
}
21+
.tab {
22+
padding: 10px 20px;
23+
cursor: pointer;
24+
border: 1px solid #00233f;
25+
margin-right: 5px;
26+
background-color: #00233f;
27+
transition: all 0.3s ease;
28+
position: relative;
29+
flex: 1;
30+
text-align: center;
31+
min-width: 0;
32+
color: #ffffff;
33+
font-weight: 500;
34+
}
35+
.tab:hover {
36+
background-color: #00547f;
37+
border-color: #00b2e8;
38+
}
39+
.tab.active {
40+
background-color: #00b2e8;
41+
color: #000a20;
42+
opacity: 0;
43+
pointer-events: none;
44+
position: absolute;
45+
width: 0;
46+
padding: 0;
47+
margin: 0;
48+
border: none;
49+
}
50+
.close-tab {
51+
margin-left: 10px;
52+
cursor: pointer;
53+
font-weight: bold;
54+
}
55+
.status-indicator {
56+
width: 10px;
57+
height: 10px;
58+
border-radius: 50%;
59+
margin-right: 10px;
60+
flex-shrink: 0;
61+
}
62+
.online {
63+
background-color: #00b2e8;
64+
}
65+
.offline {
66+
background-color: #ff0000;
67+
}
68+
.content-container {
69+
flex: 1;
70+
background-color: #fff;
71+
position: relative;
72+
}
73+
.dialog-overlay {
74+
display: none;
75+
position: fixed;
76+
top: 0;
77+
left: 0;
78+
width: 100%;
79+
height: 100%;
80+
background-color: rgba(0, 10, 32, 0.8);
81+
z-index: 1000;
82+
justify-content: center;
83+
align-items: center;
84+
}
85+
.dialog-box {
86+
background-color: #00233f;
87+
border: 2px solid #00b2e8;
88+
border-radius: 8px;
89+
padding: 20px;
90+
color: white;
91+
text-align: center;
92+
max-width: 400px;
93+
width: 90%;
94+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
95+
}
96+
.dialog-title {
97+
color: #00b2e8;
98+
margin-bottom: 15px;
99+
font-size: 1.5em;
100+
}
101+
.dialog-message {
102+
margin-bottom: 20px;
103+
line-height: 1.5;
104+
}
105+
.dialog-button {
106+
background-color: #00b2e8;
107+
color: #000a20;
108+
border: none;
109+
padding: 10px 20px;
110+
border-radius: 4px;
111+
cursor: pointer;
112+
font-weight: bold;
113+
transition: background-color 0.3s ease;
114+
}
115+
.dialog-button:hover {
116+
background-color: #00547f;
117+
color: white;
118+
}
119+
</style>
120+
</head>
121+
<body>
122+
<div class="tabs" id="tabsContainer">
123+
<div class="status-indicator" id="statusIndicator"></div>
124+
<div class="tab active" data-url="https://ghzhost.com/" onclick="switchTab(this)">Home</div>
125+
<div class="tab" data-url="https://mcp.ghzhost.com/" onclick="switchTab(this)">MCP</div>
126+
<div class="tab" data-url="https://gcp.ghzhost.com/" onclick="switchTab(this)">GCP</div>
127+
<div class="tab" data-url="https://wcp-s1br.ghzhost.com/" onclick="switchTab(this)">WCP</div>
128+
</div>
129+
130+
<div class="content-container" id="contentContainer">
131+
</div>
132+
133+
<div class="dialog-overlay" id="dialogOverlay">
134+
<div class="dialog-box">
135+
<div class="dialog-title">Sem Conexão com a Internet</div>
136+
<div class="dialog-message">
137+
Não foi possível conectar à internet. Por favor, verifique sua conexão e tente novamente.
138+
</div>
139+
<button class="dialog-button" onclick="hideDialog()">OK</button>
140+
</div>
141+
</div>
142+
143+
<script>
144+
const statusIndicator = document.getElementById('statusIndicator');
145+
const contentContainer = document.getElementById('contentContainer');
146+
const dialogOverlay = document.getElementById('dialogOverlay');
147+
let currentTab = null;
148+
149+
function showDialog() {
150+
dialogOverlay.style.display = 'flex';
151+
}
152+
153+
function hideDialog() {
154+
dialogOverlay.style.display = 'none';
155+
}
156+
157+
// Função para carregar a página inicial
158+
async function loadHomePage() {
159+
const homeTab = document.querySelector('.tab[data-url="https://ghzhost.com/"]');
160+
await switchTab(homeTab);
161+
}
162+
163+
// Carregar a página inicial assim que o documento estiver pronto
164+
document.addEventListener('DOMContentLoaded', loadHomePage);
165+
166+
// Também tentar carregar imediatamente
167+
loadHomePage();
168+
169+
async function switchTab(tabElement) {
170+
// Se clicou na mesma aba, não faz nada
171+
if (currentTab === tabElement) return;
172+
173+
// Restaurar a aba anterior se existir
174+
if (currentTab) {
175+
currentTab.classList.remove('active');
176+
}
177+
178+
// Atualizar a aba atual
179+
currentTab = tabElement;
180+
currentTab.classList.add('active');
181+
182+
// Load the new tab content
183+
const url = tabElement.getAttribute('data-url');
184+
await window.electronAPI.loadTab(url);
185+
}
186+
187+
// Listen for internet status updates
188+
window.electronAPI.onInternetStatus((event, isOnline) => {
189+
statusIndicator.className = `status-indicator ${isOnline ? 'online' : 'offline'}`;
190+
if (!isOnline) {
191+
showDialog();
192+
}
193+
});
194+
195+
// Initial internet check
196+
window.electronAPI.checkInternet().then(isOnline => {
197+
statusIndicator.className = `status-indicator ${isOnline ? 'online' : 'offline'}`;
198+
if (!isOnline) {
199+
showDialog();
200+
}
201+
});
202+
203+
// Listen for title updates
204+
window.electronAPI.onTitleUpdate((event, title) => {
205+
document.title = title;
206+
// Update the active tab text
207+
if (currentTab) {
208+
currentTab.textContent = title;
209+
}
210+
});
211+
</script>
212+
</body>
213+
</html>

logo.png

34.4 KB
Loading

0 commit comments

Comments
 (0)