odant-work 1.0.81 → 1.0.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/#system/package-manifest.json +36 -36
  2. package/$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/calendar.js +38 -8
  3. package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/chat.js +91 -9
  4. package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/video.html +8 -0
  5. package/$server/$folder/$class/$structure/handlers/pages/form/email/$handler/email.js +95 -8
  6. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/system.js +33 -0
  7. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/database.js +22 -1
  8. package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/messengers.js +7 -7
  9. package/$server/$folder/$class/handlers/pages/form/object/$handler/object.js +8 -6
  10. package/$server/$folder/$class/handlers/pages/form/objects/$handler/objects.js +14 -2
  11. package/$server/$folder/handlers/pages/form/$handler/form.js +47 -6
  12. package/$server/$folder/lib/calendar-form/calendar-form.js +7 -5
  13. package/$server/$folder/lib/class-picker/class-picker.js +5 -2
  14. package/$server/$folder/lib/dialogs/confirm/confirm.js +6 -2
  15. package/$server/$folder/lib/dialogs/input/input.js +15 -9
  16. package/$server/$folder/lib/editor-form/editor-form.js +8 -5
  17. package/$server/$folder/lib/explorer/explorer.js +20 -12
  18. package/$server/$folder/lib/local-models-transfer/local-models-transfer.js +3 -2
  19. package/$server/$folder/lib/messenger-settings/messenger-settings.js +4 -4
  20. package/$server/$folder/lib/prompt-bar/prompt-bar.js +2 -2
  21. package/$server/$folder/lib/support/support.js +213 -72
  22. package/oda/components/containers/containers.js +2 -2
  23. package/oda/components/containers/popover/popover.js +83 -18
  24. package/oda/components/inputs/link/link.js +7 -5
  25. package/oda/components/layouts/app-layout/app-layout.js +33 -10
  26. package/oda/components/menus/menu/menu.js +2 -2
  27. package/oda/oda.js +13 -2
  28. package/oda/tools/styles/styles.js +68 -0
  29. package/package.json +1 -1
  30. package/sources/index.html +7 -4
  31. package/sources/manifest.json +12 -6
  32. package/sources/modules/user-profile/user-profile.js +27 -5
  33. package/sources/page.html +7 -4
  34. package/sources/tester.html +4 -4
