Доработать UI звонков и нижний тулбар

This commit is contained in:
AidarKC
2026-08-11 13:29:29 +04:00
parent 566ea942dc
commit 628a970e6f
12 changed files with 465 additions and 91 deletions
+238 -50
View File
@@ -10,6 +10,7 @@
justify-content: space-between;
margin-bottom: 14px;
gap: 8px;
padding-top: max(0px, env(safe-area-inset-top));
}
.page-title {
@@ -45,8 +46,10 @@
}
.chat-header-icon-btn {
min-width: 42px;
width: 42px;
min-width: 44px;
width: 44px;
min-height: 44px;
height: 44px;
padding: 0;
display: inline-flex;
align-items: center;
@@ -92,6 +95,22 @@
transition: 0.2s ease;
}
.icon-btn,
.text-btn,
.primary-btn,
.secondary-btn,
.destructive-btn,
.ghost-btn,
.badge.profile-badge-trigger,
.entrypoint-history-item,
.toolbar-item,
.toolbar-action,
.toolbar-button {
user-select: none;
-webkit-user-select: none;
-webkit-touch-callout: none;
}
.icon-btn:hover,
.text-btn:hover,
.primary-btn:hover,
@@ -102,6 +121,18 @@
transform: translateY(-1px);
}
.icon-btn:active,
.text-btn:active,
.primary-btn:active,
.secondary-btn:active,
.destructive-btn:active,
.ghost-btn:active,
.badge.profile-badge-trigger:active,
.entrypoint-history-item:active {
transform: scale(0.98);
filter: brightness(0.96);
}
.primary-btn {
background: linear-gradient(120deg, rgba(218, 179, 87, 0.95), rgba(184, 137, 54, 0.92));
border-color: rgba(242, 210, 129, 0.72);
@@ -1471,8 +1502,8 @@
.toolbar {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
padding: 8px;
gap: 4px;
padding: 4px 4px 2px;
background: rgba(20, 28, 44, 0.95);
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 16px;
@@ -1484,12 +1515,14 @@
border-radius: 12px;
background: transparent;
color: var(--text-muted);
padding: 8px 4px;
padding: 4px 3px 2px;
cursor: pointer;
display: grid;
justify-items: center;
gap: 4px;
gap: 2px;
font-size: 11px;
align-content: end;
min-height: 48px;
}
.toolbar-label-wrap {
@@ -1528,13 +1561,17 @@
}
.toolbar-btn-profile .toolbar-label-wrap {
padding-bottom: 10px;
padding-bottom: 6px;
}
.toolbar-btn-profile .toolbar-connection-indicator {
display: none;
}
.toolbar-connection-indicator {
position: absolute;
left: 50%;
bottom: 2px;
bottom: 0;
transform: translateX(-50%);
display: inline-flex;
align-items: center;
@@ -1543,6 +1580,7 @@
}
.toolbar-connection-text {
display: none;
font-size: 8px;
letter-spacing: 0.02em;
text-transform: lowercase;
@@ -1959,58 +1997,75 @@
.call-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: flex-end;
justify-content: center;
padding: 16px;
background: rgba(6, 10, 16, 0.55);
backdrop-filter: blur(4px);
background: rgba(4, 8, 16, 0.88);
backdrop-filter: blur(8px);
pointer-events: auto;
}
.call-overlay-panel {
width: min(520px, 100%);
border-radius: 18px;
padding: 16px;
border: 1px solid rgba(112, 146, 214, 0.38);
background: linear-gradient(180deg, rgba(15, 27, 51, 0.96), rgba(8, 15, 31, 0.98));
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.46);
display: grid;
gap: 10px;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background:
radial-gradient(circle at 50% 18%, rgba(79, 124, 208, 0.24), transparent 34%),
linear-gradient(180deg, rgba(11, 20, 38, 0.98), rgba(3, 7, 15, 1));
}
.call-overlay-panel--remote-video {
background: #010203;
}
.call-overlay-head {
position: absolute;
top: calc(12px + env(safe-area-inset-top));
left: 14px;
right: 14px;
z-index: 4;
display: flex;
align-items: flex-start;
align-items: center;
justify-content: space-between;
gap: 12px;
gap: 10px;
pointer-events: none;
}
.call-overlay-title {
margin: 0;
font-size: 20px;
color: #eff4ff;
min-height: 22px;
font-size: 14px;
font-weight: 700;
color: rgba(236, 242, 255, 0.94);
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.44);
}
.call-overlay-minimize-btn {
flex: 0 0 auto;
pointer-events: auto;
}
.call-overlay-status {
color: #c8d7f6;
font-size: 14px;
position: absolute;
left: 18px;
right: 18px;
bottom: calc(12px + env(safe-area-inset-bottom));
z-index: 4;
text-align: center;
color: rgba(207, 219, 246, 0.84);
font-size: 13px;
pointer-events: none;
}
.call-video-stage {
position: relative;
width: 100%;
min-height: 220px;
border-radius: 16px;
position: absolute;
inset: 0;
overflow: hidden;
background:
radial-gradient(circle at top, rgba(41, 72, 118, 0.48), transparent 58%),
linear-gradient(180deg, rgba(7, 14, 27, 0.98), rgba(3, 7, 14, 1));
border: 1px solid rgba(118, 154, 228, 0.2);
radial-gradient(circle at 50% 24%, rgba(54, 88, 151, 0.48), transparent 30%),
linear-gradient(180deg, rgba(9, 17, 32, 0.98), rgba(2, 5, 12, 1));
}
.call-video-stage--remote-video {
background: #000;
}
.call-remote-video,
@@ -2023,39 +2078,117 @@
}
.call-remote-video[hidden],
.call-local-preview[hidden] {
.call-local-preview[hidden],
.call-hero[hidden] {
display: none !important;
}
.call-video-placeholder {
.call-hero {
position: absolute;
inset: 0;
left: 0;
right: 0;
top: clamp(8vh, 16vh, 19vh);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 14px;
padding: 0 24px;
text-align: center;
z-index: 2;
}
.call-peer-avatar-slot {
width: min(42vw, 168px);
height: min(42vw, 168px);
display: grid;
place-items: center;
padding: 18px;
color: rgba(223, 234, 255, 0.72);
font-size: 15px;
text-align: center;
}
.call-peer-avatar-slot .call-peer-avatar {
width: 100%;
height: 100%;
min-width: 100%;
min-height: 100%;
border-radius: 999px;
border: 2px solid rgba(221, 233, 255, 0.2);
background: linear-gradient(180deg, rgba(18, 31, 58, 0.96), rgba(9, 15, 29, 0.98));
box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34);
}
.call-peer-avatar-slot .call-peer-avatar.call-peer-avatar--empty {
border-color: rgba(221, 233, 255, 0.28);
background: radial-gradient(circle at 35% 30%, rgba(68, 92, 136, 0.68), rgba(15, 24, 43, 0.98));
}
.call-peer-avatar-slot .call-peer-avatar .avatar-fallback {
font-size: clamp(34px, 9vw, 58px);
font-weight: 800;
}
.call-peer-avatar-slot .call-peer-avatar.call-peer-avatar--empty .avatar-fallback {
display: none;
}
.call-peer-login {
max-width: 86vw;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #f4f8ff;
font-size: clamp(20px, 5.8vw, 28px);
font-weight: 700;
letter-spacing: 0.02em;
}
.call-kind {
color: #ffffff;
font-size: clamp(27px, 8vw, 40px);
font-weight: 800;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.call-hero-status {
max-width: 88vw;
color: rgba(211, 223, 246, 0.9);
font-size: 14px;
line-height: 1.35;
}
.call-local-preview {
position: absolute;
right: 12px;
bottom: 12px;
width: min(32vw, 128px);
right: 16px;
bottom: calc(18px + env(safe-area-inset-bottom));
z-index: 4;
width: min(30vw, 130px);
aspect-ratio: 3 / 4;
border-radius: 14px;
overflow: hidden;
border: 1px solid rgba(176, 205, 255, 0.38);
background: rgba(7, 12, 22, 0.94);
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
cursor: grab;
touch-action: none;
user-select: none;
}
.call-local-preview:active {
cursor: grabbing;
}
.call-overlay-controls {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: calc(env(safe-area-inset-bottom) + clamp(54px, 16vh, 112px));
display: flex;
flex-wrap: wrap;
gap: 8px;
flex-wrap: nowrap;
gap: 18px;
align-items: center;
justify-content: center;
width: min(92vw, 520px);
z-index: 4;
}
.call-overlay-controls[hidden],
@@ -2069,15 +2202,45 @@
}
.call-overlay-controls--incoming {
justify-content: flex-start;
justify-content: center;
}
.call-overlay-controls--active {
justify-content: flex-start;
justify-content: center;
}
.call-overlay .call-icon-btn {
background: rgba(4, 9, 18, 0.18);
border-width: 1.5px;
backdrop-filter: blur(3px);
box-shadow: none;
}
.call-overlay .call-icon-btn--secondary {
border-color: rgba(229, 237, 255, 0.64);
background: rgba(4, 9, 18, 0.12);
color: rgba(244, 248, 255, 0.96);
}
.call-overlay .call-icon-btn--secondary:hover {
border-color: rgba(255, 255, 255, 0.96);
background: rgba(10, 20, 36, 0.22);
}
.call-overlay .call-icon-btn--danger {
border-color: rgba(255, 98, 123, 0.92);
background: rgba(60, 8, 18, 0.12);
color: #ff5b76;
}
.call-overlay .call-icon-btn--danger:hover {
border-color: rgba(255, 131, 150, 0.98);
background: rgba(82, 10, 24, 0.2);
color: #ff788d;
}
.call-decline-btn {
min-width: 120px;
min-width: 132px;
}
.call-accept-btn {
@@ -2087,6 +2250,7 @@
color: #052113;
padding: 9px 12px;
min-height: 38px;
min-width: 132px;
font-weight: 700;
cursor: pointer;
transition: 0.2s ease;
@@ -2107,6 +2271,30 @@
transform: none;
}
@media (max-width: 420px) {
.call-overlay-controls {
gap: 16px;
bottom: calc(env(safe-area-inset-bottom) + clamp(48px, 14vh, 96px));
}
.call-icon-btn {
width: 46px;
min-width: 46px;
height: 46px;
border-radius: 14px;
}
.call-icon-btn svg {
width: 22px;
height: 22px;
}
.call-accept-btn,
.call-decline-btn {
min-width: 124px;
}
}
.pwa-diag-list {
gap: 8px;
}