mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Add Nova design theme: redesigned menu bar, connect splash screen
- Restyle classic top menu bar into pill-chip items merged into the same row as the WebSpeak3 logo/server/status cluster, collapsed behind a hamburger button with an outside-click/Escape-aware dropdown panel (nested submenus flip to open leftward to avoid clipping at the viewport edge). - Make the Connect dialog the sole visible surface while disconnected in Nova: it auto-opens on load and after every disconnect, and the app chrome (menu/toolbar/body/log) is hidden behind it until a connection succeeds. - Rebuild the Connect dialog for Nova to match the TS6 Redesign mockup's dedicated Connect screen: centered hero (logo/title/ subtitle) above an elevated card, a chevron-toggle "Erweiterte Optionen" moved under the nickname field, reordered ghost/primary footer buttons, and a fixed settings-gear shortcut into Options. The 11 existing form fields/handlers are shared with the Standard dialog via one JSX tree, decorated only through small nova ternaries. - Nova starts with an empty server-address field instead of the Standard theme's "localhost" default. - All changes scoped under .ts-app.ts-design-nova (or nested classes); Standard theme verified pixel- and behavior-identical throughout via repeated live comparisons.
This commit is contained in:
1 parent
8e78ae98c9
commit
3ad086aedd
3 files changed
+1070
-38
No files matched your search
+788
@@ -64,6 +64,731 @@
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
/* Nova: alternate design, independent of the light/dark toggle (always dark). */
|
||||
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&display=swap");
|
||||
|
||||
.ts-app.ts-design-nova {
|
||||
--success: oklch(0.75 0.15 150);
|
||||
--bg: oklch(0.17 0.014 258);
|
||||
--bg-toolbar-1: oklch(0.205 0.015 258);
|
||||
--bg-toolbar-2: oklch(0.245 0.016 258);
|
||||
--border: oklch(0.32 0.015 258);
|
||||
--border-soft: oklch(0.27 0.014 258);
|
||||
--text: oklch(0.94 0.006 258);
|
||||
--text-muted: oklch(0.62 0.014 258);
|
||||
--text-faint: oklch(0.46 0.012 258);
|
||||
--accent: #7fb0e8;
|
||||
--input-bg: oklch(0.205 0.015 258);
|
||||
--input-text: oklch(0.94 0.006 258);
|
||||
--button-bg-1: oklch(0.245 0.016 258);
|
||||
--button-bg-2: oklch(0.205 0.015 258);
|
||||
--button-bg-hover-1: oklch(0.28 0.017 258);
|
||||
--button-bg-hover-2: oklch(0.245 0.016 258);
|
||||
--row-hover: oklch(0.28 0.017 258);
|
||||
--client-text: oklch(0.94 0.006 258);
|
||||
--self-text: #7fb0e8;
|
||||
--log-bg: oklch(0.17 0.014 258);
|
||||
--log-text: oklch(0.62 0.014 258);
|
||||
--log-error: oklch(0.68 0.16 25);
|
||||
color-scheme: dark;
|
||||
font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova button,
|
||||
.ts-app.ts-design-nova select,
|
||||
.ts-app.ts-design-nova input[type="text"],
|
||||
.ts-app.ts-design-nova input[type="password"],
|
||||
.ts-app.ts-design-nova input[type="search"],
|
||||
.ts-app.ts-design-nova .ts-dialog {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* Nova structural reskin: beyond palette/font, give panels, rows, tabs and
|
||||
chat their own rounded "card" language instead of the Standard theme's
|
||||
flush, hard-edged panes. Standard's layout isn't sacred here - Nova also
|
||||
reorders the top-level app sections (all flex siblings of .ts-app) so the
|
||||
mic/volume/output controls read as a bottom "voice control bar" like the
|
||||
redesign, instead of a top toolbar. */
|
||||
|
||||
.ts-app.ts-design-nova > .ts-menubar {
|
||||
order: 0;
|
||||
padding: 0.5rem 1.1rem;
|
||||
gap: 1.1rem;
|
||||
background: var(--bg-toolbar-1);
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-menubar .ts-nova-menu-dropdown {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
/* Nova-theme-only: collapses Verbindungen/Favoriten/.../Hilfe behind a single
|
||||
hamburger button, opening them as a dropdown panel instead of a bare row. */
|
||||
|
||||
.ts-nova-menu-dropdown {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ts-nova-menu-toggle {
|
||||
font-size: 15px;
|
||||
padding: 0.3rem 0.55rem;
|
||||
}
|
||||
|
||||
.ts-menubar-items.ts-nova-menu-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ts-menubar-items.ts-nova-menu-panel.ts-nova-menu-panel-open {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
right: 0;
|
||||
margin-top: 6px;
|
||||
gap: 2px;
|
||||
padding: 6px;
|
||||
background: var(--bg-toolbar-1);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
|
||||
z-index: 30;
|
||||
}
|
||||
|
||||
.ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-dropdown {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* The panel itself docks flush against the right viewport edge, so its nested
|
||||
submenus must open leftward instead of the default rightward - opening right
|
||||
here would run straight off-screen. */
|
||||
.ts-menubar-items.ts-nova-menu-panel-open .ts-menu {
|
||||
left: auto;
|
||||
right: 100%;
|
||||
top: -6px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item,
|
||||
.ts-menubar-items.ts-nova-menu-panel-open .ts-menubar-item-active {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Nova splash: while disconnected, the connect dialog IS the app - the whole
|
||||
chrome (menu, toolbar, tree/chat/log) stays mounted but hidden behind it,
|
||||
and reappears the instant a connection exists (see the useEffect forcing
|
||||
connectDialogOpen and the ts-nova-splash class in App.tsx). */
|
||||
|
||||
.ts-app.ts-design-nova.ts-nova-splash > .ts-menubar,
|
||||
.ts-app.ts-design-nova.ts-nova-splash > .ts-toolbar,
|
||||
.ts-app.ts-design-nova.ts-nova-splash > .ts-body,
|
||||
.ts-app.ts-design-nova.ts-nova-splash > .ts-log {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova.ts-nova-splash .ts-dialog-backdrop {
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
/* Connect screen, ported from the TS6 redesign's Connect.dc.html: a centered
|
||||
hero (logo/title/subtitle) above an elevated card, instead of a plain
|
||||
titled dialog box floating on a dim backdrop. */
|
||||
|
||||
.ts-connect-nova-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 22px;
|
||||
width: min(520px, 92vw);
|
||||
}
|
||||
|
||||
.ts-connect-nova-hero {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ts-connect-nova-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 16px;
|
||||
background: var(--accent);
|
||||
color: var(--bg-toolbar-1);
|
||||
font-weight: 800;
|
||||
font-size: 26px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-connect-nova-title {
|
||||
font-size: 19px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.ts-connect-nova-subtitle {
|
||||
font-size: 12.5px;
|
||||
color: var(--text-muted);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-connect-dialog {
|
||||
width: auto;
|
||||
background: var(--button-bg-1);
|
||||
border-color: var(--border-soft);
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-body {
|
||||
padding: 22px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-field {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
gap: 6px;
|
||||
/* Flex items default to min-width:auto, i.e. their content's intrinsic width -
|
||||
for an <input> that's the browser's default control size, which is wider than
|
||||
the space left in a two-up .ts-dialog-row once padding grows this much. Without
|
||||
this the password/select field refuses to shrink and overflows the card. */
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* The password field doesn't grow, so once the row's available width is split
|
||||
fairly it should still keep a usable minimum instead of shrinking to a sliver -
|
||||
flex-shrink can still take it below this only if the row itself is too narrow. */
|
||||
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-row > .ts-dialog-field:not(.ts-dialog-field-grow) {
|
||||
flex: 0 0 150px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-field input,
|
||||
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-field select {
|
||||
border-radius: 11px;
|
||||
padding: 11px 14px;
|
||||
font-size: 13.5px;
|
||||
border-color: var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-connect-nova-expand {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
align-self: flex-start;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
font-size: 12.5px;
|
||||
font-weight: 700;
|
||||
font-family: inherit;
|
||||
padding: 2px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ts-connect-nova-chevron {
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.ts-connect-nova-chevron-open {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-connect-dialog .ts-dialog-grid {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.ts-connect-nova-buttons {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
padding: 0 22px 22px;
|
||||
}
|
||||
|
||||
.ts-connect-nova-buttons button {
|
||||
border-radius: 12px;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ts-connect-cancel,
|
||||
.ts-connect-nova-buttons button[disabled] {
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
border: 1px solid var(--border-soft);
|
||||
padding: 12px 18px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ts-connect-nova-primary {
|
||||
flex: 1;
|
||||
background: var(--accent);
|
||||
color: var(--bg-toolbar-1);
|
||||
border: none;
|
||||
padding: 12px 20px;
|
||||
font-size: 13.5px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.ts-connect-nova-primary:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.ts-connect-nova-settings {
|
||||
position: fixed;
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 10px;
|
||||
background: var(--button-bg-1);
|
||||
border: 1px solid var(--border-soft);
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.ts-connect-nova-settings:hover {
|
||||
background: var(--row-hover);
|
||||
}
|
||||
|
||||
/* Splash mode hides the cancel button specifically - with nothing connected
|
||||
yet there is no "back" to cancel to. */
|
||||
.ts-app.ts-design-nova.ts-nova-splash .ts-connect-cancel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-menubar .ts-menubar-item {
|
||||
padding: 0.3rem 0.65rem;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-menubar .ts-menubar-item-active {
|
||||
padding: 0.3rem 0.65rem;
|
||||
border-radius: 999px;
|
||||
background: var(--bg-toolbar-2);
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-menubar .ts-menubar-item-active:hover {
|
||||
background: var(--row-hover);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-body {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-log {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-toolbar {
|
||||
order: 3;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
background: var(--bg-toolbar-2);
|
||||
border-bottom: none;
|
||||
border-top: 1px solid var(--border-soft);
|
||||
padding: 0.6rem 1.2rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-toolbar .ts-toolbar-icons {
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
gap: 0.6rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-toolbar .ts-icon-button {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-toolbar .ts-toolbar-sep {
|
||||
height: 26px;
|
||||
align-self: center;
|
||||
margin: 0 0.3rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova > .ts-toolbar .ts-app-logo {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
/* New Nova-only status strip: server name + connection pill, folded into the
|
||||
menubar row (right of the menu items) as the app's visual anchor. */
|
||||
|
||||
.ts-nova-topbar-server {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.ts-nova-topbar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border-radius: 8px;
|
||||
background: var(--accent);
|
||||
color: var(--bg-toolbar-1);
|
||||
font-weight: 800;
|
||||
font-size: 13px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-nova-topbar-name {
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.ts-nova-topbar-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 3px 10px;
|
||||
border-radius: 999px;
|
||||
background: var(--bg-toolbar-2);
|
||||
color: var(--text-muted);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.ts-nova-topbar-status-on {
|
||||
background: color-mix(in srgb, var(--success) 18%, transparent);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.ts-nova-topbar-dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Self card in the bottom voice bar: avatar + name + status, mirroring the
|
||||
mockup's left-hand cluster (Standard's toolbar has no equivalent). */
|
||||
|
||||
.ts-nova-toolbar-self {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding-right: 0.9rem;
|
||||
margin-right: 0.5rem;
|
||||
border-right: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-nova-toolbar-avatar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 11px;
|
||||
background: var(--accent);
|
||||
color: var(--bg-toolbar-1);
|
||||
font-weight: 800;
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ts-nova-toolbar-self-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.ts-nova-toolbar-self-name {
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.ts-nova-toolbar-self-status {
|
||||
font-size: 11px;
|
||||
color: var(--success);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-icon-button,
|
||||
.ts-app.ts-design-nova .ts-toolbar-fields button,
|
||||
.ts-app.ts-design-nova .ts-chat-input-row button {
|
||||
border-radius: 10px;
|
||||
background: var(--button-bg-1);
|
||||
padding: 0.35rem 0.6rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-icon-button:hover,
|
||||
.ts-app.ts-design-nova .ts-toolbar-fields button:hover,
|
||||
.ts-app.ts-design-nova .ts-chat-input-row button:hover {
|
||||
background: var(--button-bg-hover-1);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-icon-caret {
|
||||
border-radius: 0 10px 10px 0;
|
||||
background: var(--button-bg-1);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-toolbar-away .ts-icon-button {
|
||||
border-radius: 10px 0 0 10px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-upper {
|
||||
gap: 0.6rem;
|
||||
padding: 0.6rem 0.6rem 0;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-tree-panel,
|
||||
.ts-app.ts-design-nova .ts-info-panel {
|
||||
background: var(--bg-toolbar-1);
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-resize-handle-vertical,
|
||||
.ts-app.ts-design-nova .ts-resize-handle-horizontal {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-banner-panel {
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--border-soft);
|
||||
margin: 0 0.6rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-panel {
|
||||
background: var(--bg-toolbar-1);
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
margin: 0.6rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-row {
|
||||
padding: 4px 6px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-client-row {
|
||||
padding-left: 1.1rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-row-selected {
|
||||
border-radius: 8px;
|
||||
outline-color: var(--accent);
|
||||
background: var(--bg-toolbar-2);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-tabs {
|
||||
order: -1;
|
||||
border-top: none;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
padding: 0.5rem 0.6rem 0;
|
||||
gap: 0.2rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-tab {
|
||||
border: none;
|
||||
border-bottom: 2.5px solid transparent;
|
||||
border-radius: 8px 8px 0 0;
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
padding: 0.45rem 0.7rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-tab:hover:not(.ts-chat-tab-active) {
|
||||
background: var(--row-hover);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-tab-active {
|
||||
background: transparent;
|
||||
color: var(--accent);
|
||||
border-bottom-color: var(--accent);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Bubble-style chat messages, matching the TS6 mockup: own messages align
|
||||
right in an accent-filled bubble, others align left in a muted-surface
|
||||
bubble; system/log lines render as a centered pill. */
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-messages {
|
||||
padding: 0.9rem 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.6rem;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 2px;
|
||||
max-width: 70%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-line-self {
|
||||
align-self: flex-end;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-from {
|
||||
font-size: 11.5px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-line-self .ts-chat-from {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-bubble {
|
||||
display: inline-block;
|
||||
background: var(--bg-toolbar-2);
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: 4px 14px 14px 14px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-line-self .ts-chat-bubble {
|
||||
background: var(--accent);
|
||||
color: var(--bg-toolbar-1);
|
||||
border-radius: 14px 4px 14px 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-line-log {
|
||||
align-self: center;
|
||||
align-items: center;
|
||||
max-width: none;
|
||||
background: var(--bg-toolbar-2);
|
||||
color: var(--text-faint);
|
||||
font-style: italic;
|
||||
font-size: 11.5px;
|
||||
padding: 0.25rem 0.75rem;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-input-row {
|
||||
border-top: 1px solid var(--border-soft);
|
||||
padding: 0.6rem 0.8rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-input-row textarea {
|
||||
border-radius: 14px;
|
||||
border-color: var(--border-soft);
|
||||
background: var(--bg-toolbar-2);
|
||||
padding: 0.55rem 0.8rem;
|
||||
}
|
||||
|
||||
/* Round, icon-only accent send button, matching the mockup's composer. */
|
||||
.ts-app.ts-design-nova .ts-chat-input-row button {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
background: var(--accent);
|
||||
color: transparent;
|
||||
font-size: 0;
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-input-row button:hover {
|
||||
background: var(--accent);
|
||||
filter: brightness(1.08);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-input-row button:disabled {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-chat-input-row button::before {
|
||||
content: "➤";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 15px;
|
||||
color: var(--bg-toolbar-1);
|
||||
}
|
||||
|
||||
/* Client avatar chips: colored initial squares, Nova-only (Standard theme
|
||||
keeps its plain icon + name row). */
|
||||
.ts-client-avatar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-client-avatar {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
font-size: 9px;
|
||||
font-weight: 800;
|
||||
color: oklch(0.18 0.02 258);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-log {
|
||||
border-top: 1px solid var(--border-soft);
|
||||
margin: 0 0.6rem 0.6rem;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-dialog {
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-menu {
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova .ts-menu-item:hover:not(:disabled) {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova ::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova ::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ts-app.ts-design-nova ::-webkit-scrollbar-thumb {
|
||||
background: var(--border);
|
||||
border-radius: 999px;
|
||||
border: 2px solid var(--bg);
|
||||
}
|
||||
|
||||
/* Demo mode banner */
|
||||
|
||||
.ts-demo-banner {
|
||||
@@ -102,6 +827,12 @@
|
||||
|
||||
/* Toolbar */
|
||||
|
||||
.ts-menubar-items {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.1rem;
|
||||
}
|
||||
|
||||
.ts-menubar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1631,6 +2362,63 @@
|
||||
margin: 0 0 0.75rem;
|
||||
}
|
||||
|
||||
.ts-design-theme-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.ts-design-theme-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.4rem;
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
background: var(--input-bg);
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.ts-design-theme-card:hover {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.ts-design-theme-card-active {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 1px var(--accent);
|
||||
}
|
||||
|
||||
.ts-design-theme-swatch {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid var(--border-soft);
|
||||
}
|
||||
|
||||
.ts-design-theme-swatch-standard {
|
||||
background: linear-gradient(135deg, #eef1f4 0%, #d7dce2 100%);
|
||||
}
|
||||
|
||||
.ts-design-theme-swatch-nova {
|
||||
background: linear-gradient(135deg, oklch(0.245 0.016 258) 0%, oklch(0.17 0.014 258) 100%);
|
||||
box-shadow: inset 0 0 0 1px #7fb0e8;
|
||||
}
|
||||
|
||||
.ts-design-theme-card-name {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.ts-design-theme-card-desc {
|
||||
font-size: 11px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.ts-options-columns {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
|
||||
+268
-38
@@ -137,6 +137,13 @@ const PLAYBACK_VOLUME_KEY = "webspeak3:playback-volume";
|
||||
const NOISE_SUPPRESSION_KEY = "webspeak3:noise-suppression";
|
||||
const ECHO_CANCELLATION_KEY = "webspeak3:echo-cancellation";
|
||||
const VAD_HANGOVER_KEY = "webspeak3:vad-hangover";
|
||||
const DESIGN_THEME_KEY = "webspeak3:design-theme";
|
||||
|
||||
type DesignTheme = "standard" | "nova";
|
||||
|
||||
function loadDesignTheme(): DesignTheme {
|
||||
return localStorage.getItem(DESIGN_THEME_KEY) === "nova" ? "nova" : "standard";
|
||||
}
|
||||
|
||||
function loadBoolPref(key: string, fallback: boolean): boolean {
|
||||
const raw = localStorage.getItem(key);
|
||||
@@ -567,6 +574,12 @@ function ChannelTree({
|
||||
title={c.id === ownClientId ? undefined : `${t("tree.privateChatWith")} ${c.name}`}
|
||||
>
|
||||
<ClientIcon />
|
||||
<span
|
||||
className="ts-client-avatar"
|
||||
style={{ background: c.id === ownClientId ? "var(--accent)" : clientAvatarColor(c.name) }}
|
||||
>
|
||||
{c.name.trim().charAt(0).toUpperCase() || "?"}
|
||||
</span>
|
||||
{countryFlag(c.country) && <span title={c.country}>{countryFlag(c.country)}</span>}
|
||||
<span>{c.name}</span>
|
||||
{c.away && c.awayMessage && (
|
||||
@@ -758,6 +771,8 @@ function ConnectDialog({
|
||||
onToggleExpanded,
|
||||
onConnect,
|
||||
onCancel,
|
||||
nova,
|
||||
onOpenOptions,
|
||||
}: {
|
||||
host: string;
|
||||
nickname: string;
|
||||
@@ -777,39 +792,76 @@ function ConnectDialog({
|
||||
onToggleExpanded: () => void;
|
||||
onConnect: () => void;
|
||||
onCancel: () => void;
|
||||
/** Nova-theme-only: renders the TS6-redesign "connect hero" (logo, title,
|
||||
* subtitle, settings shortcut) around the same form instead of the
|
||||
* Standard theme's plain titled dialog box. */
|
||||
nova: boolean;
|
||||
onOpenOptions: () => void;
|
||||
}) {
|
||||
const t = useT();
|
||||
const backdrop = useBackdropDismiss(onCancel);
|
||||
return (
|
||||
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||
<div className="ts-dialog ts-connect-dialog" onClick={(e) => e.stopPropagation()}>
|
||||
|
||||
// Nova-theme-only: the "Erweiterte Optionen" toggle moves from the footer
|
||||
// (Standard) to right under the nickname field, with a rotating chevron -
|
||||
// matching the TS6 redesign's Connect screen instead of a plain button.
|
||||
const expandToggle = nova ? (
|
||||
<button className="ts-connect-nova-expand" onClick={onToggleExpanded}>
|
||||
<svg
|
||||
className={`ts-connect-nova-chevron${expanded ? " ts-connect-nova-chevron-open" : ""}`}
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2.6"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
>
|
||||
<path d="M9 6l6 6-6 6" />
|
||||
</svg>
|
||||
{expanded ? t("connect.less") : t("connect.more")}
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={onToggleExpanded}>{expanded ? t("connect.less") : t("connect.more")}</button>
|
||||
);
|
||||
|
||||
const dialogBody = (
|
||||
<div className="ts-dialog ts-connect-dialog" onClick={(e) => e.stopPropagation()}>
|
||||
{nova ? (
|
||||
<button className="ts-connect-nova-settings" onClick={onOpenOptions} title={t("menu.extras.options")}>
|
||||
⚙️
|
||||
</button>
|
||||
) : (
|
||||
<div className="ts-dialog-titlebar">
|
||||
<span>{t("connect.title")}</span>
|
||||
<button onClick={onCancel} title={t("dialog.close")}>
|
||||
✕
|
||||
</button>
|
||||
</div>
|
||||
<div className="ts-dialog-body">
|
||||
<div className="ts-dialog-row">
|
||||
<label className="ts-dialog-field ts-dialog-field-grow">
|
||||
{t("connect.serverAddress")}
|
||||
<input autoFocus value={host} onChange={(e) => onHostChange(e.target.value)} />
|
||||
</label>
|
||||
<label className="ts-dialog-field">
|
||||
{t("connect.serverPassword")}
|
||||
<input
|
||||
type="password"
|
||||
value={serverPassword}
|
||||
onChange={(e) => onServerPasswordChange(e.target.value)}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
<label className="ts-dialog-field">
|
||||
{t("connect.nickname")}
|
||||
<input value={nickname} onChange={(e) => onNicknameChange(e.target.value)} />
|
||||
)}
|
||||
<div className="ts-dialog-body">
|
||||
<div className="ts-dialog-row">
|
||||
<label className="ts-dialog-field ts-dialog-field-grow">
|
||||
{t("connect.serverAddress")}
|
||||
<input autoFocus value={host} onChange={(e) => onHostChange(e.target.value)} />
|
||||
</label>
|
||||
<label className="ts-dialog-field">
|
||||
{t("connect.serverPassword")}
|
||||
<input
|
||||
type="password"
|
||||
value={serverPassword}
|
||||
onChange={(e) => onServerPasswordChange(e.target.value)}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
<label className="ts-dialog-field">
|
||||
{t("connect.nickname")}
|
||||
<input value={nickname} onChange={(e) => onNicknameChange(e.target.value)} />
|
||||
</label>
|
||||
|
||||
{expanded && (
|
||||
{nova && expandToggle}
|
||||
|
||||
{expanded && (
|
||||
<div className="ts-dialog-grid">
|
||||
<label className="ts-dialog-field">
|
||||
{t("connect.phoneticNickname")}
|
||||
@@ -868,19 +920,57 @@ function ConnectDialog({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="ts-dialog-buttons">
|
||||
<button onClick={onToggleExpanded}>{expanded ? t("connect.less") : t("connect.more")}</button>
|
||||
<div className="ts-dialog-buttons-right">
|
||||
<button onClick={onConnect} disabled={connecting || !host || !nickname}>
|
||||
{connecting ? t("connect.connecting") : t("connect.connect")}
|
||||
</button>
|
||||
<div className={nova ? "ts-connect-nova-buttons" : "ts-dialog-buttons"}>
|
||||
{!nova && expandToggle}
|
||||
<div className={nova ? undefined : "ts-dialog-buttons-right"}>
|
||||
{nova && (
|
||||
<button className="ts-connect-cancel" onClick={onCancel}>
|
||||
{t("connect.cancel")}
|
||||
</button>
|
||||
)}
|
||||
{!nova && (
|
||||
<button onClick={onConnect} disabled={connecting || !host || !nickname}>
|
||||
{connecting ? t("connect.connecting") : t("connect.connect")}
|
||||
</button>
|
||||
)}
|
||||
<button disabled title="Not supported in the web client">
|
||||
{t("connect.newTab")}
|
||||
</button>
|
||||
<button onClick={onCancel}>{t("connect.cancel")}</button>
|
||||
{nova ? (
|
||||
<button
|
||||
className="ts-connect-nova-primary"
|
||||
onClick={onConnect}
|
||||
disabled={connecting || !host || !nickname}
|
||||
>
|
||||
{connecting ? t("connect.connecting") : t("connect.connect")}
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={onCancel}>{t("connect.cancel")}</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
if (!nova)
|
||||
return (
|
||||
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||
{dialogBody}
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="ts-dialog-backdrop" {...backdrop}>
|
||||
<div className="ts-connect-nova-wrap">
|
||||
<div className="ts-connect-nova-hero">
|
||||
<span className="ts-connect-nova-logo">W</span>
|
||||
<div className="ts-connect-nova-heading">
|
||||
<div className="ts-connect-nova-title">{t("connect.title")}</div>
|
||||
<div className="ts-connect-nova-subtitle">{t("connect.novaSubtitle")}</div>
|
||||
</div>
|
||||
</div>
|
||||
{dialogBody}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1933,6 +2023,15 @@ function groupBadgeColor(iconId: number): string {
|
||||
return `hsl(${hue}, 55%, 45%)`;
|
||||
}
|
||||
|
||||
/** Nova-theme-only: a stable per-name color for the client avatar chips,
|
||||
* hashed from the name so the same person always gets the same color. */
|
||||
function clientAvatarColor(name: string): string {
|
||||
let hash = 0;
|
||||
for (let i = 0; i < name.length; i++) hash = (hash * 31 + name.charCodeAt(i)) >>> 0;
|
||||
const hue = hash % 360;
|
||||
return `oklch(0.6 0.13 ${hue})`;
|
||||
}
|
||||
|
||||
/** The icon repository lives under TS3's special "channel 0" - not a real,
|
||||
* selectable channel, just the server-wide filebase icons are stored in.
|
||||
* Icon files are always named "icon_<id>", where <id> is what a server/
|
||||
@@ -3472,6 +3571,39 @@ function AnwendungPanel() {
|
||||
);
|
||||
}
|
||||
|
||||
function DesignPanel({
|
||||
designTheme,
|
||||
onDesignThemeChange,
|
||||
}: {
|
||||
designTheme: DesignTheme;
|
||||
onDesignThemeChange: (next: DesignTheme) => void;
|
||||
}) {
|
||||
const t = useT();
|
||||
const themes: { id: DesignTheme; name: string; desc: string }[] = [
|
||||
{ id: "standard", name: t("design.theme.standard"), desc: t("design.theme.standard.desc") },
|
||||
{ id: "nova", name: t("design.theme.nova"), desc: t("design.theme.nova.desc") },
|
||||
];
|
||||
return (
|
||||
<>
|
||||
<h3>{t("options.section.design")}</h3>
|
||||
<p className="ts-options-subtitle">{t("design.subtitle")}</p>
|
||||
<div className="ts-design-theme-grid">
|
||||
{themes.map((th) => (
|
||||
<button
|
||||
key={th.id}
|
||||
className={`ts-design-theme-card${th.id === designTheme ? " ts-design-theme-card-active" : ""}`}
|
||||
onClick={() => onDesignThemeChange(th.id)}
|
||||
>
|
||||
<span className={`ts-design-theme-swatch ts-design-theme-swatch-${th.id}`} />
|
||||
<span className="ts-design-theme-card-name">{th.name}</span>
|
||||
<span className="ts-design-theme-card-desc">{th.desc}</span>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function SoundsPanel() {
|
||||
const t = useT();
|
||||
const [enabled, setEnabled] = useState(() => loadSoundsEnabled());
|
||||
@@ -3739,11 +3871,15 @@ function OptionsDialog({
|
||||
onSectionChange,
|
||||
onClose,
|
||||
audio,
|
||||
designTheme,
|
||||
onDesignThemeChange,
|
||||
}: {
|
||||
section: string;
|
||||
onSectionChange: (id: string) => void;
|
||||
onClose: () => void;
|
||||
audio: AudioSettings;
|
||||
designTheme: DesignTheme;
|
||||
onDesignThemeChange: (next: DesignTheme) => void;
|
||||
}) {
|
||||
const t = useT();
|
||||
const active = OPTIONS_SECTIONS.find((s) => s.id === section) ?? OPTIONS_SECTIONS[0];
|
||||
@@ -3779,6 +3915,8 @@ function OptionsDialog({
|
||||
<AufnahmePanel audio={audio} />
|
||||
) : active.id === "sounds" ? (
|
||||
<SoundsPanel />
|
||||
) : active.id === "design" ? (
|
||||
<DesignPanel designTheme={designTheme} onDesignThemeChange={onDesignThemeChange} />
|
||||
) : active.id === "nachrichten" ? (
|
||||
<NachrichtenPanel />
|
||||
) : (
|
||||
@@ -4037,7 +4175,11 @@ function ServerEditDialog({
|
||||
}
|
||||
|
||||
function AppInner() {
|
||||
const [host, setHost] = useState(() => localStorage.getItem(LAST_HOST_KEY) ?? (DEMO_MODE ? DEMO_HOST : "localhost"));
|
||||
const [host, setHost] = useState(
|
||||
() =>
|
||||
localStorage.getItem(LAST_HOST_KEY) ??
|
||||
(DEMO_MODE ? DEMO_HOST : loadDesignTheme() === "nova" ? "" : "localhost")
|
||||
);
|
||||
const [nickname, setNickname] = useState(
|
||||
() => localStorage.getItem(LAST_NICKNAME_KEY) ?? (DEMO_MODE ? "Guest" : "")
|
||||
);
|
||||
@@ -4142,6 +4284,11 @@ function AppInner() {
|
||||
const [theme, setTheme] = useState<"light" | "dark">(() =>
|
||||
window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light"
|
||||
);
|
||||
const [designTheme, setDesignTheme] = useState<DesignTheme>(() => loadDesignTheme());
|
||||
const handleDesignThemeChange = (next: DesignTheme) => {
|
||||
setDesignTheme(next);
|
||||
localStorage.setItem(DESIGN_THEME_KEY, next);
|
||||
};
|
||||
const [micOn, setMicOn] = useState(false);
|
||||
const [talkers, setTalkers] = useState<Set<number>>(new Set());
|
||||
const [selfActive, setSelfActive] = useState(false);
|
||||
@@ -4160,6 +4307,9 @@ function AppInner() {
|
||||
);
|
||||
const [micTestOn, setMicTestOn] = useState(false);
|
||||
const [connectionsMenuOpen, setConnectionsMenuOpen] = useState(false);
|
||||
// Nova-theme-only: collapses the classic menu items behind a hamburger button.
|
||||
const [novaMenuOpen, setNovaMenuOpen] = useState(false);
|
||||
const novaMenuRef = useRef<HTMLDivElement | null>(null);
|
||||
const [favorites, setFavorites] = useState<Favorite[]>(() => loadFavorites());
|
||||
const [favoritesMenuOpen, setFavoritesMenuOpen] = useState(false);
|
||||
const [favoritesDialogMode, setFavoritesDialogMode] = useState<
|
||||
@@ -4836,6 +4986,22 @@ function AppInner() {
|
||||
setAwayDialogOpen(false);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!novaMenuOpen) return;
|
||||
const onPointerDown = (e: MouseEvent) => {
|
||||
if (!novaMenuRef.current?.contains(e.target as Node)) setNovaMenuOpen(false);
|
||||
};
|
||||
const onKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.key === "Escape") setNovaMenuOpen(false);
|
||||
};
|
||||
window.addEventListener("mousedown", onPointerDown);
|
||||
window.addEventListener("keydown", onKeyDown);
|
||||
return () => {
|
||||
window.removeEventListener("mousedown", onPointerDown);
|
||||
window.removeEventListener("keydown", onKeyDown);
|
||||
};
|
||||
}, [novaMenuOpen]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!connectionsMenuOpen) return;
|
||||
const onPointerDown = (e: MouseEvent) => {
|
||||
@@ -5097,6 +5263,13 @@ function AppInner() {
|
||||
return () => window.removeEventListener("keydown", onKeyDown);
|
||||
}, [connected, connecting, host, nickname, serverPassword, defaultChannel, channelPassword]);
|
||||
|
||||
// Nova-theme-only: the connect dialog IS the app until a connection exists -
|
||||
// it's forced open on load and after every disconnect, and closes itself the
|
||||
// moment a connection succeeds.
|
||||
useEffect(() => {
|
||||
if (designTheme === "nova" && !connected) setConnectDialogOpen(true);
|
||||
}, [designTheme, connected]);
|
||||
|
||||
// Overrides let a device/DSP-setting change take effect immediately, without
|
||||
// waiting for the next render's (possibly still-stale) state closure.
|
||||
const startMic = async (overrides?: {
|
||||
@@ -5918,9 +6091,14 @@ function AppInner() {
|
||||
? new Set(talkers).add(ownClient.id)
|
||||
: talkers;
|
||||
const t = useT();
|
||||
const novaSplash = designTheme === "nova" && !connected;
|
||||
|
||||
return (
|
||||
<div className={`ts-app ts-theme-${theme}${demoForceMobile ? " ts-force-mobile" : ""}`}>
|
||||
<div
|
||||
className={`ts-app ts-theme-${theme}${designTheme === "nova" ? " ts-design-nova" : ""}${
|
||||
demoForceMobile ? " ts-force-mobile" : ""
|
||||
}${novaSplash ? " ts-nova-splash" : ""}`}
|
||||
>
|
||||
{DEMO_MODE && (
|
||||
<div className="ts-demo-banner">
|
||||
Demo mode — simulated data only, no real TeamSpeak server involved.{" "}
|
||||
@@ -5933,6 +6111,21 @@ function AppInner() {
|
||||
</div>
|
||||
)}
|
||||
<div className="ts-menubar">
|
||||
<div className={designTheme === "nova" ? "ts-nova-menu-dropdown" : undefined} ref={novaMenuRef}>
|
||||
{designTheme === "nova" && (
|
||||
<button
|
||||
className="ts-icon-button ts-nova-menu-toggle"
|
||||
onClick={() => setNovaMenuOpen((v) => !v)}
|
||||
aria-label={t("menu.connections")}
|
||||
>
|
||||
☰
|
||||
</button>
|
||||
)}
|
||||
<div
|
||||
className={`ts-menubar-items${designTheme === "nova" ? " ts-nova-menu-panel" : ""}${
|
||||
novaMenuOpen ? " ts-nova-menu-panel-open" : ""
|
||||
}`}
|
||||
>
|
||||
<div className="ts-menubar-dropdown" ref={connectionsMenuRef}>
|
||||
<span
|
||||
className="ts-menubar-item ts-menubar-item-active"
|
||||
@@ -6376,9 +6569,34 @@ function AppInner() {
|
||||
)}
|
||||
</div>
|
||||
<span className="ts-menubar-item">{t("menu.help")}</span>
|
||||
</div>
|
||||
</div>
|
||||
{designTheme === "nova" && (
|
||||
<div className="ts-nova-topbar-server">
|
||||
<span className="ts-nova-topbar-logo">W</span>
|
||||
<span className="ts-nova-topbar-name">{connected ? serverName || host : "WebSpeak3"}</span>
|
||||
<span className={`ts-nova-topbar-status${connected ? " ts-nova-topbar-status-on" : ""}`}>
|
||||
<span className="ts-nova-topbar-dot" />
|
||||
{connected ? t("design.status.connected") : t("tree.notConnected")}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="ts-toolbar">
|
||||
{designTheme === "nova" && connected && ownClient && (
|
||||
<div className="ts-nova-toolbar-self">
|
||||
<span className="ts-nova-toolbar-avatar">
|
||||
{ownClient.name.trim().charAt(0).toUpperCase() || "?"}
|
||||
</span>
|
||||
<span className="ts-nova-toolbar-self-info">
|
||||
<span className="ts-nova-toolbar-self-name">{ownClient.name}</span>
|
||||
<span className="ts-nova-toolbar-self-status">
|
||||
{isAway ? t("tree.away") : t("design.status.connected")}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
<div className="ts-toolbar-icons">
|
||||
<div className="ts-toolbar-away" ref={awayMenuRef}>
|
||||
<button
|
||||
@@ -6580,7 +6798,9 @@ function AppInner() {
|
||||
onActiveIdentityChange={handleActiveIdentityChange}
|
||||
onToggleExpanded={() => setConnectDialogExpanded((v) => !v)}
|
||||
onConnect={handleConnect}
|
||||
onCancel={() => setConnectDialogOpen(false)}
|
||||
onCancel={novaSplash ? () => {} : () => setConnectDialogOpen(false)}
|
||||
nova={designTheme === "nova"}
|
||||
onOpenOptions={() => setOptionsDialogOpen(true)}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -6809,6 +7029,8 @@ function AppInner() {
|
||||
section={optionsSection}
|
||||
onSectionChange={setOptionsSection}
|
||||
onClose={() => setOptionsDialogOpen(false)}
|
||||
designTheme={designTheme}
|
||||
onDesignThemeChange={handleDesignThemeChange}
|
||||
audio={{
|
||||
outputDevices,
|
||||
outputDeviceId,
|
||||
@@ -7320,8 +7542,12 @@ function AppInner() {
|
||||
<div className="ts-chat-messages">
|
||||
{activeTab === "channel"
|
||||
? chat.map((entry, i) => (
|
||||
<div key={i} className="ts-chat-line">
|
||||
<span className="ts-chat-from">{entry.from}:</span> <span>{entry.message}</span>
|
||||
<div
|
||||
key={i}
|
||||
className={`ts-chat-line${entry.from === ownClient?.name ? " ts-chat-line-self" : ""}`}
|
||||
>
|
||||
<span className="ts-chat-from">{entry.from}:</span>{" "}
|
||||
<span className="ts-chat-bubble">{entry.message}</span>
|
||||
</div>
|
||||
))
|
||||
: activeTab === "server"
|
||||
@@ -7331,17 +7557,21 @@ function AppInner() {
|
||||
<span>{entry.message}</span>
|
||||
</div>
|
||||
) : (
|
||||
<div key={i} className="ts-chat-line">
|
||||
<span className="ts-chat-from">{entry.from}:</span> <span>{entry.message}</span>
|
||||
<div
|
||||
key={i}
|
||||
className={`ts-chat-line${entry.from === ownClient?.name ? " ts-chat-line-self" : ""}`}
|
||||
>
|
||||
<span className="ts-chat-from">{entry.from}:</span>{" "}
|
||||
<span className="ts-chat-bubble">{entry.message}</span>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
: pmThreads[activeTab]?.messages.map((entry, i) => (
|
||||
<div key={i} className="ts-chat-line">
|
||||
<div key={i} className={`ts-chat-line${entry.fromSelf ? " ts-chat-line-self" : ""}`}>
|
||||
<span className="ts-chat-from">
|
||||
{entry.fromSelf ? t("chat.you") : pmThreads[activeTab].partnerName}:
|
||||
</span>{" "}
|
||||
<span>{entry.message}</span>
|
||||
<span className="ts-chat-bubble">{entry.message}</span>
|
||||
</div>
|
||||
))}
|
||||
<div ref={chatEndRef} />
|
||||
|
||||
@@ -65,6 +65,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"away.setGlobalStatus": "Abwesenheit-Status global setzen",
|
||||
|
||||
"connect.title": "Verbinden",
|
||||
"connect.novaSubtitle": "WebSpeak3 läuft komplett im Browser — kein Download nötig",
|
||||
"connect.serverAddress": "Server Nickname oder Adresse:",
|
||||
"connect.serverPassword": "Server Passwort:",
|
||||
"connect.nickname": "Nickname:",
|
||||
@@ -221,6 +222,12 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"options.section.wiedergabe": "Wiedergabe",
|
||||
"options.section.aufnahme": "Aufnahme",
|
||||
"options.section.design": "Design",
|
||||
"design.subtitle": "Wähle das Erscheinungsbild der Anwendung.",
|
||||
"design.theme.standard": "Standard",
|
||||
"design.theme.standard.desc": "Das originale WebSpeak3-Design.",
|
||||
"design.theme.nova": "Nova",
|
||||
"design.theme.nova.desc": "Moderneres, dunkles Design mit abgerundeten Elementen.",
|
||||
"design.status.connected": "Verbunden",
|
||||
"options.section.erweiterungen": "Erweiterungen",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
"options.section.whispern": "Whispern",
|
||||
@@ -564,6 +571,7 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"away.setGlobalStatus": "Set global away status",
|
||||
|
||||
"connect.title": "Connect",
|
||||
"connect.novaSubtitle": "WebSpeak3 runs entirely in the browser — no download needed",
|
||||
"connect.serverAddress": "Server nickname or address:",
|
||||
"connect.serverPassword": "Server password:",
|
||||
"connect.nickname": "Nickname:",
|
||||
@@ -720,6 +728,12 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"options.section.wiedergabe": "Playback",
|
||||
"options.section.aufnahme": "Capture",
|
||||
"options.section.design": "Appearance",
|
||||
"design.subtitle": "Choose the application's look.",
|
||||
"design.theme.standard": "Standard",
|
||||
"design.theme.standard.desc": "The original WebSpeak3 design.",
|
||||
"design.theme.nova": "Nova",
|
||||
"design.theme.nova.desc": "A more modern, dark design with rounded elements.",
|
||||
"design.status.connected": "Connected",
|
||||
"options.section.erweiterungen": "Addons",
|
||||
"options.section.hotkeys": "Hotkeys",
|
||||
"options.section.whispern": "Whisper",
|
||||
|
||||
Reference in new issue
Block a user