@@ -8,8 +8,9 @@ const TRANSFER_STYLE = /*css*/`
8
8
  @apply --vertical;
9
9
  gap: 12px;
10
10
  padding: 14px 18px;
11
- width: min(820px, 92vw);
12
- max-height: 78vh;
11
+ width: min(820px, calc(100vw - 24px));
12
+ max-width: 100%;
13
+ max-height: 78dvh;
13
14
  overflow-y: auto;
14
15
  box-sizing: border-box;
15
16
  background: var(--content-background, #ffffff);
@@ -59,7 +59,7 @@ export const MESSENGER_SETTINGS_DEF = {
59
59
  font-size: 12px;
60
60
  font-weight: 600;
61
61
  color: var(--muted-color);
62
- min-width: 140px;
62
+ min-width: min(120px, 100%);
63
63
  }
64
64
  .badge {
65
65
  display: inline-flex;
@@ -186,7 +186,7 @@ export const MESSENGER_SETTINGS_DEF = {
186
186
  </div>
187
187
  <span ~if="!currentUser?.telegram" class="muted">не привязан</span>
188
188
 
189
- <span class="field-label" style="min-width: 70px; margin-left: 12px;">MAX:</span>
189
+ <span class="field-label" style="min-width: 70px;">MAX:</span>
190
190
  <div ~if="currentUser?.max" class="chip">
191
191
  <span>Привязан: {{currentUser.max.username || currentUser.max.firstName || currentUser.max.chatId}}</span>
192
192
  <span style="cursor:pointer; font-weight:bold;" title="Отвязать MAX" @tap="unbind('user', 'max')">×</span>
@@ -225,11 +225,11 @@ export const MESSENGER_SETTINGS_DEF = {
225
225
  <option value="max">MAX Bot API</option>
226
226
  </select>
227
227
  <span class="field-label" style="min-width: 110px;">Название бота:</span>
228
- <input type="text" placeholder="Например: Бот Маслоторг" :value="draftBotLabel" @input="draftBotLabel = $event.target.value" style="min-width: 180px;">
228
+ <input type="text" placeholder="Например: Бот Маслоторг" :value="draftBotLabel" @input="draftBotLabel = $event.target.value" style="min-width: 140px; flex: 1 1 160px; max-width: 100%; box-sizing: border-box;">
229
229
  </div>
230
230
  <div class="row">
231
231
  <span class="field-label">Токен бота:</span>
232
- <input type="password" :placeholder="ownBot?.tokenMask ? 'Сохранён (' + ownBot.tokenMask + ') — введите новый для замены' : 'Токен от @BotFather или MAX'" :value="draftBotToken" @input="draftBotToken = $event.target.value" style="min-width: 280px; flex: 1;">
232
+ <input type="password" :placeholder="ownBot?.tokenMask ? 'Сохранён (' + ownBot.tokenMask + ') — введите новый для замены' : 'Токен от @BotFather или MAX'" :value="draftBotToken" @input="draftBotToken = $event.target.value" style="min-width: 160px; flex: 1 1 200px; max-width: 100%; box-sizing: border-box;">
233
233
  <span class="field-label" style="min-width: 90px;">@username:</span>
234
234
  <input type="text" placeholder="авто или имя_бота" :value="draftBotUsername" @input="draftBotUsername = $event.target.value" style="width: 150px;">
235
235
  </div>
@@ -364,11 +364,11 @@ ODA({ is: 'work-prompt-bar',
364
364
  .file oda-button { padding: 0; border-radius: 50%; }
365
365
  textarea {
366
366
  border: none; outline: none; resize: none; background: transparent; color: inherit;
367
- font: inherit; font-size: 15px; line-height: 1.5; padding: 12px 16px 4px; height: 24px; max-height: 40vh;
367
+ font: inherit; font-size: 15px; line-height: 1.5; padding: 12px 16px 4px; height: 24px; max-height: 36dvh;
368
368
  overflow-y: auto; box-sizing: content-box;
369
369
  }
370
370
  textarea::placeholder { color: var(--muted-color, inherit); opacity: .8; }
371
- .row { @apply --horizontal; align-items: center; gap: 4px; padding: 6px 8px 8px; min-width: 0; }
371
+ .row { @apply --horizontal; align-items: center; flex-wrap: wrap; gap: 4px; padding: 6px 8px 8px; min-width: 0; }
372
372
  .pill {
373
373
  @apply --horizontal; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px; flex-shrink: 1; min-width: 0;
374
374
  border: none; background: transparent; color: inherit; fill: currentColor; font: inherit; font-size: small; cursor: pointer; white-space: nowrap;
@@ -143,21 +143,39 @@ ODA({
143
143
  }
144
144
  .pill {
145
145
  position: fixed;
146
- top: 10px;
146
+ top: max(10px, var(--safe-top, 0px));
147
147
  left: 50%;
148
148
  transform: translateX(-50%);
149
149
  pointer-events: auto;
150
150
  display: flex;
151
151
  align-items: center;
152
- gap: 10px;
152
+ justify-content: center;
153
+ flex-wrap: wrap;
154
+ row-gap: 6px;
155
+ column-gap: 8px;
156
+ max-width: calc(100vw - 16px - var(--safe-left, 0px) - var(--safe-right, 0px));
157
+ box-sizing: border-box;
153
158
  padding: 7px 14px;
154
- border-radius: 999px;
159
+ border-radius: 20px;
155
160
  background: #0f172a;
156
161
  color: #f8fafc;
157
162
  border: 1px solid rgba(56, 189, 248, 0.45);
158
163
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
159
164
  font-size: 12.5px;
160
- white-space: nowrap;
165
+ text-align: center;
166
+ }
167
+ .pill-title {
168
+ display: inline-flex;
169
+ align-items: center;
170
+ gap: 7px;
171
+ min-width: 0;
172
+ }
173
+ .pill-actions {
174
+ display: inline-flex;
175
+ align-items: center;
176
+ flex-wrap: wrap;
177
+ justify-content: center;
178
+ gap: 6px;
161
179
  }
162
180
  .dot {
163
181
  width: 9px;
@@ -221,12 +239,16 @@ ODA({
221
239
  }
222
240
  </style>
223
241
  <div class="pill">
224
- <span class="dot"></span>
225
- <span>Поддержка видит экран · <b>{{ticketId}}</b></span>
226
- <button type="button" class="mode-btn" :class="{ control: mode === 'control' }" @tap="toggleMode()">
227
- {{mode === 'control' ? 'Управление WORK (вкл)' : 'Только просмотр'}}
228
- </button>
229
- <button type="button" class="stop-btn" @tap="stopSession()">Прервать</button>
242
+ <span class="pill-title">
243
+ <span class="dot"></span>
244
+ <span>Поддержка видит экран · <b>{{ticketId}}</b></span>
245
+ </span>
246
+ <span class="pill-actions">
247
+ <button type="button" class="mode-btn" :class="{ control: mode === 'control' }" @tap="toggleMode()">
248
+ {{mode === 'control' ? 'Управление WORK (вкл)' : 'Только просмотр'}}
249
+ </button>
250
+ <button type="button" class="stop-btn" @tap="stopSession()">Прервать</button>
251
+ </span>
230
252
  </div>
231
253
  <div class="cursor" ~if="cursorVisible" :style="'left:' + cursorX + 'px;top:' + cursorY + 'px'">
232
254
  <div class="cursor-dot"></div>
@@ -419,6 +441,8 @@ ODA({
419
441
  display: flex;
420
442
  align-items: center;
421
443
  justify-content: center;
444
+ padding: max(12px, var(--safe-top, 0px)) max(12px, var(--safe-right, 0px)) max(12px, var(--safe-bottom, 0px)) max(12px, var(--safe-left, 0px));
445
+ box-sizing: border-box;
422
446
  background: rgba(15, 23, 42, 0.45);
423
447
  backdrop-filter: blur(3px);
424
448
  font-family: system-ui, -apple-system, sans-serif;
@@ -430,15 +454,19 @@ ODA({
430
454
  pointer-events: none;
431
455
  align-items: flex-end;
432
456
  justify-content: flex-end;
433
- padding: 16px;
457
+ padding: max(12px, var(--safe-top, 0px)) max(16px, var(--safe-right, 0px)) max(16px, var(--safe-bottom, 0px)) max(12px, var(--safe-left, 0px));
434
458
  }
435
459
  .rec-bar {
436
460
  pointer-events: auto;
437
461
  display: flex;
438
462
  align-items: center;
463
+ flex-wrap: wrap;
464
+ justify-content: center;
439
465
  gap: 10px;
466
+ max-width: 100%;
467
+ box-sizing: border-box;
440
468
  padding: 10px 16px;
441
- border-radius: 999px;
469
+ border-radius: 20px;
442
470
  background: #0f172a;
443
471
  color: #fff;
444
472
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
@@ -450,47 +478,57 @@ ODA({
450
478
  border-radius: 50%;
451
479
  background: #ef4444;
452
480
  animation: pulse 1s infinite;
481
+ flex-shrink: 0;
453
482
  }
454
483
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
455
484
  .card {
456
- width: min(820px, 94vw);
457
- max-height: 88vh;
458
- display: flex;
459
- flex-direction: column;
460
- background: var(--content-background, #ffffff);
461
- color: var(--content-color, #0f172a);
462
- border: 1px solid var(--subtle-border, #cbd5e1);
485
+ @apply --dialog-card;
486
+ width: min(820px, 100%);
487
+ max-width: 100%;
488
+ max-height: 100%;
463
489
  border-radius: 14px;
464
- box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
465
- overflow: hidden;
490
+ }
491
+ .card.tab-list {
492
+ height: min(640px, 100%);
466
493
  }
467
494
  .head {
468
- display: flex;
469
- align-items: center;
470
- gap: 10px;
471
- padding: 12px 16px;
495
+ @apply --dialog-head;
496
+ padding: 10px 14px;
472
497
  background: var(--subtle-background, #f8fafc);
473
498
  border-bottom: 1px solid var(--subtle-border, #e2e8f0);
474
499
  }
500
+ .head-brand {
501
+ display: flex;
502
+ align-items: center;
503
+ gap: 8px;
504
+ min-width: 0;
505
+ flex: 0 1 auto;
506
+ }
475
507
  .head-title {
476
508
  font-weight: 700;
477
509
  font-size: 15px;
510
+ white-space: nowrap;
511
+ overflow: hidden;
512
+ text-overflow: ellipsis;
478
513
  }
479
514
  .tabs {
480
515
  display: flex;
516
+ flex-wrap: wrap;
481
517
  gap: 6px;
482
- margin-left: 12px;
518
+ min-width: 0;
483
519
  }
484
520
  .tab-btn {
485
521
  border: 1px solid var(--subtle-border, #cbd5e1);
486
522
  background: var(--content-background, #fff);
487
523
  color: inherit;
488
524
  border-radius: 8px;
489
- padding: 5px 12px;
525
+ padding: 6px 12px;
490
526
  font: inherit;
491
527
  font-size: 12.5px;
492
528
  font-weight: 600;
493
529
  cursor: pointer;
530
+ min-height: 32px;
531
+ box-sizing: border-box;
494
532
  }
495
533
  .tab-btn.active {
496
534
  background: var(--accent-color, #4f46e5);
@@ -503,27 +541,42 @@ ODA({
503
541
  background: transparent;
504
542
  color: var(--muted-color, #64748b);
505
543
  font-size: 20px;
544
+ line-height: 1;
506
545
  cursor: pointer;
507
- padding: 2px 8px;
508
- border-radius: 6px;
546
+ min-width: 34px;
547
+ min-height: 34px;
548
+ display: inline-flex;
549
+ align-items: center;
550
+ justify-content: center;
551
+ border-radius: 8px;
552
+ flex-shrink: 0;
509
553
  }
510
554
  .close-x:hover {
511
555
  background: var(--subtle-background, #e2e8f0);
512
556
  color: var(--content-color, #0f172a);
513
557
  }
514
558
  .body {
515
- padding: 16px;
516
- overflow-y: auto;
559
+ @apply --dialog-body;
560
+ padding: 14px 16px;
517
561
  display: flex;
518
562
  flex-direction: column;
519
563
  gap: 12px;
520
- min-height: 320px;
564
+ }
565
+ .body.list-body {
566
+ overflow: hidden;
567
+ }
568
+ .footer {
569
+ @apply --dialog-footer;
570
+ padding: 10px 16px;
571
+ background: var(--subtle-background, #f8fafc);
572
+ border-top: 1px solid var(--subtle-border, #e2e8f0);
521
573
  }
522
574
  .capture-row {
523
575
  display: flex;
524
576
  gap: 8px;
525
577
  flex-wrap: wrap;
526
578
  align-items: center;
579
+ min-width: 0;
527
580
  }
528
581
  .btn {
529
582
  border: 1px solid var(--subtle-border, #cbd5e1);
@@ -531,13 +584,17 @@ ODA({
531
584
  color: inherit;
532
585
  border-radius: 8px;
533
586
  padding: 7px 12px;
587
+ min-height: 34px;
588
+ box-sizing: border-box;
534
589
  font: inherit;
535
590
  font-size: 13px;
536
591
  font-weight: 600;
537
592
  cursor: pointer;
538
593
  display: inline-flex;
539
594
  align-items: center;
595
+ justify-content: center;
540
596
  gap: 6px;
597
+ max-width: 100%;
541
598
  }
542
599
  .btn:hover { filter: brightness(0.96); }
543
600
  .btn.primary {
@@ -557,6 +614,7 @@ ODA({
557
614
  }
558
615
  textarea, input[type="text"] {
559
616
  width: 100%;
617
+ max-width: 100%;
560
618
  box-sizing: border-box;
561
619
  padding: 9px 12px;
562
620
  border-radius: 8px;
@@ -565,6 +623,7 @@ ODA({
565
623
  color: inherit;
566
624
  font: inherit;
567
625
  font-size: 13px;
626
+ resize: vertical;
568
627
  }
569
628
  .preview-box {
570
629
  border: 1px solid var(--subtle-border, #cbd5e1);
@@ -574,10 +633,13 @@ ODA({
574
633
  display: flex;
575
634
  flex-direction: column;
576
635
  gap: 8px;
636
+ min-width: 0;
577
637
  }
578
638
  .shot-canvas {
579
639
  max-width: 100%;
580
- max-height: 280px;
640
+ max-height: min(260px, 34dvh);
641
+ width: auto;
642
+ height: auto;
581
643
  border-radius: 6px;
582
644
  border: 1px solid var(--subtle-border, #cbd5e1);
583
645
  cursor: crosshair;
@@ -585,19 +647,19 @@ ODA({
585
647
  background: #0f172a;
586
648
  }
587
649
  .tickets-split {
588
- display: grid;
589
- grid-template-columns: 260px 1fr;
650
+ display: flex;
651
+ flex: 1 1 auto;
652
+ min-height: 0;
653
+ min-width: 0;
590
654
  gap: 12px;
591
- min-height: 360px;
592
- }
593
- @media (max-width: 680px) {
594
- .tickets-split { grid-template-columns: 1fr; }
595
655
  }
596
656
  .t-list {
657
+ width: 255px;
658
+ flex-shrink: 0;
597
659
  border: 1px solid var(--subtle-border, #e2e8f0);
598
660
  border-radius: 10px;
599
661
  overflow-y: auto;
600
- max-height: 460px;
662
+ min-height: 0;
601
663
  display: flex;
602
664
  flex-direction: column;
603
665
  }
@@ -608,6 +670,7 @@ ODA({
608
670
  display: flex;
609
671
  flex-direction: column;
610
672
  gap: 4px;
673
+ min-width: 0;
611
674
  }
612
675
  .t-item:hover { background: var(--subtle-background, #f8fafc); }
613
676
  .t-item.active {
@@ -615,27 +678,35 @@ ODA({
615
678
  border-left: 3px solid var(--accent-color, #4f46e5);
616
679
  }
617
680
  .t-thread {
681
+ flex: 1 1 auto;
682
+ min-width: 0;
683
+ min-height: 0;
618
684
  border: 1px solid var(--subtle-border, #e2e8f0);
619
685
  border-radius: 10px;
620
686
  padding: 12px;
621
687
  display: flex;
622
688
  flex-direction: column;
623
689
  gap: 10px;
624
- max-height: 460px;
690
+ }
691
+ .t-back {
692
+ display: none;
625
693
  }
626
694
  .msgs {
627
- flex: 1;
695
+ flex: 1 1 auto;
696
+ min-height: 0;
628
697
  overflow-y: auto;
629
698
  display: flex;
630
699
  flex-direction: column;
631
700
  gap: 8px;
701
+ overscroll-behavior: contain;
632
702
  }
633
703
  .msg {
634
704
  padding: 8px 11px;
635
705
  border-radius: 10px;
636
706
  background: var(--subtle-background, #f1f5f9);
637
707
  font-size: 13px;
638
- max-width: 90%;
708
+ max-width: 92%;
709
+ word-break: break-word;
639
710
  }
640
711
  .msg.support {
641
712
  align-self: flex-start;
@@ -646,6 +717,17 @@ ODA({
646
717
  align-self: flex-end;
647
718
  background: color-mix(in srgb, var(--accent-color, #4f46e5) 10%, var(--content-background, #fff));
648
719
  }
720
+ .reply-bar {
721
+ display: flex;
722
+ gap: 8px;
723
+ align-items: center;
724
+ flex-shrink: 0;
725
+ min-width: 0;
726
+ }
727
+ .reply-bar input {
728
+ flex: 1 1 auto;
729
+ min-width: 0;
730
+ }
649
731
  .tag {
650
732
  display: inline-flex;
651
733
  align-items: center;
@@ -667,9 +749,61 @@ ODA({
667
749
  flex-direction: column;
668
750
  gap: 8px;
669
751
  font-size: 13px;
752
+ flex-shrink: 0;
670
753
  }
671
754
  .err { color: #dc2626; font-size: 12.5px; }
672
755
  .muted { color: var(--muted-color, #64748b); font-size: 12px; }
756
+ @media (max-width: 680px) {
757
+ .tickets-split {
758
+ flex-direction: column;
759
+ }
760
+ .t-list {
761
+ width: 100%;
762
+ flex: 1 1 auto;
763
+ }
764
+ .tickets-split.mobile-thread .t-list {
765
+ display: none;
766
+ }
767
+ .tickets-split:not(.mobile-thread) .t-thread {
768
+ display: none;
769
+ }
770
+ .t-back {
771
+ display: inline-flex;
772
+ }
773
+ }
774
+ @media (max-width: 640px) {
775
+ :host(:not([minimized])) {
776
+ padding: 0;
777
+ }
778
+ .card {
779
+ width: 100%;
780
+ height: 100%;
781
+ max-width: 100%;
782
+ max-height: 100%;
783
+ border-radius: 0;
784
+ border: none;
785
+ }
786
+ .head {
787
+ padding: max(10px, var(--safe-top, 0px)) max(12px, var(--safe-right, 0px)) 10px max(12px, var(--safe-left, 0px));
788
+ }
789
+ .tabs {
790
+ order: 3;
791
+ width: 100%;
792
+ }
793
+ .tabs .tab-btn {
794
+ flex: 1 1 auto;
795
+ text-align: center;
796
+ }
797
+ .body {
798
+ padding: 12px max(12px, var(--safe-right, 0px)) 12px max(12px, var(--safe-left, 0px));
799
+ }
800
+ .footer {
801
+ padding: 10px max(12px, var(--safe-right, 0px)) max(10px, var(--safe-bottom, 0px)) max(12px, var(--safe-left, 0px));
802
+ }
803
+ .footer .btn {
804
+ flex: 1 1 auto;
805
+ }
806
+ }
673
807
  </style>
674
808
 
675
809
  <div ~if="recording" class="rec-bar">
@@ -678,10 +812,12 @@ ODA({
678
812
  <button type="button" class="btn danger" style="padding:4px 10px;font-size:12px" @tap="stopVideoCapture()">⏹ Остановить</button>
679
813
  </div>
680
814
 
681
- <div ~if="!minimized" class="card">
815
+ <div ~if="!minimized" class="card" :class="{ 'tab-list': activeTab === 'list' && tickets.length > 0 }">
682
816
  <div class="head">
683
- <oda-icon icon="icons:help" icon-size="20"></oda-icon>
684
- <span class="head-title">Служба поддержки ODANT-WORK</span>
817
+ <div class="head-brand">
818
+ <oda-icon icon="icons:help" icon-size="20" style="flex-shrink:0"></oda-icon>
819
+ <span class="head-title">Служба поддержки ODANT-WORK</span>
820
+ </div>
685
821
  <div class="tabs">
686
822
  <button type="button" class="tab-btn" :class="{ active: activeTab === 'new' }" @tap="activeTab = 'new'">Новое обращение</button>
687
823
  <button type="button" class="tab-btn" :class="{ active: activeTab === 'list' }" @tap="openListTab()">
@@ -707,7 +843,7 @@ ODA({
707
843
  <div class="preview-box" ~if="hasScreenshot">
708
844
  <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap">
709
845
  <span class="muted">Можно обвести проблемное место прямо мышью по скриншоту:</span>
710
- <div style="display:flex;gap:6px">
846
+ <div style="display:flex;gap:6px;flex-wrap:wrap">
711
847
  <button type="button" class="btn" style="padding:4px 9px;font-size:12px" @tap="clearScreenshotMarkup()">Сбросить пометки</button>
712
848
  <button type="button" class="btn" style="padding:4px 9px;font-size:12px;color:#dc2626" @tap="removeScreenshot()">Удалить скриншот</button>
713
849
  </div>
@@ -721,43 +857,43 @@ ODA({
721
857
 
722
858
  <!-- Предпросмотр видео -->
723
859
  <div class="preview-box" ~if="videoDataUrl">
724
- <div style="display:flex;align-items:center;justify-content:space-between">
860
+ <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap">
725
861
  <span class="muted">Записанное видео ({{videoName}})</span>
726
862
  <button type="button" class="btn" style="padding:4px 9px;font-size:12px;color:#dc2626" @tap="removeVideo()">Удалить видео</button>
727
863
  </div>
728
- <video controls :src="videoDataUrl" style="max-height:240px;border-radius:6px;background:#000"></video>
864
+ <video controls :src="videoDataUrl" style="max-width:100%;max-height:min(240px,32dvh);border-radius:6px;background:#000"></video>
729
865
  </div>
730
866
 
731
867
  <div>
732
868
  <textarea rows="4" placeholder="Опишите проблему: что делали, что ожидали и что пошло не так…" ::value="problemText"></textarea>
733
869
  </div>
734
870
 
735
- <label style="display:flex;align-items:center;gap:8px;font-size:12.5px;cursor:pointer;user-select:none">
736
- <input type="checkbox" ::checked="includeTech">
871
+ <label style="display:flex;align-items:flex-start;gap:8px;font-size:12.5px;cursor:pointer;user-select:none">
872
+ <input type="checkbox" style="margin-top:2px;flex-shrink:0" ::checked="includeTech">
737
873
  <span>Приложить технические данные (версия WORK, путь текущей формы и ошибки)</span>
738
874
  </label>
739
875
 
740
876
  <div ~if="error" class="err">{{error}}</div>
877
+ </div>
741
878
 
742
- <div style="display:flex;justify-content:flex-end;gap:8px">
743
- <button type="button" class="btn" @tap="closePanel()">Отмена</button>
744
- <button type="button" class="btn primary" :disabled="sending" @tap="submitTicket()">
745
- {{sending ? 'Отправка…' : 'Отправить в поддержку'}}
746
- </button>
747
- </div>
879
+ <div class="footer" ~if="activeTab === 'new'">
880
+ <button type="button" class="btn" @tap="closePanel()">Отмена</button>
881
+ <button type="button" class="btn primary" :disabled="sending" @tap="submitTicket()">
882
+ {{sending ? 'Отправка…' : 'Отправить в поддержку'}}
883
+ </button>
748
884
  </div>
749
885
 
750
886
  <!-- Вкладка: Список обращений и переписка -->
751
- <div class="body" ~if="activeTab === 'list'">
887
+ <div class="body list-body" ~if="activeTab === 'list'">
752
888
  <div ~if="error" class="err">{{error}}</div>
753
889
  <div ~if="!tickets.length && !loading" class="muted" style="padding:24px;text-align:center">
754
890
  Обращений пока нет. Нажмите «Новое обращение», чтобы написать в службу поддержки.
755
891
  </div>
756
- <div class="tickets-split" ~if="tickets.length">
892
+ <div class="tickets-split" :class="{ 'mobile-thread': mobileTicketOpen }" ~if="tickets.length">
757
893
  <div class="t-list">
758
- <div class="t-item" ~for="tickets" :class="{ active: selectedTicketId === $for.item.ticketId }" @tap="selectTicket($for.item.ticketId)">
759
- <div style="display:flex;align-items:center;justify-content:space-between;gap:6px">
760
- <b style="font-size:12.5px">{{$for.item.ticketId}}</b>
894
+ <div class="t-item" ~for="tickets" :class="{ active: selectedTicketId === $for.item.ticketId }" @tap="selectTicket($for.item.ticketId, true)">
895
+ <div style="display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0">
896
+ <b style="font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{{$for.item.ticketId}}</b>
761
897
  <span class="tag" :class="$for.item.status === 'answered' ? 'ok' : ($for.item.status === 'in_progress' ? 'info' : 'warn')">
762
898
  {{statusLabel($for.item.status)}}
763
899
  </span>
@@ -774,11 +910,12 @@ ODA({
774
910
  </div>
775
911
 
776
912
  <div class="t-thread" ~if="selectedTicket">
777
- <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--subtle-border,#e2e8f0);padding-bottom:8px">
778
- <div>
913
+ <div style="display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--subtle-border,#e2e8f0);padding-bottom:8px;flex-shrink:0">
914
+ <div style="display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0">
915
+ <button type="button" class="btn t-back" style="padding:4px 8px;font-size:12px" @tap="mobileTicketOpen = false">← Список</button>
779
916
  <b>{{selectedTicket.ticketId}}</b>
780
- <span class="tag" style="margin-left:6px">{{selectedTicket.tierName || 'Поддержка'}}</span>
781
- <span ~if="selectedTicket.assignedSupportName" class="muted" style="margin-left:6px">Инженер: {{selectedTicket.assignedSupportName}}</span>
917
+ <span class="tag">{{selectedTicket.tierName || 'Поддержка'}}</span>
918
+ <span ~if="selectedTicket.assignedSupportName" class="muted">Инженер: {{selectedTicket.assignedSupportName}}</span>
782
919
  </div>
783
920
  <button ~if="selectedTicket.status !== 'closed'" type="button" class="btn" style="padding:4px 9px;font-size:12px" @tap="startRemoteDesktop(selectedTicket.ticketId, 'view')">
784
921
  🖥 Поделиться экраном
@@ -801,16 +938,16 @@ ODA({
801
938
  <div style="white-space:pre-wrap">{{$for.item.text}}</div>
802
939
  <div ~if="$for.item.attachments?.length" style="display:flex;gap:6px;flex-wrap:wrap;margin-top:6px">
803
940
  <div ~for="$for.item.attachments">
804
- <img ~if="$for.$for.item.kind !== 'video'" :src="mediaUrl($for.$for.item)" style="max-width:220px;max-height:140px;border-radius:6px;border:1px solid var(--subtle-border);cursor:pointer" @tap="loadMediaInto($event, selectedTicket.ticketId, $for.$for.item)">
805
- <video ~if="$for.$for.item.kind === 'video'" controls preload="metadata" :src="mediaUrl($for.$for.item)" style="max-width:260px;max-height:160px;border-radius:6px;background:#000"></video>
941
+ <img ~if="$for.$for.item.kind !== 'video'" :src="mediaUrl($for.$for.item)" style="max-width:min(220px,100%);max-height:140px;border-radius:6px;border:1px solid var(--subtle-border);cursor:pointer" @tap="loadMediaInto($event, selectedTicket.ticketId, $for.$for.item)">
942
+ <video ~if="$for.$for.item.kind === 'video'" controls preload="metadata" :src="mediaUrl($for.$for.item)" style="max-width:min(260px,100%);max-height:160px;border-radius:6px;background:#000"></video>
806
943
  </div>
807
944
  </div>
808
945
  </div>
809
946
  </div>
810
947
 
811
- <div ~if="selectedTicket.status !== 'closed'" style="display:flex;gap:8px;align-items:center">
948
+ <div ~if="selectedTicket.status !== 'closed'" class="reply-bar">
812
949
  <input type="text" placeholder="Написать сообщение инженеру…" ::value="replyText" @keydown.enter="sendReply()">
813
- <button type="button" class="btn primary" :disabled="sending" @tap="sendReply()">Отправить</button>
950
+ <button type="button" class="btn primary" style="flex-shrink:0" :disabled="sending" @tap="sendReply()">Отправить</button>
814
951
  </div>
815
952
  </div>
816
953
  </div>
@@ -842,6 +979,7 @@ ODA({
842
979
  tickets: [],
843
980
  unreadTotal: 0,
844
981
  selectedTicketId: '',
982
+ mobileTicketOpen: false,
845
983
  replyText: '',
846
984
  _mediaCache: {},
847
985
  _pollTimer: null,
@@ -878,9 +1016,10 @@ ODA({
878
1016
  },
879
1017
  async openListTab() {
880
1018
  this.activeTab = 'list';
1019
+ this.mobileTicketOpen = false;
881
1020
  await this.refreshTickets();
882
1021
  if (this.selectedTicket)
883
- await this.selectTicket(this.selectedTicket.ticketId);
1022
+ await this.selectTicket(this.selectedTicket.ticketId, false);
884
1023
  },
885
1024
  async refreshTickets() {
886
1025
  this.loading = true;
@@ -901,8 +1040,10 @@ ODA({
901
1040
  this.loading = false;
902
1041
  }
903
1042
  },
904
- async selectTicket(ticketId) {
1043
+ async selectTicket(ticketId, openOnMobile = false) {
905
1044
  this.selectedTicketId = ticketId;
1045
+ if (openOnMobile)
1046
+ this.mobileTicketOpen = true;
906
1047
  const t = (this.tickets || []).find(x => x.ticketId === ticketId);
907
1048
  if (t && t.unreadCount > 0) {
908
1049
  await WORK.fetch('/', 'support_mark_read', {}, JSON.stringify({ ticketId })).catch(() => {});
@@ -164,7 +164,7 @@ ODA.showMenu = async function (params = {}, e) {
164
164
  return ODA.showPopover(menu, { ...params, popoverType: 'menu' }, e);
165
165
  };
166
166
  ODA.showConfirm = function (textContent = 'Подтвердить?', params = {}) {
167
- const el = ODA.createElement('p', { textContent, style: 'margin: var(--space-l);' });
167
+ const el = ODA.createElement('p', { textContent, style: 'margin: var(--space-l); max-width: min(440px, 100%); word-break: break-word;' });
168
168
  return ODA.showDialog(el, {
169
169
  allowClose: true,
170
170
  TITLE: { label: 'Подтверждение' },
@@ -176,7 +176,7 @@ ODA.showConfirm = function (textContent = 'Подтвердить?', params = {}
176
176
  /** Ввод строки: результат — введённое значение (пусто → отмена). */
177
177
  ODA.showPrompt = function (label = '', params = {}) {
178
178
  const input = ODA.createElement('input', { value: params.value ?? '', placeholder: params.placeholder ?? '' });
179
- input.style.cssText = 'margin: var(--space-l); padding: var(--control-padding); border: 1px solid var(--control-border-color); border-radius: var(--control-radius); font: inherit;';
179
+ input.style.cssText = 'margin: var(--space-l); width: min(360px, calc(100% - 32px)); box-sizing: border-box; padding: var(--control-padding); border: 1px solid var(--control-border-color); border-radius: var(--control-radius); font: inherit;';
180
180
  queueMicrotask(() => input.focus());
181
181
  return ODA.showDialog(input, {
182
182
  allowClose: true,