|
1 | | -nz-float-button-group, |
2 | | -nz-float-button { |
3 | | - position: absolute; |
4 | | - right: 1px; |
5 | | - top: 0; |
| 1 | +:host { |
| 2 | + pointer-events: none; |
6 | 3 | } |
7 | 4 |
|
8 | | -.chat-container { |
| 5 | +.chat-overlay-root { |
9 | 6 | position: fixed; |
10 | | - bottom: 200px; |
11 | | - right: 9px; |
| 7 | + inset: 0; |
12 | 8 | z-index: 99999; |
13 | | - cursor: move; |
14 | | - user-select: none; |
15 | | - overflow: visible; |
16 | | - padding: 10px 0; |
| 9 | + pointer-events: none; |
| 10 | +} |
| 11 | + |
| 12 | +.chat-launcher { |
| 13 | + position: absolute; |
17 | 14 | display: flex; |
18 | 15 | flex-direction: column; |
19 | | - align-items: flex-end; |
| 16 | + align-items: center; |
| 17 | + gap: 2px; |
| 18 | + width: 40px; |
| 19 | + padding: 4px; |
| 20 | + border-radius: 20px; |
| 21 | + color: rgba(255, 255, 255, 0.5); |
| 22 | + background: rgba(255, 255, 255, 0.05); |
| 23 | + box-shadow: none; |
| 24 | + pointer-events: auto; |
| 25 | + user-select: none; |
| 26 | + z-index: 1; |
| 27 | +} |
20 | 28 |
|
21 | | - .content { |
22 | | - height: 100%; |
23 | | - iframe { |
24 | | - border: none; |
25 | | - } |
| 29 | +.chat-drag-handle, |
| 30 | +.chat-action-button { |
| 31 | + display: flex; |
| 32 | + align-items: center; |
| 33 | + justify-content: center; |
| 34 | + width: 32px; |
| 35 | + height: 28px; |
| 36 | + padding: 0; |
| 37 | + border: 0; |
| 38 | + border-radius: 12.5px; |
| 39 | + color: rgba(255, 255, 255, 0.5); |
| 40 | + background: transparent; |
| 41 | + cursor: pointer; |
| 42 | + transition: |
| 43 | + color 0.16s ease, |
| 44 | + background 0.16s ease; |
| 45 | + |
| 46 | + &:hover, |
| 47 | + &:focus-visible { |
| 48 | + color: #fff; |
| 49 | + background: rgba(255, 255, 255, 0.08); |
26 | 50 | } |
| 51 | +} |
27 | 52 |
|
28 | | - .drawer-panel { |
29 | | - background-color: transparent; |
30 | | - position: fixed; |
31 | | - top: 0; |
32 | | - right: 440px; |
33 | | - width: 440px; |
34 | | - min-width: 260px; |
35 | | - height: 100vh; |
36 | | - user-select: none; |
37 | | - border-radius: 10px 0 0 10px; |
38 | | - transition: transform 0.25s cubic-bezier(0.7, 0.3, 0.1, 1); |
39 | | - box-shadow: 0 0 8px 4px #00000014; |
40 | | - transform: translate(100%); |
41 | | - z-index: 1000; |
42 | | - opacity: 0.95; |
| 53 | +.chat-drag-handle { |
| 54 | + cursor: grab; |
| 55 | + touch-action: none; |
| 56 | + |
| 57 | + &.dragging { |
| 58 | + cursor: grabbing; |
43 | 59 | } |
| 60 | +} |
| 61 | + |
| 62 | +.chat-action-group { |
| 63 | + display: flex; |
| 64 | + flex-direction: column; |
| 65 | + align-items: center; |
| 66 | + gap: 2px; |
| 67 | + width: 32px; |
| 68 | +} |
44 | 69 |
|
45 | | - .show { |
46 | | - transition: all 0.3s cubic-bezier(0.7, 0.3, 0.1, 1); |
| 70 | +.chat-action-button { |
| 71 | + .anticon { |
| 72 | + font-size: 16px; |
47 | 73 | } |
48 | 74 |
|
49 | | - .show .modal { |
50 | | - position: fixed; |
51 | | - top: 0; |
52 | | - width: 100%; |
53 | | - height: 100%; |
54 | | - z-index: 100; |
55 | | - opacity: 1; |
| 75 | + .chat-img { |
| 76 | + width: 16px; |
| 77 | + height: 16px; |
| 78 | + opacity: 0.5; |
| 79 | + transition: opacity 0.16s ease; |
56 | 80 | } |
57 | 81 |
|
58 | | - .show .drawer-panel { |
59 | | - transform: translate(0); |
| 82 | + &:hover .chat-img, |
| 83 | + &:focus-visible .chat-img { |
| 84 | + opacity: 1; |
60 | 85 | } |
| 86 | +} |
61 | 87 |
|
62 | | - ::ng-deep { |
63 | | - .ant-float-btn-group { |
64 | | - position: absolute; |
65 | | - padding: 10px 0; |
66 | | - opacity: 1; |
67 | | - } |
| 88 | +.chat-panel { |
| 89 | + position: fixed; |
| 90 | + right: 12px; |
| 91 | + bottom: 12px; |
| 92 | + width: min(440px, calc(100vw - 24px)); |
| 93 | + min-width: 260px; |
| 94 | + height: min(400px, calc(100dvh - 24px)); |
| 95 | + overflow: hidden; |
| 96 | + border-radius: 10px; |
| 97 | + background: #fff; |
| 98 | + box-shadow: 0 0 8px 4px #00000014; |
| 99 | + pointer-events: auto; |
| 100 | + transition: |
| 101 | + width 0.25s cubic-bezier(0.7, 0.3, 0.1, 1), |
| 102 | + height 0.25s cubic-bezier(0.7, 0.3, 0.1, 1), |
| 103 | + border-radius 0.25s cubic-bezier(0.7, 0.3, 0.1, 1); |
| 104 | + z-index: 2; |
68 | 105 |
|
69 | | - .ant-float-btn-group-circle .ant-float-btn-circle:not(:last-child) { |
70 | | - margin-bottom: 5px; |
71 | | - } |
| 106 | + &.chat-panel-expanded { |
| 107 | + top: 0; |
| 108 | + right: 0; |
| 109 | + bottom: auto; |
| 110 | + width: min(440px, 100vw); |
| 111 | + height: 100dvh; |
| 112 | + border-radius: 10px 0 0 10px; |
| 113 | + } |
72 | 114 |
|
73 | | - .ant-float-btn-default, |
74 | | - .ant-float-btn-default .ant-float-btn-body { |
75 | | - position: relative; |
76 | | - background: rgba(30, 30, 30, 0.85); |
77 | | - border-radius: 999px; |
78 | | - box-shadow: 0 6px 16px rgba(0,0,0,.30); |
79 | | - transition: background .2s ease, box-shadow .2s ease; |
| 115 | + .content { |
| 116 | + width: 100%; |
| 117 | + height: 100%; |
| 118 | + |
| 119 | + iframe { |
| 120 | + display: block; |
| 121 | + width: 100%; |
| 122 | + height: 100%; |
80 | 123 | border: none; |
81 | 124 | } |
82 | | - .ant-float-btn-default:hover, |
83 | | - .ant-float-btn-default:hover .ant-float-btn-body { |
84 | | - background: rgba(20, 20, 20, 0.92); |
85 | | - box-shadow: 0 8px 22px rgba(0,0,0,.36); |
86 | | - } |
| 125 | + } |
| 126 | +} |
87 | 127 |
|
88 | | - .ant-float-btn-default .ant-float-btn-body::before, |
89 | | - .ant-float-btn-default::before { |
90 | | - content: ""; |
91 | | - position: absolute; |
92 | | - inset: 0; |
93 | | - border-radius: 999px; |
94 | | - pointer-events: none; |
95 | | - box-shadow: |
96 | | - inset 0 0 0 1px rgba(255,255,255,.65), |
97 | | - 0 0 0 1px rgba(0,0,0,.75); |
98 | | - } |
| 128 | +::ng-deep { |
| 129 | + .chat-drag-handle .anticon { |
| 130 | + font-size: 16px; |
| 131 | + } |
| 132 | +} |
99 | 133 |
|
100 | | - .ant-btn .anticon, |
101 | | - .ant-float-btn .anticon { |
102 | | - color: #fff; |
103 | | - filter: drop-shadow(0 1px 1px rgba(0,0,0,.75)); |
104 | | - } |
| 134 | +@media (max-width: 480px) { |
| 135 | + .chat-panel { |
| 136 | + right: 6px; |
| 137 | + bottom: 6px; |
| 138 | + width: calc(100vw - 12px); |
| 139 | + height: min(400px, calc(100dvh - 12px)); |
105 | 140 |
|
106 | | - img.chat-img { |
107 | | - width: 18px; |
108 | | - height: 18px; |
109 | | - opacity: .95; |
110 | | - filter: drop-shadow(0 1px 1px rgba(0,0,0,.75)); |
| 141 | + &.chat-panel-expanded { |
| 142 | + right: 0; |
| 143 | + width: 100vw; |
| 144 | + border-radius: 0; |
111 | 145 | } |
112 | 146 | } |
113 | 147 | } |
0 commit comments