-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoffline.html
More file actions
116 lines (102 loc) · 3.22 KB
/
offline.html
File metadata and controls
116 lines (102 loc) · 3.22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WE OS - Offline</title>
<style>
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
.offline-container {
max-width: 400px;
padding: 2rem;
background: rgba(255, 255, 255, 0.1);
border-radius: 20px;
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.offline-icon {
font-size: 4rem;
margin-bottom: 1rem;
}
h1 {
margin: 0 0 1rem 0;
font-size: 2rem;
font-weight: 300;
}
p {
margin: 0 0 2rem 0;
opacity: 0.8;
line-height: 1.5;
}
.retry-btn {
background: rgba(255, 255, 255, 0.2);
border: 1px solid rgba(255, 255, 255, 0.3);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 10px;
cursor: pointer;
font-size: 1rem;
transition: all 0.3s ease;
}
.retry-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-2px);
}
.features {
margin-top: 2rem;
text-align: left;
}
.feature {
margin: 0.5rem 0;
opacity: 0.7;
font-size: 0.9rem;
}
.feature::before {
content: "✓ ";
color: #4ade80;
font-weight: bold;
}
</style>
</head>
<body>
<div class="offline-container">
<div class="offline-icon">📱</div>
<h1>You're Offline</h1>
<p>No internet connection detected. Some features of WE OS may not be available, but you can still access cached content.</p>
<button class="retry-btn" onclick="window.location.reload()">
Try Again
</button>
<div class="features">
<div class="feature">Cached desktop interface available</div>
<div class="feature">Local applications still work</div>
<div class="feature">Data will sync when online</div>
</div>
</div>
<script>
// Check for connection and auto-reload
window.addEventListener('online', () => {
window.location.reload();
});
// Update UI based on connection status
function updateConnectionStatus() {
if (navigator.onLine) {
window.location.reload();
}
}
// Check connection periodically
setInterval(updateConnectionStatus, 5000);
</script>
</body>
</html>