Add 2 files
Browse files- README.md +6 -4
- index.html +1786 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: app
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: pink
|
| 5 |
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,1786 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ru">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Мой Органайзер</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
/* Кастомные стили */
|
| 11 |
+
.phone-mockup {
|
| 12 |
+
width: 350px;
|
| 13 |
+
height: 700px;
|
| 14 |
+
border-radius: 40px;
|
| 15 |
+
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
|
| 16 |
+
position: relative;
|
| 17 |
+
overflow: hidden;
|
| 18 |
+
background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
|
| 19 |
+
border: 12px solid #1e293b;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.phone-notch {
|
| 23 |
+
width: 180px;
|
| 24 |
+
height: 30px;
|
| 25 |
+
background: #1e293b;
|
| 26 |
+
border-radius: 0 0 20px 20px;
|
| 27 |
+
position: absolute;
|
| 28 |
+
top: 0;
|
| 29 |
+
left: 50%;
|
| 30 |
+
transform: translateX(-50%);
|
| 31 |
+
z-index: 10;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.app-screen {
|
| 35 |
+
height: 100%;
|
| 36 |
+
display: flex;
|
| 37 |
+
flex-direction: column;
|
| 38 |
+
position: relative;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.status-bar {
|
| 42 |
+
height: 40px;
|
| 43 |
+
padding: 8px 20px;
|
| 44 |
+
display: flex;
|
| 45 |
+
justify-content: space-between;
|
| 46 |
+
align-items: center;
|
| 47 |
+
font-size: 13px;
|
| 48 |
+
color: #334155;
|
| 49 |
+
background: rgba(255, 255, 255, 0.7);
|
| 50 |
+
backdrop-filter: blur(5px);
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.app-content {
|
| 54 |
+
flex-grow: 1;
|
| 55 |
+
overflow-y: auto;
|
| 56 |
+
padding: 15px;
|
| 57 |
+
-webkit-overflow-scrolling: touch;
|
| 58 |
+
background: linear-gradient(to bottom, rgba(248,250,252,0.9), rgba(241,245,249,0.9));
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.nav-bar {
|
| 62 |
+
height: 70px;
|
| 63 |
+
display: flex;
|
| 64 |
+
justify-content: space-around;
|
| 65 |
+
align-items: center;
|
| 66 |
+
background: rgba(255, 255, 255, 0.95);
|
| 67 |
+
box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
|
| 68 |
+
border-top: 1px solid rgba(0,0,0,0.05);
|
| 69 |
+
padding-bottom: env(safe-area-inset-bottom);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.nav-item {
|
| 73 |
+
display: flex;
|
| 74 |
+
flex-direction: column;
|
| 75 |
+
align-items: center;
|
| 76 |
+
color: #64748b;
|
| 77 |
+
font-size: 12px;
|
| 78 |
+
padding: 8px 12px;
|
| 79 |
+
border-radius: 12px;
|
| 80 |
+
transition: all 0.2s ease;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.nav-item.active {
|
| 84 |
+
color: #4f46e5;
|
| 85 |
+
background: rgba(79, 70, 229, 0.1);
|
| 86 |
+
transform: translateY(-5px);
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.nav-icon {
|
| 90 |
+
font-size: 22px;
|
| 91 |
+
margin-bottom: 4px;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.card {
|
| 95 |
+
background: white;
|
| 96 |
+
border-radius: 18px;
|
| 97 |
+
padding: 18px;
|
| 98 |
+
margin-bottom: 18px;
|
| 99 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
|
| 100 |
+
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
| 101 |
+
border: 1px solid rgba(0,0,0,0.03);
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.card:hover {
|
| 105 |
+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
.card:active {
|
| 109 |
+
transform: scale(0.98);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.avatar {
|
| 113 |
+
width: 44px;
|
| 114 |
+
height: 44px;
|
| 115 |
+
border-radius: 14px;
|
| 116 |
+
object-fit: cover;
|
| 117 |
+
border: 2px solid white;
|
| 118 |
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
.progress-bar {
|
| 122 |
+
height: 8px;
|
| 123 |
+
border-radius: 4px;
|
| 124 |
+
background: #e2e8f0;
|
| 125 |
+
overflow: hidden;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.progress-fill {
|
| 129 |
+
height: 100%;
|
| 130 |
+
background: linear-gradient(90deg, #4f46e5, #8b5cf6);
|
| 131 |
+
border-radius: 4px;
|
| 132 |
+
transition: width 0.5s ease;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.floating-btn {
|
| 136 |
+
width: 60px;
|
| 137 |
+
height: 60px;
|
| 138 |
+
border-radius: 50%;
|
| 139 |
+
background: linear-gradient(135deg, #4f46e5, #8b5cf6);
|
| 140 |
+
color: white;
|
| 141 |
+
display: flex;
|
| 142 |
+
justify-content: center;
|
| 143 |
+
align-items: center;
|
| 144 |
+
position: absolute;
|
| 145 |
+
right: 25px;
|
| 146 |
+
bottom: 85px;
|
| 147 |
+
box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
|
| 148 |
+
z-index: 20;
|
| 149 |
+
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
.floating-btn:active {
|
| 153 |
+
transform: scale(0.95);
|
| 154 |
+
box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.notification-badge {
|
| 158 |
+
position: absolute;
|
| 159 |
+
top: -5px;
|
| 160 |
+
right: -5px;
|
| 161 |
+
background: #ef4444;
|
| 162 |
+
color: white;
|
| 163 |
+
border-radius: 50%;
|
| 164 |
+
width: 20px;
|
| 165 |
+
height: 20px;
|
| 166 |
+
display: flex;
|
| 167 |
+
justify-content: center;
|
| 168 |
+
align-items: center;
|
| 169 |
+
font-size: 11px;
|
| 170 |
+
font-weight: bold;
|
| 171 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.search-bar {
|
| 175 |
+
position: relative;
|
| 176 |
+
margin-bottom: 18px;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
.search-bar input {
|
| 180 |
+
width: 100%;
|
| 181 |
+
padding: 14px 20px 14px 50px;
|
| 182 |
+
border-radius: 30px;
|
| 183 |
+
border: none;
|
| 184 |
+
background: rgba(255, 255, 255, 0.9);
|
| 185 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
|
| 186 |
+
font-size: 15px;
|
| 187 |
+
transition: all 0.3s ease;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
.search-bar input:focus {
|
| 191 |
+
outline: none;
|
| 192 |
+
box-shadow: 0 5px 20px rgba(79, 70, 229, 0.1);
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
.search-bar i {
|
| 196 |
+
position: absolute;
|
| 197 |
+
left: 20px;
|
| 198 |
+
top: 50%;
|
| 199 |
+
transform: translateY(-50%);
|
| 200 |
+
color: #64748b;
|
| 201 |
+
font-size: 16px;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.tab-bar {
|
| 205 |
+
display: flex;
|
| 206 |
+
margin-bottom: 18px;
|
| 207 |
+
border-bottom: 1px solid #f1f5f9;
|
| 208 |
+
overflow-x: auto;
|
| 209 |
+
scrollbar-width: none;
|
| 210 |
+
-ms-overflow-style: none;
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
.tab-bar::-webkit-scrollbar {
|
| 214 |
+
display: none;
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
.tab {
|
| 218 |
+
padding: 10px 18px;
|
| 219 |
+
margin-right: 5px;
|
| 220 |
+
font-size: 15px;
|
| 221 |
+
color: #64748b;
|
| 222 |
+
border-bottom: 3px solid transparent;
|
| 223 |
+
white-space: nowrap;
|
| 224 |
+
transition: all 0.2s ease;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
.tab.active {
|
| 228 |
+
color: #4f46e5;
|
| 229 |
+
border-bottom: 3px solid #4f46e5;
|
| 230 |
+
font-weight: 500;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.debt-item {
|
| 234 |
+
display: flex;
|
| 235 |
+
align-items: center;
|
| 236 |
+
padding: 12px 0;
|
| 237 |
+
border-bottom: 1px solid #f1f5f9;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.debt-item:last-child {
|
| 241 |
+
border-bottom: none;
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
.debt-avatar {
|
| 245 |
+
width: 42px;
|
| 246 |
+
height: 42px;
|
| 247 |
+
border-radius: 12px;
|
| 248 |
+
display: flex;
|
| 249 |
+
align-items: center;
|
| 250 |
+
justify-content: center;
|
| 251 |
+
margin-right: 12px;
|
| 252 |
+
font-size: 18px;
|
| 253 |
+
color: white;
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
.debt-i-owe {
|
| 257 |
+
background: linear-gradient(135deg, #ef4444, #f97316);
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
.debt-owes-me {
|
| 261 |
+
background: linear-gradient(135deg, #10b981, #3b82f6);
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
.debt-amount {
|
| 265 |
+
font-weight: 600;
|
| 266 |
+
margin-left: auto;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.i-owe {
|
| 270 |
+
color: #ef4444;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.owes-me {
|
| 274 |
+
color: #10b981;
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
.modal-overlay {
|
| 278 |
+
position: fixed;
|
| 279 |
+
top: 0;
|
| 280 |
+
left: 0;
|
| 281 |
+
right: 0;
|
| 282 |
+
bottom: 0;
|
| 283 |
+
background: rgba(0,0,0,0.5);
|
| 284 |
+
display: flex;
|
| 285 |
+
justify-content: center;
|
| 286 |
+
align-items: center;
|
| 287 |
+
z-index: 100;
|
| 288 |
+
opacity: 0;
|
| 289 |
+
pointer-events: none;
|
| 290 |
+
transition: opacity 0.3s ease;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
.modal-overlay.active {
|
| 294 |
+
opacity: 1;
|
| 295 |
+
pointer-events: all;
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
.modal-content {
|
| 299 |
+
background: white;
|
| 300 |
+
border-radius: 20px;
|
| 301 |
+
width: 85%;
|
| 302 |
+
max-width: 400px;
|
| 303 |
+
padding: 25px;
|
| 304 |
+
transform: translateY(20px);
|
| 305 |
+
transition: transform 0.3s ease;
|
| 306 |
+
box-shadow: 0 20px 50px rgba(0,0,0,0.2);
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
.modal-overlay.active .modal-content {
|
| 310 |
+
transform: translateY(0);
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
.form-group {
|
| 314 |
+
margin-bottom: 18px;
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
.form-group label {
|
| 318 |
+
display: block;
|
| 319 |
+
margin-bottom: 8px;
|
| 320 |
+
font-size: 14px;
|
| 321 |
+
color: #64748b;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
.form-control {
|
| 325 |
+
width: 100%;
|
| 326 |
+
padding: 12px 15px;
|
| 327 |
+
border-radius: 12px;
|
| 328 |
+
border: 1px solid #e2e8f0;
|
| 329 |
+
font-size: 15px;
|
| 330 |
+
transition: all 0.2s ease;
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
.form-control:focus {
|
| 334 |
+
outline: none;
|
| 335 |
+
border-color: #a5b4fc;
|
| 336 |
+
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
.btn {
|
| 340 |
+
padding: 12px 20px;
|
| 341 |
+
border-radius: 12px;
|
| 342 |
+
font-weight: 500;
|
| 343 |
+
cursor: pointer;
|
| 344 |
+
transition: all 0.2s ease;
|
| 345 |
+
border: none;
|
| 346 |
+
font-size: 15px;
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
.btn-primary {
|
| 350 |
+
background: linear-gradient(135deg, #4f46e5, #8b5cf6);
|
| 351 |
+
color: white;
|
| 352 |
+
width: 100%;
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
.btn-primary:hover {
|
| 356 |
+
transform: translateY(-2px);
|
| 357 |
+
box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
.btn-secondary {
|
| 361 |
+
background: #f1f5f9;
|
| 362 |
+
color: #64748b;
|
| 363 |
+
margin-top: 10px;
|
| 364 |
+
width: 100%;
|
| 365 |
+
}
|
| 366 |
+
|
| 367 |
+
.btn-secondary:hover {
|
| 368 |
+
background: #e2e8f0;
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
.debt-type-selector {
|
| 372 |
+
display: flex;
|
| 373 |
+
margin-bottom: 18px;
|
| 374 |
+
border-radius: 12px;
|
| 375 |
+
overflow: hidden;
|
| 376 |
+
background: #f1f5f9;
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
.debt-type-btn {
|
| 380 |
+
flex: 1;
|
| 381 |
+
padding: 12px;
|
| 382 |
+
text-align: center;
|
| 383 |
+
cursor: pointer;
|
| 384 |
+
transition: all 0.2s ease;
|
| 385 |
+
font-weight: 500;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.debt-type-btn.active {
|
| 389 |
+
background: #4f46e5;
|
| 390 |
+
color: white;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
.empty-state {
|
| 394 |
+
text-align: center;
|
| 395 |
+
padding: 40px 20px;
|
| 396 |
+
color: #64748b;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
.empty-state i {
|
| 400 |
+
font-size: 50px;
|
| 401 |
+
margin-bottom: 15px;
|
| 402 |
+
color: #cbd5e1;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
.empty-state p {
|
| 406 |
+
margin-top: 10px;
|
| 407 |
+
font-size: 15px;
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
.reminder-badge {
|
| 411 |
+
background: #fef3c7;
|
| 412 |
+
color: #d97706;
|
| 413 |
+
font-size: 12px;
|
| 414 |
+
padding: 3px 8px;
|
| 415 |
+
border-radius: 10px;
|
| 416 |
+
display: inline-flex;
|
| 417 |
+
align-items: center;
|
| 418 |
+
margin-left: 8px;
|
| 419 |
+
}
|
| 420 |
+
|
| 421 |
+
.reminder-badge i {
|
| 422 |
+
margin-right: 3px;
|
| 423 |
+
font-size: 10px;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.skeleton {
|
| 427 |
+
background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
|
| 428 |
+
background-size: 200% 100%;
|
| 429 |
+
animation: shimmer 1.5s infinite;
|
| 430 |
+
border-radius: 8px;
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
@keyframes shimmer {
|
| 434 |
+
0% { background-position: 200% 0; }
|
| 435 |
+
100% { background-position: -200% 0; }
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
.skeleton-text {
|
| 439 |
+
height: 16px;
|
| 440 |
+
margin-bottom: 8px;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
.skeleton-avatar {
|
| 444 |
+
width: 42px;
|
| 445 |
+
height: 42px;
|
| 446 |
+
border-radius: 12px;
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
/* Календарь */
|
| 450 |
+
.calendar-header {
|
| 451 |
+
display: flex;
|
| 452 |
+
justify-content: space-between;
|
| 453 |
+
align-items: center;
|
| 454 |
+
margin-bottom: 15px;
|
| 455 |
+
}
|
| 456 |
+
|
| 457 |
+
.calendar-grid {
|
| 458 |
+
display: grid;
|
| 459 |
+
grid-template-columns: repeat(7, 1fr);
|
| 460 |
+
gap: 5px;
|
| 461 |
+
}
|
| 462 |
+
|
| 463 |
+
.calendar-day-header {
|
| 464 |
+
text-align: center;
|
| 465 |
+
font-size: 12px;
|
| 466 |
+
color: #64748b;
|
| 467 |
+
padding: 5px;
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
.calendar-day {
|
| 471 |
+
aspect-ratio: 1;
|
| 472 |
+
display: flex;
|
| 473 |
+
flex-direction: column;
|
| 474 |
+
align-items: center;
|
| 475 |
+
justify-content: center;
|
| 476 |
+
border-radius: 10px;
|
| 477 |
+
cursor: pointer;
|
| 478 |
+
transition: all 0.2s ease;
|
| 479 |
+
position: relative;
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
.calendar-day:hover {
|
| 483 |
+
background: #f1f5f9;
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
.calendar-day.today {
|
| 487 |
+
background: #e0e7ff;
|
| 488 |
+
color: #4f46e5;
|
| 489 |
+
font-weight: 600;
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
.calendar-day.selected {
|
| 493 |
+
background: #4f46e5;
|
| 494 |
+
color: white;
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
.calendar-day.has-event::after {
|
| 498 |
+
content: '';
|
| 499 |
+
width: 5px;
|
| 500 |
+
height: 5px;
|
| 501 |
+
background: #4f46e5;
|
| 502 |
+
border-radius: 50%;
|
| 503 |
+
position: absolute;
|
| 504 |
+
bottom: 5px;
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
.calendar-day.selected.has-event::after {
|
| 508 |
+
background: white;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
.calendar-day.other-month {
|
| 512 |
+
color: #cbd5e1;
|
| 513 |
+
}
|
| 514 |
+
|
| 515 |
+
.event-dot {
|
| 516 |
+
width: 6px;
|
| 517 |
+
height: 6px;
|
| 518 |
+
border-radius: 50%;
|
| 519 |
+
display: inline-block;
|
| 520 |
+
margin-right: 4px;
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
.event-dot.birthday {
|
| 524 |
+
background: #ef4444;
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
.event-dot.meeting {
|
| 528 |
+
background: #3b82f6;
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
.event-dot.reminder {
|
| 532 |
+
background: #10b981;
|
| 533 |
+
}
|
| 534 |
+
|
| 535 |
+
.event-dot.other {
|
| 536 |
+
background: #8b5cf6;
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
/* Анимации */
|
| 540 |
+
@keyframes fadeIn {
|
| 541 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 542 |
+
to { opacity: 1; transform: translateY(0); }
|
| 543 |
+
}
|
| 544 |
+
|
| 545 |
+
.animate-fadeIn {
|
| 546 |
+
animation: fadeIn 0.3s ease forwards;
|
| 547 |
+
}
|
| 548 |
+
|
| 549 |
+
.delay-100 { animation-delay: 0.1s; }
|
| 550 |
+
.delay-200 { animation-delay: 0.2s; }
|
| 551 |
+
.delay-300 { animation-delay: 0.3s; }
|
| 552 |
+
|
| 553 |
+
/* AI генератор поздравлений */
|
| 554 |
+
.ai-generator {
|
| 555 |
+
background: linear-gradient(135deg, #f5f3ff, #ede9fe);
|
| 556 |
+
border-radius: 16px;
|
| 557 |
+
padding: 16px;
|
| 558 |
+
margin-bottom: 16px;
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
.ai-result {
|
| 562 |
+
background: white;
|
| 563 |
+
border-radius: 12px;
|
| 564 |
+
padding: 12px;
|
| 565 |
+
margin-top: 12px;
|
| 566 |
+
border: 1px solid #e2e8f0;
|
| 567 |
+
position: relative;
|
| 568 |
+
}
|
| 569 |
+
|
| 570 |
+
.ai-result textarea {
|
| 571 |
+
width: 100%;
|
| 572 |
+
border: none;
|
| 573 |
+
resize: none;
|
| 574 |
+
min-height: 100px;
|
| 575 |
+
font-size: 14px;
|
| 576 |
+
line-height: 1.5;
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
.ai-actions {
|
| 580 |
+
display: flex;
|
| 581 |
+
justify-content: space-between;
|
| 582 |
+
margin-top: 10px;
|
| 583 |
+
}
|
| 584 |
+
|
| 585 |
+
.ai-loading {
|
| 586 |
+
display: flex;
|
| 587 |
+
justify-content: center;
|
| 588 |
+
align-items: center;
|
| 589 |
+
padding: 20px;
|
| 590 |
+
}
|
| 591 |
+
|
| 592 |
+
.ai-loading i {
|
| 593 |
+
animation: spin 1s linear infinite;
|
| 594 |
+
margin-right: 8px;
|
| 595 |
+
}
|
| 596 |
+
|
| 597 |
+
@keyframes spin {
|
| 598 |
+
0% { transform: rotate(0deg); }
|
| 599 |
+
100% { transform: rotate(360deg); }
|
| 600 |
+
}
|
| 601 |
+
|
| 602 |
+
/* Темная тема */
|
| 603 |
+
.dark-mode .phone-mockup {
|
| 604 |
+
background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
.dark-mode .app-content {
|
| 608 |
+
background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
|
| 609 |
+
}
|
| 610 |
+
|
| 611 |
+
.dark-mode .card {
|
| 612 |
+
background: #1e293b;
|
| 613 |
+
border-color: #334155;
|
| 614 |
+
}
|
| 615 |
+
|
| 616 |
+
.dark-mode .search-bar input {
|
| 617 |
+
background: #1e293b;
|
| 618 |
+
color: white;
|
| 619 |
+
}
|
| 620 |
+
|
| 621 |
+
.dark-mode .search-bar i {
|
| 622 |
+
color: #94a3b8;
|
| 623 |
+
}
|
| 624 |
+
|
| 625 |
+
.dark-mode .nav-bar {
|
| 626 |
+
background: #1e293b;
|
| 627 |
+
border-color: #334155;
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
.dark-mode .nav-item {
|
| 631 |
+
color: #94a3b8;
|
| 632 |
+
}
|
| 633 |
+
|
| 634 |
+
.dark-mode .nav-item.active {
|
| 635 |
+
color: #818cf8;
|
| 636 |
+
background: rgba(99, 102, 241, 0.1);
|
| 637 |
+
}
|
| 638 |
+
|
| 639 |
+
.dark-mode .status-bar {
|
| 640 |
+
color: #e2e8f0;
|
| 641 |
+
background: rgba(15, 23, 42, 0.7);
|
| 642 |
+
}
|
| 643 |
+
|
| 644 |
+
.dark-mode .tab {
|
| 645 |
+
color: #94a3b8;
|
| 646 |
+
}
|
| 647 |
+
|
| 648 |
+
.dark-mode .tab.active {
|
| 649 |
+
color: #818cf8;
|
| 650 |
+
}
|
| 651 |
+
|
| 652 |
+
.dark-mode .empty-state {
|
| 653 |
+
color: #94a3b8;
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
.dark-mode .empty-state i {
|
| 657 |
+
color: #334155;
|
| 658 |
+
}
|
| 659 |
+
|
| 660 |
+
.dark-mode .form-control {
|
| 661 |
+
background: #1e293b;
|
| 662 |
+
border-color: #334155;
|
| 663 |
+
color: white;
|
| 664 |
+
}
|
| 665 |
+
|
| 666 |
+
.dark-mode .form-group label {
|
| 667 |
+
color: #94a3b8;
|
| 668 |
+
}
|
| 669 |
+
|
| 670 |
+
.dark-mode .debt-type-selector {
|
| 671 |
+
background: #334155;
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
.dark-mode .ai-generator {
|
| 675 |
+
background: linear-gradient(135deg, #1e1b4b, #1e293b);
|
| 676 |
+
}
|
| 677 |
+
|
| 678 |
+
.dark-mode .calendar-day-header {
|
| 679 |
+
color: #94a3b8;
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
.dark-mode .calendar-day.other-month {
|
| 683 |
+
color: #475569;
|
| 684 |
+
}
|
| 685 |
+
</style>
|
| 686 |
+
</head>
|
| 687 |
+
<body class="bg-gray-100 flex items-center justify-center min-h-screen p-4">
|
| 688 |
+
<div class="phone-mockup">
|
| 689 |
+
<div class="phone-notch"></div>
|
| 690 |
+
<div class="app-screen">
|
| 691 |
+
<div class="status-bar">
|
| 692 |
+
<span id="current-time">14:25</span>
|
| 693 |
+
<div class="flex space-x-2">
|
| 694 |
+
<i class="fas fa-signal"></i>
|
| 695 |
+
<i class="fas fa-wifi"></i>
|
| 696 |
+
<i class="fas fa-battery-three-quarters"></i>
|
| 697 |
+
</div>
|
| 698 |
+
</div>
|
| 699 |
+
|
| 700 |
+
<div class="app-content" id="app-content">
|
| 701 |
+
<!-- Контент будет динамически заменяться -->
|
| 702 |
+
</div>
|
| 703 |
+
|
| 704 |
+
<div class="nav-bar">
|
| 705 |
+
<div class="nav-item active" data-tab="home">
|
| 706 |
+
<i class="fas fa-home nav-icon"></i>
|
| 707 |
+
<span>Главная</span>
|
| 708 |
+
</div>
|
| 709 |
+
<div class="nav-item" data-tab="calendar">
|
| 710 |
+
<i class="fas fa-calendar nav-icon"></i>
|
| 711 |
+
<span>Календарь</span>
|
| 712 |
+
</div>
|
| 713 |
+
<div class="nav-item" data-tab="wallet">
|
| 714 |
+
<i class="fas fa-wallet nav-icon"></i>
|
| 715 |
+
<span>Кошелек</span>
|
| 716 |
+
</div>
|
| 717 |
+
<div class="nav-item" data-tab="profile">
|
| 718 |
+
<i class="fas fa-user nav-icon"></i>
|
| 719 |
+
<span>Профиль</span>
|
| 720 |
+
</div>
|
| 721 |
+
</div>
|
| 722 |
+
|
| 723 |
+
<div class="floating-btn" id="add-btn">
|
| 724 |
+
<i class="fas fa-plus"></i>
|
| 725 |
+
</div>
|
| 726 |
+
</div>
|
| 727 |
+
</div>
|
| 728 |
+
|
| 729 |
+
<!-- Модальное окно для добавления долга -->
|
| 730 |
+
<div class="modal-overlay" id="debt-modal">
|
| 731 |
+
<div class="modal-content">
|
| 732 |
+
<h2 class="text-xl font-bold mb-4">Добавить долг</h2>
|
| 733 |
+
<div class="debt-type-selector">
|
| 734 |
+
<div class="debt-type-btn active" data-type="owe">Я должен</div>
|
| 735 |
+
<div class="debt-type-btn" data-type="owed">Мне должны</div>
|
| 736 |
+
</div>
|
| 737 |
+
<div class="form-group">
|
| 738 |
+
<label for="debt-person">Кому/От кого</label>
|
| 739 |
+
<input type="text" id="debt-person" class="form-control" placeholder="Имя человека">
|
| 740 |
+
</div>
|
| 741 |
+
<div class="form-group">
|
| 742 |
+
<label for="debt-amount">Сумма</label>
|
| 743 |
+
<input type="number" id="debt-amount" class="form-control" placeholder="0 ₽">
|
| 744 |
+
</div>
|
| 745 |
+
<div class="form-group">
|
| 746 |
+
<label for="debt-description">Описание</label>
|
| 747 |
+
<input type="text" id="debt-description" class="form-control" placeholder="На что (необязательно)">
|
| 748 |
+
</div>
|
| 749 |
+
<div class="form-group">
|
| 750 |
+
<label for="debt-date">Дата возврата</label>
|
| 751 |
+
<input type="date" id="debt-date" class="form-control">
|
| 752 |
+
</div>
|
| 753 |
+
<div class="form-group">
|
| 754 |
+
<label>
|
| 755 |
+
<input type="checkbox" id="debt-reminder"> Напомнить за день
|
| 756 |
+
</label>
|
| 757 |
+
</div>
|
| 758 |
+
<button class="btn btn-primary" id="save-debt">Сохранить</button>
|
| 759 |
+
<button class="btn btn-secondary" id="cancel-debt">Отмена</button>
|
| 760 |
+
</div>
|
| 761 |
+
</div>
|
| 762 |
+
|
| 763 |
+
<!-- Модальное окно для добавления задачи -->
|
| 764 |
+
<div class="modal-overlay" id="task-modal">
|
| 765 |
+
<div class="modal-content">
|
| 766 |
+
<h2 class="text-xl font-bold mb-4">Добавить задачу</h2>
|
| 767 |
+
<div class="form-group">
|
| 768 |
+
<label for="task-title">Название</label>
|
| 769 |
+
<input type="text" id="task-title" class="form-control" placeholder="Что нужно сделать?">
|
| 770 |
+
</div>
|
| 771 |
+
<div class="form-group">
|
| 772 |
+
<label for="task-category">Категория</label>
|
| 773 |
+
<select id="task-category" class="form-control">
|
| 774 |
+
<option value="personal">Личное</option>
|
| 775 |
+
<option value="work">Работа</option>
|
| 776 |
+
<option value="family">Семья</option>
|
| 777 |
+
<option value="other">Другое</option>
|
| 778 |
+
</select>
|
| 779 |
+
</div>
|
| 780 |
+
<div class="form-group">
|
| 781 |
+
<label for="task-date">Срок выполнения</label>
|
| 782 |
+
<input type="date" id="task-date" class="form-control">
|
| 783 |
+
</div>
|
| 784 |
+
<div class="form-group">
|
| 785 |
+
<label>
|
| 786 |
+
<input type="checkbox" id="task-reminder"> Напомнить
|
| 787 |
+
</label>
|
| 788 |
+
</div>
|
| 789 |
+
<button class="btn btn-primary" id="save-task">Сохранить</button>
|
| 790 |
+
<button class="btn btn-secondary" id="cancel-task">Отмена</button>
|
| 791 |
+
</div>
|
| 792 |
+
</div>
|
| 793 |
+
|
| 794 |
+
<!-- Модальное окно для добавления события в календарь -->
|
| 795 |
+
<div class="modal-overlay" id="event-modal">
|
| 796 |
+
<div class="modal-content">
|
| 797 |
+
<h2 class="text-xl font-bold mb-4">Добавить событие</h2>
|
| 798 |
+
<div class="form-group">
|
| 799 |
+
<label for="event-title">Название</label>
|
| 800 |
+
<input type="text" id="event-title" class="form-control" placeholder="Название события">
|
| 801 |
+
</div>
|
| 802 |
+
<div class="form-group">
|
| 803 |
+
<label for="event-type">Тип события</label>
|
| 804 |
+
<select id="event-type" class="form-control">
|
| 805 |
+
<option value="birthday">День рождения</option>
|
| 806 |
+
<option value="meeting">Встреча</option>
|
| 807 |
+
<option value="reminder">Напоминание</option>
|
| 808 |
+
<option value="other">Другое</option>
|
| 809 |
+
</select>
|
| 810 |
+
</div>
|
| 811 |
+
<div class="form-group">
|
| 812 |
+
<label for="event-date">Дата</label>
|
| 813 |
+
<input type="date" id="event-date" class="form-control">
|
| 814 |
+
</div>
|
| 815 |
+
<div class="form-group">
|
| 816 |
+
<label for="event-time">Время (если нужно)</label>
|
| 817 |
+
<input type="time" id="event-time" class="form-control">
|
| 818 |
+
</div>
|
| 819 |
+
<div class="form-group">
|
| 820 |
+
<label for="event-description">Описание</label>
|
| 821 |
+
<textarea id="event-description" class="form-control" placeholder="Дополнительная информация"></textarea>
|
| 822 |
+
</div>
|
| 823 |
+
<div class="form-group">
|
| 824 |
+
<label>
|
| 825 |
+
<input type="checkbox" id="event-reminder"> Напомнить
|
| 826 |
+
</label>
|
| 827 |
+
</div>
|
| 828 |
+
<div class="form-group" id="reminder-time-container" style="display: none;">
|
| 829 |
+
<label for="reminder-time">За сколько напомнить</label>
|
| 830 |
+
<select id="reminder-time" class="form-control">
|
| 831 |
+
<option value="5">За 5 минут</option>
|
| 832 |
+
<option value="15">За 15 минут</option>
|
| 833 |
+
<option value="30">За 30 минут</option>
|
| 834 |
+
<option value="60">За 1 час</option>
|
| 835 |
+
<option value="1440">За 1 день</option>
|
| 836 |
+
<option value="2880">За 2 дня</option>
|
| 837 |
+
<option value="10080">За 1 неделю</option>
|
| 838 |
+
</select>
|
| 839 |
+
</div>
|
| 840 |
+
<div class="form-group" id="repeat-container" style="display: none;">
|
| 841 |
+
<label for="event-repeat">Повторять</label>
|
| 842 |
+
<select id="event-repeat" class="form-control">
|
| 843 |
+
<option value="none">Не повторять</option>
|
| 844 |
+
<option value="daily">Ежедневно</option>
|
| 845 |
+
<option value="weekly">Еженедельно</option>
|
| 846 |
+
<option value="monthly">Ежемесячно</option>
|
| 847 |
+
<option value="yearly">Ежегодно</option>
|
| 848 |
+
</select>
|
| 849 |
+
</div>
|
| 850 |
+
<button class="btn btn-primary" id="save-event">Сохранить</button>
|
| 851 |
+
<button class="btn btn-secondary" id="cancel-event">Отмена</button>
|
| 852 |
+
</div>
|
| 853 |
+
</div>
|
| 854 |
+
|
| 855 |
+
<!-- Модальное окно для просмотра события -->
|
| 856 |
+
<div class="modal-overlay" id="view-event-modal">
|
| 857 |
+
<div class="modal-content">
|
| 858 |
+
<div class="flex justify-between items-center mb-4">
|
| 859 |
+
<h2 class="text-xl font-bold" id="view-event-title">Событие</h2>
|
| 860 |
+
<div class="flex space-x-2">
|
| 861 |
+
<button id="edit-event" class="p-2 rounded-full hover:bg-gray-100">
|
| 862 |
+
<i class="fas fa-edit text-gray-600"></i>
|
| 863 |
+
</button>
|
| 864 |
+
<button id="delete-event" class="p-2 rounded-full hover:bg-gray-100">
|
| 865 |
+
<i class="fas fa-trash text-gray-600"></i>
|
| 866 |
+
</button>
|
| 867 |
+
</div>
|
| 868 |
+
</div>
|
| 869 |
+
|
| 870 |
+
<div class="mb-4">
|
| 871 |
+
<div class="flex items-center mb-2">
|
| 872 |
+
<i class="fas fa-calendar-day text-gray-500 mr-2 w-5"></i>
|
| 873 |
+
<span id="view-event-date">Дата</span>
|
| 874 |
+
</div>
|
| 875 |
+
<div class="flex items-center mb-2" id="view-event-time-container">
|
| 876 |
+
<i class="fas fa-clock text-gray-500 mr-2 w-5"></i>
|
| 877 |
+
<span id="view-event-time">Время</span>
|
| 878 |
+
</div>
|
| 879 |
+
<div class="flex items-center mb-2">
|
| 880 |
+
<i class="fas fa-tag text-gray-500 mr-2 w-5"></i>
|
| 881 |
+
<span id="view-event-type">Тип</span>
|
| 882 |
+
</div>
|
| 883 |
+
<div class="flex items-start mb-2" id="view-event-reminder-container">
|
| 884 |
+
<i class="fas fa-bell text-gray-500 mr-2 mt-1 w-5"></i>
|
| 885 |
+
<span id="view-event-reminder">Напоминание</span>
|
| 886 |
+
</div>
|
| 887 |
+
<div class="flex items-start" id="view-event-repeat-container">
|
| 888 |
+
<i class="fas fa-redo text-gray-500 mr-2 mt-1 w-5"></i>
|
| 889 |
+
<span id="view-event-repeat">Повторение</span>
|
| 890 |
+
</div>
|
| 891 |
+
</div>
|
| 892 |
+
|
| 893 |
+
<div class="border-t border-gray-200 pt-4">
|
| 894 |
+
<h3 class="font-semibold mb-2">Описание</h3>
|
| 895 |
+
<p id="view-event-description" class="text-gray-700">Описание события</p>
|
| 896 |
+
</div>
|
| 897 |
+
|
| 898 |
+
<div class="mt-6">
|
| 899 |
+
<button class="btn btn-secondary" id="close-view-event">Закрыть</button>
|
| 900 |
+
</div>
|
| 901 |
+
</div>
|
| 902 |
+
</div>
|
| 903 |
+
|
| 904 |
+
<!-- Модальное окно для генератора поздравлений -->
|
| 905 |
+
<div class="modal-overlay" id="ai-modal">
|
| 906 |
+
<div class="modal-content">
|
| 907 |
+
<h2 class="text-xl font-bold mb-4">Генератор поздравлений</h2>
|
| 908 |
+
|
| 909 |
+
<div class="ai-generator">
|
| 910 |
+
<div class="form-group">
|
| 911 |
+
<label for="ai-name">Имя именинника</label>
|
| 912 |
+
<input type="text" id="ai-name" class="form-control" placeholder="Введите имя">
|
| 913 |
+
</div>
|
| 914 |
+
|
| 915 |
+
<div class="form-group">
|
| 916 |
+
<label for="ai-age">Возраст (если нужно)</label>
|
| 917 |
+
<input type="number" id="ai-age" class="form-control" placeholder="Необязательно">
|
| 918 |
+
</div>
|
| 919 |
+
|
| 920 |
+
<div class="form-group">
|
| 921 |
+
<label for="ai-relation">Ваши отношения</label>
|
| 922 |
+
<select id="ai-relation" class="form-control">
|
| 923 |
+
<option value="friend">Друг/Подруга</option>
|
| 924 |
+
<option value="family">Родственник</option>
|
| 925 |
+
<option value="colleague">Коллега</option>
|
| 926 |
+
<option value="partner">Партнер</option>
|
| 927 |
+
<option value="child">Ребенок</option>
|
| 928 |
+
<option value="parent">Родитель</option>
|
| 929 |
+
</select>
|
| 930 |
+
</div>
|
| 931 |
+
|
| 932 |
+
<div class="form-group">
|
| 933 |
+
<label for="ai-style">Стиль поздравления</label>
|
| 934 |
+
<select id="ai-style" class="form-control">
|
| 935 |
+
<option value="formal">Официальный</option>
|
| 936 |
+
<option value="friendly">Дружеский</option>
|
| 937 |
+
<option value="funny">Шуточный</option>
|
| 938 |
+
<option value="romantic">Романтический</option>
|
| 939 |
+
<option value="inspirational">Вдохновляющий</option>
|
| 940 |
+
</select>
|
| 941 |
+
</div>
|
| 942 |
+
|
| 943 |
+
<div class="form-group">
|
| 944 |
+
<label for="ai-additional">Дополнительные пожелания</label>
|
| 945 |
+
<textarea id="ai-additional" class="form-control" placeholder="Что бы вы хотели включить в поздравление?"></textarea>
|
| 946 |
+
</div>
|
| 947 |
+
|
| 948 |
+
<button class="btn btn-primary" id="generate-ai">Сгенерировать</button>
|
| 949 |
+
|
| 950 |
+
<div id="ai-result-container" style="display: none;">
|
| 951 |
+
<div class="ai-result">
|
| 952 |
+
<textarea id="ai-result-text" readonly></textarea>
|
| 953 |
+
</div>
|
| 954 |
+
<div class="ai-actions">
|
| 955 |
+
<button class="btn btn-secondary" id="copy-ai">
|
| 956 |
+
<i class="fas fa-copy mr-1"></i> Копировать
|
| 957 |
+
</button>
|
| 958 |
+
<button class="btn btn-secondary" id="regenerate-ai">
|
| 959 |
+
<i class="fas fa-sync-alt mr-1"></i> Перегенерировать
|
| 960 |
+
</button>
|
| 961 |
+
</div>
|
| 962 |
+
</div>
|
| 963 |
+
|
| 964 |
+
<div id="ai-loading" class="ai-loading" style="display: none;">
|
| 965 |
+
<i class="fas fa-spinner"></i>
|
| 966 |
+
<span>Генерируем поздравление...</span>
|
| 967 |
+
</div>
|
| 968 |
+
</div>
|
| 969 |
+
|
| 970 |
+
<button class="btn btn-secondary mt-4" id="close-ai">Закрыть</button>
|
| 971 |
+
</div>
|
| 972 |
+
</div>
|
| 973 |
+
|
| 974 |
+
<script>
|
| 975 |
+
// Состояние приложения
|
| 976 |
+
const state = {
|
| 977 |
+
currentTab: 'home',
|
| 978 |
+
currentMonth: new Date().getMonth(),
|
| 979 |
+
currentYear: new Date().getFullYear(),
|
| 980 |
+
selectedDate: new Date(),
|
| 981 |
+
debts: [
|
| 982 |
+
{
|
| 983 |
+
id: 1,
|
| 984 |
+
type: 'owe',
|
| 985 |
+
person: 'Иван Петров',
|
| 986 |
+
amount: 5000,
|
| 987 |
+
description: 'За ремонт телефона',
|
| 988 |
+
date: '2023-07-10',
|
| 989 |
+
reminder: true
|
| 990 |
+
},
|
| 991 |
+
{
|
| 992 |
+
id: 2,
|
| 993 |
+
type: 'owed',
|
| 994 |
+
person: 'Мария Сидорова',
|
| 995 |
+
amount: 3000,
|
| 996 |
+
description: 'За билеты в кино',
|
| 997 |
+
date: '2023-06-25',
|
| 998 |
+
reminder: false
|
| 999 |
+
},
|
| 1000 |
+
{
|
| 1001 |
+
id: 3,
|
| 1002 |
+
type: 'owed',
|
| 1003 |
+
person: 'Алексей Козлов',
|
| 1004 |
+
amount: 15000,
|
| 1005 |
+
description: 'Долг за аренду',
|
| 1006 |
+
date: '2023-07-01',
|
| 1007 |
+
reminder: true
|
| 1008 |
+
}
|
| 1009 |
+
],
|
| 1010 |
+
tasks: [
|
| 1011 |
+
{
|
| 1012 |
+
id: 1,
|
| 1013 |
+
title: 'Завершить проект',
|
| 1014 |
+
completed: true,
|
| 1015 |
+
category: 'work',
|
| 1016 |
+
date: '2023-06-15',
|
| 1017 |
+
reminder: false
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
id: 2,
|
| 1021 |
+
title: 'Отправить отчет',
|
| 1022 |
+
completed: true,
|
| 1023 |
+
category: 'work',
|
| 1024 |
+
date: '2023-06-14',
|
| 1025 |
+
reminder: false
|
| 1026 |
+
},
|
| 1027 |
+
{
|
| 1028 |
+
id: 3,
|
| 1029 |
+
title: 'Встреча с клиентом',
|
| 1030 |
+
completed: true,
|
| 1031 |
+
category: 'work',
|
| 1032 |
+
date: '2023-06-16',
|
| 1033 |
+
reminder: true
|
| 1034 |
+
},
|
| 1035 |
+
{
|
| 1036 |
+
id: 4,
|
| 1037 |
+
title: 'Доделать приложение',
|
| 1038 |
+
completed: false,
|
| 1039 |
+
category: 'work',
|
| 1040 |
+
date: '2023-06-20',
|
| 1041 |
+
reminder: true
|
| 1042 |
+
},
|
| 1043 |
+
{
|
| 1044 |
+
id: 5,
|
| 1045 |
+
title: 'Купить продукты',
|
| 1046 |
+
completed: false,
|
| 1047 |
+
category: 'personal',
|
| 1048 |
+
date: '2023-06-17',
|
| 1049 |
+
reminder: true
|
| 1050 |
+
}
|
| 1051 |
+
],
|
| 1052 |
+
events: [
|
| 1053 |
+
{
|
| 1054 |
+
id: 1,
|
| 1055 |
+
title: 'День рождения Марии',
|
| 1056 |
+
type: 'birthday',
|
| 1057 |
+
date: '2023-06-15',
|
| 1058 |
+
description: 'День рождения сестры',
|
| 1059 |
+
reminder: true,
|
| 1060 |
+
reminderTime: 1440,
|
| 1061 |
+
repeat: 'yearly'
|
| 1062 |
+
},
|
| 1063 |
+
{
|
| 1064 |
+
id: 2,
|
| 1065 |
+
title: 'Встреча с клиентом',
|
| 1066 |
+
type: 'meeting',
|
| 1067 |
+
date: '2023-06-20',
|
| 1068 |
+
time: '14:00',
|
| 1069 |
+
description: 'Обсуждение нового проекта',
|
| 1070 |
+
reminder: true,
|
| 1071 |
+
reminderTime: 30,
|
| 1072 |
+
repeat: 'none'
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
id: 3,
|
| 1076 |
+
title: 'Оплатить счет за интернет',
|
| 1077 |
+
type: 'reminder',
|
| 1078 |
+
date: '2023-06-25',
|
| 1079 |
+
description: 'Не забыть оплатить до конца месяца',
|
| 1080 |
+
reminder: true,
|
| 1081 |
+
reminderTime: 2880,
|
| 1082 |
+
repeat: 'monthly'
|
| 1083 |
+
},
|
| 1084 |
+
{
|
| 1085 |
+
id: 4,
|
| 1086 |
+
title: 'Поход к врачу',
|
| 1087 |
+
type: 'other',
|
| 1088 |
+
date: '2023-07-05',
|
| 1089 |
+
time: '10:30',
|
| 1090 |
+
description: 'Консультация у терапевта',
|
| 1091 |
+
reminder: true,
|
| 1092 |
+
reminderTime: 60,
|
| 1093 |
+
repeat: 'none'
|
| 1094 |
+
}
|
| 1095 |
+
],
|
| 1096 |
+
contacts: [
|
| 1097 |
+
{
|
| 1098 |
+
id: 1,
|
| 1099 |
+
name: 'Иван Петров',
|
| 1100 |
+
phone: '+7 (912) 345-67-89',
|
| 1101 |
+
email: 'ivan@example.com',
|
| 1102 |
+
birthday: '1990-05-20',
|
| 1103 |
+
relation: 'friend'
|
| 1104 |
+
},
|
| 1105 |
+
{
|
| 1106 |
+
id: 2,
|
| 1107 |
+
name: 'Мария Сидорова',
|
| 1108 |
+
phone: '+7 (987) 654-32-10',
|
| 1109 |
+
email: 'maria@example.com',
|
| 1110 |
+
birthday: '1985-08-15',
|
| 1111 |
+
relation: 'family'
|
| 1112 |
+
},
|
| 1113 |
+
{
|
| 1114 |
+
id: 3,
|
| 1115 |
+
name: 'Алексей Козлов',
|
| 1116 |
+
phone: '+7 (999) 123-45-67',
|
| 1117 |
+
email: 'alex@example.com',
|
| 1118 |
+
birthday: '1988-11-30',
|
| 1119 |
+
relation: 'colleague'
|
| 1120 |
+
}
|
| 1121 |
+
],
|
| 1122 |
+
nextId: 6,
|
| 1123 |
+
darkMode: false,
|
| 1124 |
+
currentEvent: null
|
| 1125 |
+
};
|
| 1126 |
+
|
| 1127 |
+
// DOM элементы
|
| 1128 |
+
const appContent = document.getElementById('app-content');
|
| 1129 |
+
const navItems = document.querySelectorAll('.nav-item');
|
| 1130 |
+
const addBtn = document.getElementById('add-btn');
|
| 1131 |
+
const debtModal = document.getElementById('debt-modal');
|
| 1132 |
+
const taskModal = document.getElementById('task-modal');
|
| 1133 |
+
const eventModal = document.getElementById('event-modal');
|
| 1134 |
+
const viewEventModal = document.getElementById('view-event-modal');
|
| 1135 |
+
const aiModal = document.getElementById('ai-modal');
|
| 1136 |
+
const currentTime = document.getElementById('current-time');
|
| 1137 |
+
|
| 1138 |
+
// Обновляем время каждую минуту
|
| 1139 |
+
function updateTime() {
|
| 1140 |
+
const now = new Date();
|
| 1141 |
+
const hours = now.getHours().toString().padStart(2, '0');
|
| 1142 |
+
const minutes = now.getMinutes().toString().padStart(2, '0');
|
| 1143 |
+
currentTime.textContent = `${hours}:${minutes}`;
|
| 1144 |
+
}
|
| 1145 |
+
|
| 1146 |
+
updateTime();
|
| 1147 |
+
setInterval(updateTime, 60000);
|
| 1148 |
+
|
| 1149 |
+
// Рендерим контент в зависимости от выбранной вкладки
|
| 1150 |
+
function renderContent() {
|
| 1151 |
+
switch(state.currentTab) {
|
| 1152 |
+
case 'home':
|
| 1153 |
+
renderHome();
|
| 1154 |
+
break;
|
| 1155 |
+
case 'tasks':
|
| 1156 |
+
renderTasks();
|
| 1157 |
+
break;
|
| 1158 |
+
case 'wallet':
|
| 1159 |
+
renderWallet();
|
| 1160 |
+
break;
|
| 1161 |
+
case 'profile':
|
| 1162 |
+
renderProfile();
|
| 1163 |
+
break;
|
| 1164 |
+
case 'calendar':
|
| 1165 |
+
renderCalendar();
|
| 1166 |
+
break;
|
| 1167 |
+
}
|
| 1168 |
+
}
|
| 1169 |
+
|
| 1170 |
+
// Рендер главной страницы
|
| 1171 |
+
function renderHome() {
|
| 1172 |
+
const completedTasks = state.tasks.filter(task => task.completed).length;
|
| 1173 |
+
const totalTasks = state.tasks.length;
|
| 1174 |
+
const progress = totalTasks > 0 ? Math.round((completedTasks / totalTasks) * 100) : 0;
|
| 1175 |
+
|
| 1176 |
+
// Ближайшие события (долги и задачи с напоминаниями)
|
| 1177 |
+
const upcomingDebts = state.debts
|
| 1178 |
+
.filter(debt => debt.reminder && new Date(debt.date) > new Date())
|
| 1179 |
+
.sort((a, b) => new Date(a.date) - new Date(b.date))
|
| 1180 |
+
.slice(0, 2);
|
| 1181 |
+
|
| 1182 |
+
const upcomingTasks = state.tasks
|
| 1183 |
+
.filter(task => task.reminder && !task.completed && new Date(task.date) > new Date())
|
| 1184 |
+
.sort((a, b) => new Date(a.date) - new Date(b.date))
|
| 1185 |
+
.slice(0, 2);
|
| 1186 |
+
|
| 1187 |
+
const upcomingEvents = state.events
|
| 1188 |
+
.filter(event => event.reminder && new Date(event.date) > new Date())
|
| 1189 |
+
.sort((a, b) => new Date(a.date) - new Date(b.date))
|
| 1190 |
+
.slice(0, 2);
|
| 1191 |
+
|
| 1192 |
+
// Ближайшие дни рождения (в течение месяца)
|
| 1193 |
+
const upcomingBirthdays = state.contacts
|
| 1194 |
+
.filter(contact => {
|
| 1195 |
+
const now = new Date();
|
| 1196 |
+
const birthday = new Date(contact.birthday);
|
| 1197 |
+
birthday.setFullYear(now.getFullYear());
|
| 1198 |
+
|
| 1199 |
+
// Если день рождения уже прошел в этом году, смотрим на следующий год
|
| 1200 |
+
if (birthday < now) {
|
| 1201 |
+
birthday.setFullYear(now.getFullYear() + 1);
|
| 1202 |
+
}
|
| 1203 |
+
|
| 1204 |
+
// Разница в днях
|
| 1205 |
+
const diffTime = birthday - now;
|
| 1206 |
+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
| 1207 |
+
|
| 1208 |
+
return diffDays <= 30;
|
| 1209 |
+
})
|
| 1210 |
+
.sort((a, b) => {
|
| 1211 |
+
const aDate = new Date(a.birthday);
|
| 1212 |
+
const bDate = new Date(b.birthday);
|
| 1213 |
+
aDate.setFullYear(new Date().getFullYear());
|
| 1214 |
+
bDate.setFullYear(new Date().getFullYear());
|
| 1215 |
+
return aDate - bDate;
|
| 1216 |
+
})
|
| 1217 |
+
.slice(0, 2);
|
| 1218 |
+
|
| 1219 |
+
appContent.innerHTML = `
|
| 1220 |
+
<div class="animate-fadeIn">
|
| 1221 |
+
<div class="flex justify-between items-center mb-6">
|
| 1222 |
+
<div>
|
| 1223 |
+
<h1 class="text-2xl font-bold text-gray-800">Привет, Алексей!</h1>
|
| 1224 |
+
<p class="text-gray-500 text-sm">Сегодня ${formatDate(new Date())}</p>
|
| 1225 |
+
</div>
|
| 1226 |
+
<div class="relative">
|
| 1227 |
+
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Аватар" class="avatar">
|
| 1228 |
+
<span class="notification-badge">${upcomingDebts.length + upcomingTasks.length + upcomingEvents.length + upcomingBirthdays.length}</span>
|
| 1229 |
+
</div>
|
| 1230 |
+
</div>
|
| 1231 |
+
|
| 1232 |
+
<div class="search-bar">
|
| 1233 |
+
<i class="fas fa-search"></i>
|
| 1234 |
+
<input type="text" placeholder="Поиск...">
|
| 1235 |
+
</div>
|
| 1236 |
+
|
| 1237 |
+
<div class="tab-bar">
|
| 1238 |
+
<div class="tab active">Главная</div>
|
| 1239 |
+
<div class="tab">Работа</div>
|
| 1240 |
+
<div class="tab">Личное</div>
|
| 1241 |
+
<div class="tab">Другое</div>
|
| 1242 |
+
</div>
|
| 1243 |
+
|
| 1244 |
+
<div class="card animate-fadeIn delay-100">
|
| 1245 |
+
<div class="flex justify-between items-center mb-3">
|
| 1246 |
+
<h2 class="font-semibold text-gray-800">Текущие задачи</h2>
|
| 1247 |
+
<span class="text-xs text-gray-500">${completedTasks} из ${totalTasks} выполнено</span>
|
| 1248 |
+
</div>
|
| 1249 |
+
<div class="progress-bar mb-3">
|
| 1250 |
+
<div class="progress-fill" style="width: ${progress}%"></div>
|
| 1251 |
+
</div>
|
| 1252 |
+
<div class="space-y-3">
|
| 1253 |
+
${state.tasks.slice(0, 5).map(task => `
|
| 1254 |
+
<div class="flex items-center">
|
| 1255 |
+
<input type="checkbox" ${task.completed ? 'checked' : ''}
|
| 1256 |
+
class="mr-3 h-5 w-5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"
|
| 1257 |
+
data-task-id="${task.id}">
|
| 1258 |
+
<span class="${task.completed ? 'text-gray-700 line-through' : 'text-gray-700'}">
|
| 1259 |
+
${task.title}
|
| 1260 |
+
${task.reminder ? '<span class="reminder-badge"><i class="fas fa-bell"></i> ' + formatDate(new Date(task.date)) + '</span>' : ''}
|
| 1261 |
+
</span>
|
| 1262 |
+
</div>
|
| 1263 |
+
`).join('')}
|
| 1264 |
+
</div>
|
| 1265 |
+
</div>
|
| 1266 |
+
|
| 1267 |
+
${upcomingBirthdays.length > 0 ? `
|
| 1268 |
+
<div class="card animate-fadeIn delay-200">
|
| 1269 |
+
<h2 class="font-semibold text-gray-800 mb-3">Ближайшие дни рождения</h2>
|
| 1270 |
+
<div class="space-y-4">
|
| 1271 |
+
${upcomingBirthdays.map(birthday => {
|
| 1272 |
+
const birthdayDate = new Date(birthday.birthday);
|
| 1273 |
+
const now = new Date();
|
| 1274 |
+
birthdayDate.setFullYear(now.getFullYear());
|
| 1275 |
+
|
| 1276 |
+
// Если день рождения уже прошел в этом году, показываем для следующего года
|
| 1277 |
+
if (birthdayDate < now) {
|
| 1278 |
+
birthdayDate.setFullYear(now.getFullYear() + 1);
|
| 1279 |
+
}
|
| 1280 |
+
|
| 1281 |
+
const age = birthdayDate.getFullYear() - new Date(birthday.birthday).getFullYear();
|
| 1282 |
+
|
| 1283 |
+
return `
|
| 1284 |
+
<div class="flex items-start">
|
| 1285 |
+
<div class="bg-pink-100 text-pink-800 rounded-lg p-3 mr-3">
|
| 1286 |
+
<i class="fas fa-birthday-cake"></i>
|
| 1287 |
+
</div>
|
| 1288 |
+
<div>
|
| 1289 |
+
<h3 class="font-medium text-gray-800">${birthday.name}</h3>
|
| 1290 |
+
<p class="text-sm text-gray-500">${formatDate(birthdayDate)} · ${age} лет</p>
|
| 1291 |
+
<p class="text-sm text-gray-500 mt-1">${getRelationText(birthday.relation)}</p>
|
| 1292 |
+
<button class="mt-2 text-xs bg-pink-500 text-white px-3 py-1 rounded-full hover:bg-pink-600 transition generate-congrats" data-contact-id="${birthday.id}">
|
| 1293 |
+
<i class="fas fa-magic mr-1"></i> Создать поздравление
|
| 1294 |
+
</button>
|
| 1295 |
+
</div>
|
| 1296 |
+
</div>
|
| 1297 |
+
`;
|
| 1298 |
+
}).join('')}
|
| 1299 |
+
</div>
|
| 1300 |
+
</div>
|
| 1301 |
+
` : ''}
|
| 1302 |
+
|
| 1303 |
+
<div class="card animate-fadeIn delay-300">
|
| 1304 |
+
<h2 class="font-semibold text-gray-800 mb-3">Ближайшие события</h2>
|
| 1305 |
+
<div class="space-y-4">
|
| 1306 |
+
${upcomingDebts.length > 0 || upcomingTasks.length > 0 || upcomingEvents.length > 0 ?
|
| 1307 |
+
[...upcomingDebts, ...upcomingTasks, ...upcomingEvents]
|
| 1308 |
+
.sort((a, b) => new Date(a.date) - new Date(b.date))
|
| 1309 |
+
.slice(0, 3)
|
| 1310 |
+
.map(item => {
|
| 1311 |
+
if (item.type) {
|
| 1312 |
+
// Это событие
|
| 1313 |
+
return `
|
| 1314 |
+
<div class="flex items-start">
|
| 1315 |
+
<div class="${getEventColorClass(item.type)} rounded-lg p-3 mr-3">
|
| 1316 |
+
<i class="fas ${getEventIcon(item.type)}"></i>
|
| 1317 |
+
</div>
|
| 1318 |
+
<div>
|
| 1319 |
+
<h3 class="font-medium text-gray-800">${item.title}</h3>
|
| 1320 |
+
<p class="text-sm text-gray-500">${formatDate(new Date(item.date))}${item.time ? ' · ' + item.time : ''}</p>
|
| 1321 |
+
${item.description ? `<p class="text-sm text-gray-500 mt-1">${item.description}</p>` : ''}
|
| 1322 |
+
</div>
|
| 1323 |
+
</div>
|
| 1324 |
+
`;
|
| 1325 |
+
} else if (item.amount) {
|
| 1326 |
+
// Это долг
|
| 1327 |
+
return `
|
| 1328 |
+
<div class="flex items-start">
|
| 1329 |
+
<div class="${item.type === 'owe' ? 'bg-red-100 text-red-800' : 'bg-green-100 text-green-800'} rounded-lg p-3 mr-3">
|
| 1330 |
+
<i class="fas ${item.type === 'owe' ? 'fa-hand-holding-usd' : 'fa-money-bill-wave'}"></i>
|
| 1331 |
+
</div>
|
| 1332 |
+
<div>
|
| 1333 |
+
<h3 class="font-medium text-gray-800">${item.type === 'owe' ? 'Вернуть долг' : 'Получить долг'} ${item.person}</h3>
|
| 1334 |
+
<p class="text-sm text-gray-500">${formatDate(new Date(item.date))} · ${item.amount} ₽</p>
|
| 1335 |
+
${item.description ? `<p class="text-sm text-gray-500 mt-1">${item.description}</p>` : ''}
|
| 1336 |
+
</div>
|
| 1337 |
+
</div>
|
| 1338 |
+
`;
|
| 1339 |
+
} else {
|
| 1340 |
+
// Это задача
|
| 1341 |
+
return `
|
| 1342 |
+
<div class="flex items-start">
|
| 1343 |
+
<div class="bg-blue-100 text-blue-800 rounded-lg p-3 mr-3">
|
| 1344 |
+
<i class="fas fa-tasks"></i>
|
| 1345 |
+
</div>
|
| 1346 |
+
<div>
|
| 1347 |
+
<h3 class="font-medium text-gray-800">${item.title}</h3>
|
| 1348 |
+
<p class="text-sm text-gray-500">${formatDate(new Date(item.date))}</p>
|
| 1349 |
+
${item.description ? `<p class="text-sm text-gray-500 mt-1">${item.description}</p>` : ''}
|
| 1350 |
+
</div>
|
| 1351 |
+
</div>
|
| 1352 |
+
`;
|
| 1353 |
+
}
|
| 1354 |
+
}).join('') : `
|
| 1355 |
+
<div class="empty-state">
|
| 1356 |
+
<i class="fas fa-calendar-alt"></i>
|
| 1357 |
+
<p>Нет предстоящих событий</p>
|
| 1358 |
+
</div>
|
| 1359 |
+
`}
|
| 1360 |
+
</div>
|
| 1361 |
+
</div>
|
| 1362 |
+
|
| 1363 |
+
<div class="card animate-fadeIn delay-300">
|
| 1364 |
+
<h2 class="font-semibold text-gray-800 mb-3">Быстрые действия</h2>
|
| 1365 |
+
<div class="grid grid-cols-4 gap-3 text-center">
|
| 1366 |
+
<button class="p-2 rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200 transition" id="quick-add-task">
|
| 1367 |
+
<i class="fas fa-plus text-lg mb-1"></i>
|
| 1368 |
+
<p class="text-xs">Задача</p>
|
| 1369 |
+
</button>
|
| 1370 |
+
<button class="p-2 rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200 transition" id="quick-add-event">
|
| 1371 |
+
<i class="fas fa-calendar-plus text-lg mb-1"></i>
|
| 1372 |
+
<p class="text-xs">Событие</p>
|
| 1373 |
+
</button>
|
| 1374 |
+
<button class="p-2 rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200 transition" id="quick-add-debt">
|
| 1375 |
+
<i class="fas fa-money-bill-wave text-lg mb-1"></i>
|
| 1376 |
+
<p class="text-xs">Долг</p>
|
| 1377 |
+
</button>
|
| 1378 |
+
<button class="p-2 rounded-lg bg-gray-100 text-gray-700 hover:bg-gray-200 transition" id="quick-generate-congrats">
|
| 1379 |
+
<i class="fas fa-magic text-lg mb-1"></i>
|
| 1380 |
+
<p class="text-xs">Поздравление</p>
|
| 1381 |
+
</button>
|
| 1382 |
+
</div>
|
| 1383 |
+
</div>
|
| 1384 |
+
</div>
|
| 1385 |
+
`;
|
| 1386 |
+
|
| 1387 |
+
// Добавляем обработчики для чекб��ксов задач
|
| 1388 |
+
document.querySelectorAll('[data-task-id]').forEach(checkbox => {
|
| 1389 |
+
checkbox.addEventListener('change', function() {
|
| 1390 |
+
const taskId = parseInt(this.getAttribute('data-task-id'));
|
| 1391 |
+
const task = state.tasks.find(t => t.id === taskId);
|
| 1392 |
+
if (task) {
|
| 1393 |
+
task.completed = this.checked;
|
| 1394 |
+
renderContent();
|
| 1395 |
+
}
|
| 1396 |
+
});
|
| 1397 |
+
});
|
| 1398 |
+
|
| 1399 |
+
// Обработчики для кнопок быстрых действий
|
| 1400 |
+
document.getElementById('quick-add-task').addEventListener('click', () => {
|
| 1401 |
+
state.currentTab = 'tasks';
|
| 1402 |
+
navItems.forEach(item => item.classList.remove('active'));
|
| 1403 |
+
document.querySelector(`.nav-item[data-tab="tasks"]`).classList.add('active');
|
| 1404 |
+
|
| 1405 |
+
// Сброс формы
|
| 1406 |
+
document.getElementById('task-title').value = '';
|
| 1407 |
+
document.getElementById('task-category').value = 'personal';
|
| 1408 |
+
document.getElementById('task-date').value = '';
|
| 1409 |
+
document.getElementById('task-reminder').checked = false;
|
| 1410 |
+
|
| 1411 |
+
// Показываем модальное окно задачи
|
| 1412 |
+
taskModal.classList.add('active');
|
| 1413 |
+
renderContent();
|
| 1414 |
+
});
|
| 1415 |
+
|
| 1416 |
+
document.getElementById('quick-add-event').addEventListener('click', () => {
|
| 1417 |
+
state.currentTab = 'calendar';
|
| 1418 |
+
navItems.forEach(item => item.classList.remove('active'));
|
| 1419 |
+
document.querySelector(`.nav-item[data-tab="calendar"]`).classList.add('active');
|
| 1420 |
+
|
| 1421 |
+
// Сброс формы
|
| 1422 |
+
document.getElementById('event-title').value = '';
|
| 1423 |
+
document.getElementById('event-type').value = 'birthday';
|
| 1424 |
+
document.getElementById('event-date').value = '';
|
| 1425 |
+
document.getElementById('event-time').value = '';
|
| 1426 |
+
document.getElementById('event-description').value = '';
|
| 1427 |
+
document.getElementById('event-reminder').checked = false;
|
| 1428 |
+
document.getElementById('reminder-time').value = '30';
|
| 1429 |
+
document.getElementById('event-repeat').value = 'none';
|
| 1430 |
+
|
| 1431 |
+
// Показываем модальное окно события
|
| 1432 |
+
eventModal.classList.add('active');
|
| 1433 |
+
renderContent();
|
| 1434 |
+
});
|
| 1435 |
+
|
| 1436 |
+
document.getElementById('quick-add-debt').addEventListener('click', () => {
|
| 1437 |
+
state.currentTab = 'wallet';
|
| 1438 |
+
navItems.forEach(item => item.classList.remove('active'));
|
| 1439 |
+
document.querySelector(`.nav-item[data-tab="wallet"]`).classList.add('active');
|
| 1440 |
+
|
| 1441 |
+
// Сброс формы
|
| 1442 |
+
document.getElementById('debt-person').value = '';
|
| 1443 |
+
document.getElementById('debt-amount').value = '';
|
| 1444 |
+
document.getElementById('debt-description').value = '';
|
| 1445 |
+
document.getElementById('debt-date').value = '';
|
| 1446 |
+
document.getElementById('debt-reminder').checked = false;
|
| 1447 |
+
|
| 1448 |
+
// Показываем модальное окно долга
|
| 1449 |
+
debtModal.classList.add('active');
|
| 1450 |
+
renderContent();
|
| 1451 |
+
});
|
| 1452 |
+
|
| 1453 |
+
document.getElementById('quick-generate-congrats').addEventListener('click', () => {
|
| 1454 |
+
// Сброс формы
|
| 1455 |
+
document.getElementById('ai-name').value = '';
|
| 1456 |
+
document.getElementById('ai-age').value = '';
|
| 1457 |
+
document.getElementById('ai-relation').value = 'friend';
|
| 1458 |
+
document.getElementById('ai-style').value = 'friendly';
|
| 1459 |
+
document.getElementById('ai-additional').value = '';
|
| 1460 |
+
document.getElementById('ai-result-container').style.display = 'none';
|
| 1461 |
+
|
| 1462 |
+
// Показываем модальное окно генератора
|
| 1463 |
+
aiModal.classList.add('active');
|
| 1464 |
+
});
|
| 1465 |
+
|
| 1466 |
+
// Обработчики для кнопок создания поздравлений
|
| 1467 |
+
document.querySelectorAll('.generate-congrats').forEach(button => {
|
| 1468 |
+
button.addEventListener('click', function() {
|
| 1469 |
+
const contactId = parseInt(this.getAttribute('data-contact-id'));
|
| 1470 |
+
const contact = state.contacts.find(c => c.id === contactId);
|
| 1471 |
+
|
| 1472 |
+
if (contact) {
|
| 1473 |
+
// Заполняем форму данными контакта
|
| 1474 |
+
document.getElementById('ai-name').value = contact.name;
|
| 1475 |
+
|
| 1476 |
+
const birthday = new Date(contact.birthday);
|
| 1477 |
+
const now = new Date();
|
| 1478 |
+
let age = now.getFullYear() - birthday.getFullYear();
|
| 1479 |
+
|
| 1480 |
+
// Корректируем возраст, если день рождения еще не наступил
|
| 1481 |
+
if (now.getMonth() < birthday.getMonth() ||
|
| 1482 |
+
(now.getMonth() === birthday.getMonth() && now.getDate() < birthday.getDate())) {
|
| 1483 |
+
age--;
|
| 1484 |
+
}
|
| 1485 |
+
|
| 1486 |
+
document.getElementById('ai-age').value = age + 1; // Будет в следующем году
|
| 1487 |
+
document.getElementById('ai-relation').value = contact.relation;
|
| 1488 |
+
document.getElementById('ai-result-container').style.display = 'none';
|
| 1489 |
+
|
| 1490 |
+
// Показываем модальное окно генератора
|
| 1491 |
+
aiModal.classList.add('active');
|
| 1492 |
+
}
|
| 1493 |
+
});
|
| 1494 |
+
});
|
| 1495 |
+
}
|
| 1496 |
+
|
| 1497 |
+
// Рендер страницы задач
|
| 1498 |
+
function renderTasks() {
|
| 1499 |
+
const personalTasks = state.tasks.filter(task => task.category === 'personal');
|
| 1500 |
+
const workTasks = state.tasks.filter(task => task.category === 'work');
|
| 1501 |
+
const familyTasks = state.tasks.filter(task => task.category === 'family');
|
| 1502 |
+
const otherTasks = state.tasks.filter(task => task.category === 'other');
|
| 1503 |
+
|
| 1504 |
+
appContent.innerHTML = `
|
| 1505 |
+
<div class="animate-fadeIn">
|
| 1506 |
+
<div class="flex justify-between items-center mb-6">
|
| 1507 |
+
<h1 class="text-2xl font-bold text-gray-800">Мои задачи</h1>
|
| 1508 |
+
<div class="relative">
|
| 1509 |
+
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Аватар" class="avatar">
|
| 1510 |
+
</div>
|
| 1511 |
+
</div>
|
| 1512 |
+
|
| 1513 |
+
<div class="search-bar">
|
| 1514 |
+
<i class="fas fa-search"></i>
|
| 1515 |
+
<input type="text" placeholder="Поиск задач...">
|
| 1516 |
+
</div>
|
| 1517 |
+
|
| 1518 |
+
<div class="tab-bar">
|
| 1519 |
+
<div class="tab active">Все</div>
|
| 1520 |
+
<div class="tab">Работа</div>
|
| 1521 |
+
<div class="tab">Личное</div>
|
| 1522 |
+
<div class="tab">Семья</div>
|
| 1523 |
+
<div class="tab">Другое</div>
|
| 1524 |
+
</div>
|
| 1525 |
+
|
| 1526 |
+
<div class="mb-4">
|
| 1527 |
+
<h2 class="font-semibold text-gray-800 mb-3">Работа</h2>
|
| 1528 |
+
${workTasks.length > 0 ? workTasks.map(task => `
|
| 1529 |
+
<div class="card mb-3">
|
| 1530 |
+
<div class="flex items-center">
|
| 1531 |
+
<input type="checkbox" ${task.completed ? 'checked' : ''}
|
| 1532 |
+
class="mr-3 h-5 w-5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"
|
| 1533 |
+
data-task-id="${task.id}">
|
| 1534 |
+
<div class="flex-grow">
|
| 1535 |
+
<span class="${task.completed ? 'text-gray-700 line-through' : 'text-gray-700'}">
|
| 1536 |
+
${task.title}
|
| 1537 |
+
</span>
|
| 1538 |
+
${task.date ? `<p class="text-xs text-gray-500 mt-1">${formatDate(new Date(task.date))}</p>` : ''}
|
| 1539 |
+
</div>
|
| 1540 |
+
${task.reminder ? '<i class="fas fa-bell text-yellow-500"></i>' : ''}
|
| 1541 |
+
</div>
|
| 1542 |
+
</div>
|
| 1543 |
+
`).join('') : `
|
| 1544 |
+
<div class="empty-state py-4">
|
| 1545 |
+
<i class="fas fa-tasks"></i>
|
| 1546 |
+
<p>Нет рабочих задач</p>
|
| 1547 |
+
</div>
|
| 1548 |
+
`}
|
| 1549 |
+
</div>
|
| 1550 |
+
|
| 1551 |
+
<div class="mb-4">
|
| 1552 |
+
<h2 class="font-semibold text-gray-800 mb-3">Личное</h2>
|
| 1553 |
+
${personalTasks.length > 0 ? personalTasks.map(task => `
|
| 1554 |
+
<div class="card mb-3">
|
| 1555 |
+
<div class="flex items-center">
|
| 1556 |
+
<input type="checkbox" ${task.completed ? 'checked' : ''}
|
| 1557 |
+
class="mr-3 h-5 w-5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"
|
| 1558 |
+
data-task-id="${task.id}">
|
| 1559 |
+
<div class="flex-grow">
|
| 1560 |
+
<span class="${task.completed ? 'text-gray-700 line-through' : 'text-gray-700'}">
|
| 1561 |
+
${task.title}
|
| 1562 |
+
</span>
|
| 1563 |
+
${task.date ? `<p class="text-xs text-gray-500 mt-1">${formatDate(new Date(task.date))}</p>` : ''}
|
| 1564 |
+
</div>
|
| 1565 |
+
${task.reminder ? '<i class="fas fa-bell text-yellow-500"></i>' : ''}
|
| 1566 |
+
</div>
|
| 1567 |
+
</div>
|
| 1568 |
+
`).join('') : `
|
| 1569 |
+
<div class="empty-state py-4">
|
| 1570 |
+
<i class="fas fa-tasks"></i>
|
| 1571 |
+
<p>Нет личных задач</p>
|
| 1572 |
+
</div>
|
| 1573 |
+
`}
|
| 1574 |
+
</div>
|
| 1575 |
+
|
| 1576 |
+
<div class="mb-4">
|
| 1577 |
+
<h2 class="font-semibold text-gray-800 mb-3">Семья</h2>
|
| 1578 |
+
${familyTasks.length > 0 ? familyTasks.map(task => `
|
| 1579 |
+
<div class="card mb-3">
|
| 1580 |
+
<div class="flex items-center">
|
| 1581 |
+
<input type="checkbox" ${task.completed ? 'checked' : ''}
|
| 1582 |
+
class="mr-3 h-5 w-5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"
|
| 1583 |
+
data-task-id="${task.id}">
|
| 1584 |
+
<div class="flex-grow">
|
| 1585 |
+
<span class="${task.completed ? 'text-gray-700 line-through' : 'text-gray-700'}">
|
| 1586 |
+
${task.title}
|
| 1587 |
+
</span>
|
| 1588 |
+
${task.date ? `<p class="text-xs text-gray-500 mt-1">${formatDate(new Date(task.date))}</p>` : ''}
|
| 1589 |
+
</div>
|
| 1590 |
+
${task.reminder ? '<i class="fas fa-bell text-yellow-500"></i>' : ''}
|
| 1591 |
+
</div>
|
| 1592 |
+
</div>
|
| 1593 |
+
`).join('') : `
|
| 1594 |
+
<div class="empty-state py-4">
|
| 1595 |
+
<i class="fas fa-tasks"></i>
|
| 1596 |
+
<p>Нет семейных задач</p>
|
| 1597 |
+
</div>
|
| 1598 |
+
`}
|
| 1599 |
+
</div>
|
| 1600 |
+
|
| 1601 |
+
<div class="mb-4">
|
| 1602 |
+
<h2 class="font-semibold text-gray-800 mb-3">Другое</h2>
|
| 1603 |
+
${otherTasks.length > 0 ? otherTasks.map(task => `
|
| 1604 |
+
<div class="card mb-3">
|
| 1605 |
+
<div class="flex items-center">
|
| 1606 |
+
<input type="checkbox" ${task.completed ? 'checked' : ''}
|
| 1607 |
+
class="mr-3 h-5 w-5 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"
|
| 1608 |
+
data-task-id="${task.id}">
|
| 1609 |
+
<div class="flex-grow">
|
| 1610 |
+
<span class="${task.completed ? 'text-gray-700 line-through' : 'text-gray-700'}">
|
| 1611 |
+
${task.title}
|
| 1612 |
+
</span>
|
| 1613 |
+
${task.date ? `<p class="text-xs text-gray-500 mt-1">${formatDate(new Date(task.date))}</p>` : ''}
|
| 1614 |
+
</div>
|
| 1615 |
+
${task.reminder ? '<i class="fas fa-bell text-yellow-500"></i>' : ''}
|
| 1616 |
+
</div>
|
| 1617 |
+
</div>
|
| 1618 |
+
`).join('') : `
|
| 1619 |
+
<div class="empty-state py-4">
|
| 1620 |
+
<i class="fas fa-tasks"></i>
|
| 1621 |
+
<p>Нет других задач</p>
|
| 1622 |
+
</div>
|
| 1623 |
+
`}
|
| 1624 |
+
</div>
|
| 1625 |
+
</div>
|
| 1626 |
+
`;
|
| 1627 |
+
|
| 1628 |
+
// Добавляем обработчики для чекбоксов задач
|
| 1629 |
+
document.querySelectorAll('[data-task-id]').forEach(checkbox => {
|
| 1630 |
+
checkbox.addEventListener('change', function() {
|
| 1631 |
+
const taskId = parseInt(this.getAttribute('data-task-id'));
|
| 1632 |
+
const task = state.tasks.find(t => t.id === taskId);
|
| 1633 |
+
if (task) {
|
| 1634 |
+
task.completed = this.checked;
|
| 1635 |
+
renderContent();
|
| 1636 |
+
}
|
| 1637 |
+
});
|
| 1638 |
+
});
|
| 1639 |
+
}
|
| 1640 |
+
|
| 1641 |
+
// Рендер страницы кошелька
|
| 1642 |
+
function renderWallet() {
|
| 1643 |
+
const debtsIOwe = state.debts.filter(debt => debt.type === 'owe');
|
| 1644 |
+
const debtsOwesMe = state.debts.filter(debt => debt.type === 'owed');
|
| 1645 |
+
|
| 1646 |
+
const totalIOwe = debtsIOwe.reduce((sum, debt) => sum + debt.amount, 0);
|
| 1647 |
+
const totalOwesMe = debtsOwesMe.reduce((sum, debt) => sum + debt.amount, 0);
|
| 1648 |
+
const balance = totalOwesMe - totalIOwe;
|
| 1649 |
+
|
| 1650 |
+
appContent.innerHTML = `
|
| 1651 |
+
<div class="animate-fadeIn">
|
| 1652 |
+
<div class="flex justify-between items-center mb-6">
|
| 1653 |
+
<h1 class="text-2xl font-bold text-gray-800">Мой кошелек</h1>
|
| 1654 |
+
<div class="relative">
|
| 1655 |
+
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Аватар" class="avatar">
|
| 1656 |
+
</div>
|
| 1657 |
+
</div>
|
| 1658 |
+
|
| 1659 |
+
<div class="card mb-4">
|
| 1660 |
+
<h2 class="font-semibold text-gray-800 mb-3">Баланс</h2>
|
| 1661 |
+
<div class="text-center py-4">
|
| 1662 |
+
<p class="text-gray-500 mb-1">Общий баланс</p>
|
| 1663 |
+
<p class="text-3xl font-bold ${balance > 0 ? 'text-green-600' : balance < 0 ? 'text-red-600' : 'text-gray-800'}">
|
| 1664 |
+
${balance > 0 ? '+' : ''}${balance} ₽
|
| 1665 |
+
</p>
|
| 1666 |
+
</div>
|
| 1667 |
+
<div class="grid grid-cols-2 gap-4 mt-4">
|
| 1668 |
+
<div class="bg-green-50 p-3 rounded-lg">
|
| 1669 |
+
<p class="text-gray-500 text-sm">Мне должны</p>
|
| 1670 |
+
<p class="text-xl font-bold text-green-600">+${totalOwesMe} ₽</p>
|
| 1671 |
+
</div>
|
| 1672 |
+
<div class="bg-red-50 p-3 rounded-lg">
|
| 1673 |
+
<p class="text-gray-500 text-sm">Я должен</p>
|
| 1674 |
+
<p class="text-xl font-bold text-red-600">-${totalIOwe} ₽</p>
|
| 1675 |
+
</div>
|
| 1676 |
+
</div>
|
| 1677 |
+
</div>
|
| 1678 |
+
|
| 1679 |
+
<div class="flex justify-between items-center mb-3">
|
| 1680 |
+
<h2 class="font-semibold text-gray-800">Мои долги</h2>
|
| 1681 |
+
<div class="text-sm text-gray-500">
|
| 1682 |
+
<span class="mr-2"><span class="inline-block w-2 h-2 rounded-full bg-green-500 mr-1"></span>Мне</span>
|
| 1683 |
+
<span><span class="inline-block w-2 h-2 rounded-full bg-red-500 mr-1"></span>Я</span>
|
| 1684 |
+
</div>
|
| 1685 |
+
</div>
|
| 1686 |
+
|
| 1687 |
+
<div class="card">
|
| 1688 |
+
${debtsIOwe.length > 0 || debtsOwesMe.length > 0 ? `
|
| 1689 |
+
<div class="max-h-96 overflow-y-auto">
|
| 1690 |
+
${debtsOwesMe.map(debt => `
|
| 1691 |
+
<div class="debt-item animate-fadeIn">
|
| 1692 |
+
<div class="debt-avatar debt-owes-me">
|
| 1693 |
+
${getInitials(debt.person)}
|
| 1694 |
+
</div>
|
| 1695 |
+
<div>
|
| 1696 |
+
<p class="font-medium">${debt.person}</p>
|
| 1697 |
+
<p class="text-sm text-gray-500">${debt.description || 'Без описания'}</p>
|
| 1698 |
+
</div>
|
| 1699 |
+
<div class="debt-amount owes-me">+${debt.amount} ₽</div>
|
| 1700 |
+
${debt.reminder ? '<i class="fas fa-bell text-yellow-500 ml-2"></i>' : ''}
|
| 1701 |
+
</div>
|
| 1702 |
+
`).join('')}
|
| 1703 |
+
|
| 1704 |
+
${debtsIOwe.map(debt => `
|
| 1705 |
+
<div class="debt-item animate-fadeIn">
|
| 1706 |
+
<div class="debt-avatar debt-i-owe">
|
| 1707 |
+
${getInitials(debt.person)}
|
| 1708 |
+
</div>
|
| 1709 |
+
<div>
|
| 1710 |
+
<p class="font-medium">${debt.person}</p>
|
| 1711 |
+
<p class="text-sm text-gray-500">${debt.description || 'Без описания'}</p>
|
| 1712 |
+
</div>
|
| 1713 |
+
<div class="debt-amount i-owe">-${debt.amount} ₽</div>
|
| 1714 |
+
${debt.reminder ? '<i class="fas fa-bell text-yellow-500 ml-2"></i>' : ''}
|
| 1715 |
+
</div>
|
| 1716 |
+
`).join('')}
|
| 1717 |
+
</div>
|
| 1718 |
+
` : `
|
| 1719 |
+
<div class="empty-state">
|
| 1720 |
+
<i class="fas fa-coins"></i>
|
| 1721 |
+
<p>Нет записанных долгов</p>
|
| 1722 |
+
<button class="mt-4 px-4 py-2 bg-indigo-600 text-white rounded-lg text-sm font-medium" id="add-first-debt">
|
| 1723 |
+
Добавить первый долг
|
| 1724 |
+
</button>
|
| 1725 |
+
</div>
|
| 1726 |
+
`}
|
| 1727 |
+
</div>
|
| 1728 |
+
</div>
|
| 1729 |
+
`;
|
| 1730 |
+
|
| 1731 |
+
// Обработчик для кнопки добавления первого долга
|
| 1732 |
+
const addFirstDebtBtn = document.getElementById('add-first-debt');
|
| 1733 |
+
if (addFirstDebtBtn) {
|
| 1734 |
+
addFirstDebtBtn.addEventListener('click', () => {
|
| 1735 |
+
// Сброс формы
|
| 1736 |
+
document.getElementById('debt-person').value = '';
|
| 1737 |
+
document.getElementById('debt-amount').value = '';
|
| 1738 |
+
document.getElementById('debt-description').value = '';
|
| 1739 |
+
document.getElementById('debt-date').value = '';
|
| 1740 |
+
document.getElementById('debt-reminder').checked = false;
|
| 1741 |
+
|
| 1742 |
+
// Показываем модальное окно долга
|
| 1743 |
+
debtModal.classList.add('active');
|
| 1744 |
+
});
|
| 1745 |
+
}
|
| 1746 |
+
}
|
| 1747 |
+
|
| 1748 |
+
// Рендер календаря
|
| 1749 |
+
function renderCalendar() {
|
| 1750 |
+
const firstDay = new Date(state.currentYear, state.currentMonth, 1);
|
| 1751 |
+
const lastDay = new Date(state.currentYear, state.currentMonth + 1, 0);
|
| 1752 |
+
const daysInMonth = lastDay.getDate();
|
| 1753 |
+
|
| 1754 |
+
const firstDayIndex = firstDay.getDay() === 0 ? 6 : firstDay.getDay() - 1; // Пн-Вс (0-6)
|
| 1755 |
+
const lastDayIndex = lastDay.getDay() === 0 ? 6 : lastDay.getDay() - 1;
|
| 1756 |
+
|
| 1757 |
+
const daysFromPrevMonth = firstDayIndex;
|
| 1758 |
+
const daysFromNextMonth = 6 - lastDayIndex;
|
| 1759 |
+
|
| 1760 |
+
const totalDays = daysInMonth + daysFromPrevMonth + daysFromNextMonth;
|
| 1761 |
+
const weeks = Math.ceil(totalDays / 7);
|
| 1762 |
+
|
| 1763 |
+
const monthNames = [
|
| 1764 |
+
'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь',
|
| 1765 |
+
'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
|
| 1766 |
+
];
|
| 1767 |
+
|
| 1768 |
+
const dayNames = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс'];
|
| 1769 |
+
|
| 1770 |
+
// Получаем события для текущего месяца
|
| 1771 |
+
const monthEvents = state.events.filter(event => {
|
| 1772 |
+
const eventDate = new Date(event.date);
|
| 1773 |
+
return eventDate.getMonth() === state.currentMonth &&
|
| 1774 |
+
eventDate.getFullYear() === state.currentYear;
|
| 1775 |
+
});
|
| 1776 |
+
|
| 1777 |
+
// Получаем дни рождения для текущего месяца
|
| 1778 |
+
const monthBirthdays = state.contacts.filter(contact => {
|
| 1779 |
+
const birthday = new Date(contact.birthday);
|
| 1780 |
+
return birthday.getMonth() === state.currentMonth;
|
| 1781 |
+
});
|
| 1782 |
+
|
| 1783 |
+
appContent.innerHTML = `
|
| 1784 |
+
<div class="animate-fadeIn">
|
| 1785 |
+
<div class="flex justify-between items-center mb-
|
| 1786 |
+
</html>
|