File size: 6,281 Bytes
eebf5c4 |
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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
/**
* استایلهای نمایش وضعیت اتصال و کاربران آنلاین
*/
/* === Connection Status Bar === */
.connection-status-bar {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 40px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
z-index: 9999;
font-size: 14px;
transition: all 0.3s ease;
}
.connection-status-bar.disconnected {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
0%, 100% { opacity: 1; }
50% { opacity: 0.8; }
}
/* === Status Dot === */
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 8px;
display: inline-block;
position: relative;
}
.status-dot-online {
background: #4ade80;
box-shadow: 0 0 10px #4ade80;
animation: pulse-green 2s infinite;
}
.status-dot-offline {
background: #f87171;
box-shadow: 0 0 10px #f87171;
}
@keyframes pulse-green {
0%, 100% {
box-shadow: 0 0 10px #4ade80;
}
50% {
box-shadow: 0 0 20px #4ade80, 0 0 30px #4ade80;
}
}
/* === Online Users Widget === */
.online-users-widget {
display: flex;
align-items: center;
gap: 15px;
background: rgba(255, 255, 255, 0.15);
padding: 5px 15px;
border-radius: 20px;
backdrop-filter: blur(10px);
}
.online-users-count {
display: flex;
align-items: center;
gap: 5px;
}
.users-icon {
font-size: 18px;
}
.count-number {
font-size: 18px;
font-weight: bold;
min-width: 30px;
text-align: center;
transition: all 0.3s ease;
}
.count-number.count-updated {
transform: scale(1.2);
color: #fbbf24;
}
.count-label {
font-size: 12px;
opacity: 0.9;
}
/* === Badge Pulse Animation === */
.badge.pulse {
animation: badge-pulse 1s ease;
}
@keyframes badge-pulse {
0% { transform: scale(1); }
50% { transform: scale(1.1); }
100% { transform: scale(1); }
}
/* === Connection Info === */
.ws-connection-info {
display: flex;
align-items: center;
gap: 10px;
}
.ws-status-text {
font-weight: 500;
}
/* === Floating Stats Card === */
.floating-stats-card {
position: fixed;
bottom: 20px;
right: 20px;
background: white;
border-radius: 15px;
box-shadow: 0 10px 40px rgba(0,0,0,0.15);
padding: 20px;
min-width: 280px;
z-index: 9998;
transition: all 0.3s ease;
direction: rtl;
}
.floating-stats-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}
.floating-stats-card.minimized {
padding: 10px;
min-width: 60px;
cursor: pointer;
}
.stats-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #f3f4f6;
}
.stats-card-title {
font-size: 16px;
font-weight: 600;
color: #1f2937;
}
.minimize-btn {
background: none;
border: none;
font-size: 20px;
cursor: pointer;
color: #6b7280;
transition: transform 0.3s;
}
.minimize-btn:hover {
transform: rotate(90deg);
}
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 15px;
}
.stat-item {
text-align: center;
padding: 10px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 10px;
color: white;
}
.stat-value {
font-size: 28px;
font-weight: bold;
display: block;
margin-bottom: 5px;
}
.stat-label {
font-size: 12px;
opacity: 0.9;
}
/* === Client Types List === */
.client-types-list {
margin-top: 15px;
padding-top: 15px;
border-top: 2px solid #f3f4f6;
}
.client-type-item {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid #f3f4f6;
}
.client-type-item:last-child {
border-bottom: none;
}
.client-type-name {
color: #6b7280;
font-size: 14px;
}
.client-type-count {
font-weight: 600;
color: #1f2937;
background: #f3f4f6;
padding: 2px 10px;
border-radius: 12px;
}
/* === Alerts Container === */
.alerts-container {
position: fixed;
top: 50px;
right: 20px;
z-index: 9997;
max-width: 400px;
}
.alert {
margin-bottom: 10px;
animation: slideIn 0.3s ease;
}
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* === Reconnect Button === */
.reconnect-btn {
margin-right: 10px;
animation: bounce 1s infinite;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-5px); }
}
/* === Loading Spinner === */
.connection-spinner {
width: 16px;
height: 16px;
border: 2px solid rgba(255,255,255,0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-right: 8px;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* === Responsive === */
@media (max-width: 768px) {
.connection-status-bar {
font-size: 12px;
padding: 0 10px;
}
.online-users-widget {
padding: 3px 10px;
gap: 8px;
}
.floating-stats-card {
bottom: 10px;
right: 10px;
min-width: 240px;
}
.count-number {
font-size: 16px;
}
}
/* === Dark Mode Support === */
@media (prefers-color-scheme: dark) {
.floating-stats-card {
background: #1f2937;
color: white;
}
.stats-card-title {
color: white;
}
.client-type-name {
color: #d1d5db;
}
.client-type-count {
background: #374151;
color: white;
}
}
|