diff --git a/web/package-lock.json b/web/package-lock.json index c28a2c0..5f0fb0a 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1354,7 +1354,6 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -1515,7 +1514,6 @@ "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "devOptional": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1530,7 +1528,6 @@ "integrity": "sha512-NTKlcQjlAK7MlQoyb6LgaqHc8sso/pVyUJYWMws3jg21uTJw/LddqIFPcPqP6PzpgbIcZyKI85sFE4HBrQDA8A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -1612,7 +1609,6 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.34.tgz", "integrity": "sha512-WdLBG9gm02OgJIG9axd5Hpx0TFLdzVgfG2evFFu8Rur5O/IoGc5cMjnjh3tPL6GnRGsYvUhBSKVPYVcxRKpMCA==", "license": "MIT", - "peer": true, "dependencies": { "@vue/compiler-dom": "3.5.34", "@vue/compiler-sfc": "3.5.34", diff --git a/web/src/views/AdminView.vue b/web/src/views/AdminView.vue index 65980e2..6746114 100644 --- a/web/src/views/AdminView.vue +++ b/web/src/views/AdminView.vue @@ -1382,8 +1382,8 @@ async function parseResponse(response: Response) { const value = await response. stays readable. Compensate viewport heights for that zoom; otherwise a 2K viewport becomes a 1920px-tall admin shell and clips its lower cards. */ @media(min-width:851px){ - :global(html),:global(body),:global(#app){height:calc(100dvh / var(--ui-scale));max-height:calc(100dvh / var(--ui-scale))} - .admin-root,.admin-shell,.admin-sidebar{height:calc(100dvh / var(--ui-scale));min-height:calc(100dvh / var(--ui-scale));max-height:calc(100dvh / var(--ui-scale))} + :global(html),:global(body){height:100dvh;max-height:100dvh} + :global(#app),.admin-root,.admin-shell,.admin-sidebar{height:calc(100dvh / var(--ui-scale));min-height:calc(100dvh / var(--ui-scale));max-height:calc(100dvh / var(--ui-scale))} .admin-main{height:100%;min-height:0} } diff --git a/web/src/views/DemoView.vue b/web/src/views/DemoView.vue index 7129373..575f5c6 100644 --- a/web/src/views/DemoView.vue +++ b/web/src/views/DemoView.vue @@ -88,6 +88,10 @@ function avatarStyle(name: string) { let hash = 0; for (const char of name) hash @media (max-width: 1080px) { .demo-shell { grid-template-columns: 210px minmax(0, 1fr); }.demo-actions-panel { grid-column: 1 / -1; min-height: 160px; }.demo-actions-panel .demo-panel-title { margin-bottom: 3px; }.demo-actions-panel > button { display: inline-flex; width: fit-content; }.demo-note { margin-top: 4px; }.demo-user { margin-top: 0; } } @media (max-width: 720px) { .demo-page { padding: 0 14px 24px; }.demo-header { min-height: 68px; }.demo-tools { gap: 6px; font-size: 10px; }.demo-badge { display: none; }.demo-shell { display: block; min-height: 0; }.demo-channel-panel { margin-bottom: 12px; }.demo-channel-panel .demo-channel:not(.active) { display: none; }.demo-actions-panel { margin-top: 12px; }.demo-main { padding: 17px 14px; }.demo-hero { min-height: 170px; padding: 20px; }.demo-wave { padding-right: 0; transform: scale(.75); transform-origin: right center; }.demo-chat-head { display: grid; align-items: start; }.demo-tabs { overflow-x: auto; }.demo-message { max-width: 94%; } } @media (max-width: 360px) { .demo-tools a { display: none; }.demo-hero h1 { font-size: 23px; }.demo-hero p { font-size: 11px; }.demo-voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } } +/* The whole app is zoomed via #app (zoom:var(--ui-scale)) on large displays; + divide the fixed poke banner offsets back to CSS pixels so it stays at the + intended 82px/25px margin instead of drifting by the zoom factor. */ +@media (min-width: 851px) { .demo-poke { top: calc(82px / var(--ui-scale)); right: calc(25px / var(--ui-scale)); } } :global(:root[data-theme="dark"]) .demo-page { color: #e8f3f0; background: #101918; } :global(:root[data-theme="dark"]) .demo-channel-panel, :global(:root[data-theme="dark"]) .demo-actions-panel, :global(:root[data-theme="dark"]) .demo-main, :global(:root[data-theme="dark"]) .demo-voice-card { background: #172321; border-color: #30413d; } :global(:root[data-theme="dark"]) .demo-panel-title strong, :global(:root[data-theme="dark"]) .demo-hero h1, :global(:root[data-theme="dark"]) .demo-section-heading strong, :global(:root[data-theme="dark"]) .demo-chat-head strong, :global(:root[data-theme="dark"]) .demo-voice-card strong, :global(:root[data-theme="dark"]) .demo-user strong { color: #e8f3f0; } diff --git a/web/src/views/WebClient.vue b/web/src/views/WebClient.vue index ac111b6..10319d6 100644 --- a/web/src/views/WebClient.vue +++ b/web/src/views/WebClient.vue @@ -2236,7 +2236,15 @@ const chatTabLabel = computed(() => chatTab.value === "channel" ? t("textChannel const chatTitle = computed(() => chatTab.value === "channel" ? t("channelChat", { channel: currentChannelName.value }) : chatTab.value === "server" ? t("serverChat") : chatTab.value === "events" ? t("eventLog") : privateConversations.value.find((conversation) => conversation.id === privateClientId.value)?.name ?? t("privateMessage")); const chatPlaceholder = computed(() => chatTab.value === "private" ? t("privateMessagePlaceholder") : chatTab.value === "server" ? t("serverMessagePlaceholder") : t("sendMessagePlaceholder")); const visiblePokes = computed(() => pokeNotifications.slice(-3)); -const memberMenuStyle = computed(() => memberMenu.value ? { left: `${memberMenu.value.x}px`, top: `${memberMenu.value.y}px` } : {}); +const memberMenuStyle = computed(() => { + if (!memberMenu.value) return {}; + // #app applies zoom:var(--ui-scale) which also scales fixed-element + // coordinates against the viewport; divide the pointer position back to CSS + // pixels so the context menu opens exactly where the user clicked on large + // displays. + const scale = Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--ui-scale")) || 1; + return { left: `${memberMenu.value.x / scale}px`, top: `${memberMenu.value.y / scale}px` }; +}); const median = (values: number[]) => { const sorted = [...values].sort((left, right) => left - right); return sorted.length ? sorted[Math.floor(sorted.length / 2)] : null; @@ -3589,9 +3597,24 @@ function stopWhisperTalk(): void { .join-page { height: 100dvh; min-height: 0; overflow: hidden; } .join-content { min-height: 0; } +/* Desktop zoom compensation. main.ts sets --ui-scale (>1 only on large + viewports) and App.vue applies zoom:var(--ui-scale) on #app. html/body stay + pinned to the real viewport (100dvh) while the zoomed roots divide their + height by the scale so the rendered result lands on exactly one viewport. + Without this a 2K/4K viewport would render a 1.5x-tall shell, clipping the + bottom of the workspace and leaving blank space under the control dock. + Non-zero fixed offsets (toast, poke banner) are divided back to CSS pixels + because zoom also scales fixed coordinates against the viewport. */ +@media (min-width: 851px) { + :global(html), :global(body) { height: 100dvh; max-height: 100dvh; } + :global(#app), .web-client, .join-page, .app-shell { height: calc(100dvh / var(--ui-scale)); min-height: 0; max-height: calc(100dvh / var(--ui-scale)); } + .toast { right: calc(24px / var(--ui-scale)); bottom: calc(24px / var(--ui-scale)); } + .poke-banner { top: calc(82px / var(--ui-scale)); right: calc(24px / var(--ui-scale)); } +} + @media (max-width: 740px) { .join-content { overflow-y: auto; } - .app-shell { height: 100dvh; min-height: 0; max-height: 100dvh; padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); overflow: hidden; } + .app-shell { height: 100dvh; min-height: 0; max-height: 100dvh; padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); overflow: hidden; } .app-shell .workspace { height: auto; min-height: 0; flex: 1 1 auto; } .app-shell.mobile-view-channels .workspace { display: none; } .app-shell .member-panel.mobile-section-visible { flex: 1 1 auto; min-height: 0; max-height: none; } @@ -3621,7 +3644,7 @@ function stopWhisperTalk(): void { .member-menu-close { display: none; } @media (max-width: 740px) { - :global(html), :global(body), :global(#app) { height: 100%; min-height: 100%; max-height: none; } + :global(html), :global(body), :global(#app) { height: 100dvh; height: 100svh; min-height: 100dvh; min-height: 100svh; max-height: 100dvh; max-height: 100svh; } .web-client { height: 100dvh; height: 100svh; min-height: 100dvh; min-height: 100svh; max-height: 100dvh; max-height: 100svh; } .app-shell { height: 100dvh; height: 100svh; min-height: 100dvh; min-height: 100svh; max-height: 100dvh; max-height: 100svh; padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); overflow: hidden; } .app-shell .workspace { height: calc(100dvh - 74px - env(safe-area-inset-bottom, 0px)); height: calc(100svh - 74px - env(safe-area-inset-bottom, 0px)); min-height: 0; max-height: calc(100dvh - 74px - env(safe-area-inset-bottom, 0px)); max-height: calc(100svh - 74px - env(safe-area-inset-bottom, 0px)); overflow: hidden; } @@ -3683,7 +3706,7 @@ function stopWhisperTalk(): void { .member-action-button:hover, .member-action-button:active { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-1)); } .app-shell.mobile-view-chat .workspace-scroll { overflow: hidden; } - .app-shell.mobile-view-chat .workspace-content { display: flex; flex-direction: column; min-height: 100%; padding: 0 14px calc(8px + env(safe-area-inset-bottom, 0px)); } + .app-shell.mobile-view-chat .workspace-content { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0 14px calc(8px + env(safe-area-inset-bottom, 0px)); } .app-shell.mobile-view-chat .chat-panel { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin-top: 0; padding: 0; border-top: 0; } .app-shell.mobile-view-chat .chat-tabs { flex: 0 0 auto; margin-top: 0; padding: 10px 0 9px; border-bottom: 1px solid var(--border); scrollbar-width: none; } .app-shell.mobile-view-chat .chat-tabs::-webkit-scrollbar { display: none; }