Merge the development branch: Wave 5B's phone screens and quick-share sound

Both sides kept. From the development branch: the phone's voice channel
screen, the pages over it (pins, topics, members), the voice button in
the phone's top bar, the quick share's mixer and picker, invite links,
viewer counts, the studio's cameras and RTMP output, and the Android
pieces.

The phone's top bar keeps this wave's search button next to the voice
button and the bell (the bell opens the notifications panel); its tabs
mark Home also on the friends, messages and Library pages and Servers on
a server's events page. The phone shell shows both sides' pages: this
wave's friends, messages, events and Library pages with their back
button, and the development branch's voice channel screen, which hides
the bottom navigation as before.

Home keeps this wave's page, which maps the design onto TeamSpeak as
decided for it (friends' presence across servers, the latest chats of
every server, live streams of all servers); the development branch's
interim home (people on the current server, its chats, its streams)
gives way to it. Its server cards still switch the phone to the Servers
tab through Nav.show. A server item keeps this wave's detail and flavor
with the development branch's wording of `live` (streams on the server).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
selikhovandClaude Opus 5.5 committed 2026-10-04 03:20:20 +03:00
commit cd5ac614ef
104 files changed
+8174 -574

No files matched your search

+19 -9
View File
@@ -29,7 +29,8 @@ import { FriendsPage, ContactPanel } from "screens/friends.slint";
import { MessagesPage, ConversationList, Conversation, DmProfile, OfflineDialog } from "screens/messages.slint";
import { ServerLinks, EventsPage, EventDialog } from "screens/events.slint";
import { NotificationsPanel, SearchPalette, Lightbox } from "screens/overlays.slint";
import { MobileServers, ActivityPage, YouPage } from "screens/mobile.slint";
import { MobileServers, ActivityPage, YouPage, PhoneSheet } from "screens/mobile.slint";
import { MobileVoice } from "screens/mobile-voice.slint";
import { BookmarkDialog, ShareDialog, ClientAudioDialog, AboutDialog } from "screens/dialogs.slint";
import { StudioBridge } from "studio-bridge.slint";
import { StudioPage, MobileStudio } from "screens/studio.slint";
@@ -218,16 +219,21 @@ export component MainWindow inherits Window {
: Nav.page == Page.messages ? @tr("Messages")
: Nav.page == Page.library ? @tr("Library")
: Nav.page == Page.events ? @tr("Events")
: Nav.phone-voice ? Bridge.app-name
: Nav.page == Page.home || Nav.mobile-tab == MobileTab.home ? Bridge.app-name
: Nav.mobile-tab == MobileTab.you ? @tr("You")
: Nav.mobile-tab == MobileTab.activity ? @tr("Activity")
: Bridge.server-title;
subtitle: Nav.page == Page.settings || Nav.page == Page.friends || Nav.page == Page.messages || Nav.page == Page.library ? ""
: Nav.page == Page.events || Nav.phone-voice ? Bridge.server-title
: Nav.page == Page.home || Nav.mobile-tab == MobileTab.home ? @tr("Find your people. Talk beyond.")
: Nav.page == Page.events ? Bridge.server-title
: Nav.mobile-tab == MobileTab.chat && Bridge.current-tab >= 0 && Bridge.current-tab < Bridge.tabs.length ? Bridge.tabs[Bridge.current-tab].title : Nav.mobile-tab == MobileTab.servers ? Bridge.server-stats : "";
: Nav.mobile-tab == MobileTab.chat && Bridge.current-tab >= 0 && Bridge.current-tab < Bridge.tabs.length ? Bridge.tabs[Bridge.current-tab].title
: Nav.mobile-tab == MobileTab.servers ? Bridge.server-stats : "";
back: Nav.page == Page.settings || Nav.page == Page.friends || Nav.page == Page.messages || Nav.page == Page.library || Nav.page == Page.events;
unread: Bridge.unread-total;
voice: Nav.phone-voice;
// The voice channel and the studio bring their own controls.
navigation: !Nav.phone-voice && Nav.page != Page.studio;
go-back => {
if Nav.page == Page.messages && Bridge.dm.open {
Bridge.open-conversation(-1);
@@ -241,7 +247,7 @@ export component MainWindow inherits Window {
if Nav.page == Page.settings: SettingsPage {
compact: true;
}
if Nav.page == Page.home || (Nav.page == Page.server && Nav.mobile-tab == MobileTab.home): HomePage {
if !Nav.phone-voice && (Nav.page == Page.home || (Nav.page == Page.server && Nav.mobile-tab == MobileTab.home)): HomePage {
compact: true;
}
if Nav.page == Page.friends: FriendsPage {
@@ -257,14 +263,18 @@ export component MainWindow inherits Window {
if Nav.page == Page.events: EventsPage {
compact: true;
}
if Nav.page == Page.server && Nav.mobile-tab == MobileTab.servers: MobileServers { }
if Nav.page == Page.server && Nav.mobile-tab == MobileTab.chat && Bridge.viewer-open: StreamViewer { }
if Nav.page == Page.server && Nav.mobile-tab == MobileTab.chat && !Bridge.viewer-open: ChatView {
if Nav.phone-voice: MobileVoice { }
if Nav.page == Page.server && !Nav.phone-voice && Nav.mobile-tab == MobileTab.servers: MobileServers { }
// Watching without voice (the local test stream): the player.
if Nav.page == Page.server && !Nav.phone-voice && Nav.mobile-tab == MobileTab.chat && Bridge.viewer-open: StreamViewer { }
if Nav.page == Page.server && !Nav.phone-voice && Nav.mobile-tab == MobileTab.chat && !Bridge.viewer-open: ChatView {
header: false;
}
if Nav.page == Page.server && Nav.mobile-tab == MobileTab.activity: ActivityPage { }
if Nav.page == Page.server && Nav.mobile-tab == MobileTab.you: YouPage { }
if Nav.page == Page.server && !Nav.phone-voice && Nav.mobile-tab == MobileTab.activity: ActivityPage { }
if Nav.page == Page.server && !Nav.phone-voice && Nav.mobile-tab == MobileTab.you: YouPage { }
if Nav.page == Page.studio && !StudioBridge.status.detached: MobileStudio { }
// Pins, topics or the members, over the page.
if Nav.page == Page.server && (Nav.pins-open || Nav.topics-open || Nav.members-open): PhoneSheet { }
}
}
}
+10
View File
@@ -124,6 +124,9 @@ export struct ChatTab {
unread: int,
// The channel's topic (channel chats).
topic: string,
// The last message ("Mira: the banner I promised") and its time.
last: string,
time: string,
}
// A piece of a chat line: text, or an emoji shown as an image (`emoji` is
@@ -810,6 +813,8 @@ export global Bridge {
in property <[SourceItem]> share-sources;
in property <string> share-error;
in property <bool> share-busy;
// Our share carries sound: its audio mixer can change it.
in property <bool> share-audio;
// Whether capture and encoding are built in.
in property <bool> can-share: true;
@@ -839,6 +844,8 @@ export global Bridge {
in-out property <int> viewer-quality: 0;
// What "Auto" picked ("720p · 2.4 Mbit/s").
in property <string> viewer-quality-detail;
// The streamer is in an admin group (the crown beside their name).
in property <bool> viewer-streamer-admin;
// Settings.
in property <[string]> input-devices;
@@ -946,6 +953,9 @@ export global Bridge {
callback delete-crash-reports();
callback dismiss-crash-notice();
callback open-about();
// A link to our voice channel (`ts3server://`) to hand to others; the
// caller copies it.
callback invite() -> string;
// Home, friends, direct messages, notifications, search, events and
// the settings pages.
+27
View File
@@ -102,6 +102,14 @@ export global Nav {
in-out property <int> dm-tab;
in-out property <bool> join-open;
// The phone layout (narrow windows).
// The server's members as a page of their own (the desktop shows them
// beside the chat).
in-out property <bool> members-open;
// The voice channel screen (design mockup 02) instead of a tab: the
// voice channel view, or a stream we watch.
out property <bool> phone-voice: narrow && page == Page.server && Bridge.voice-connected && (voice-view || Bridge.viewer-open);
// Settings were opened (so leaving them tells Rust).
property <bool> settings-active;
@@ -110,6 +118,15 @@ export global Nav {
settings-active = false;
Bridge.close-settings();
}
// The phone shows Home on its own tab: a server goes to Servers,
// and Home from anywhere (the desktop's logo, a switch) is that tab.
// Also while wide, so the tab is right when the window narrows.
if p == Page.server && mobile-tab == MobileTab.home {
mobile-tab = MobileTab.servers;
}
if p == Page.home {
mobile-tab = MobileTab.home;
}
page = p;
notifications-open = false;
if p == Page.events {
@@ -123,6 +140,16 @@ export global Nav {
}
}
// A tab of the phone's bottom navigation, without the pages that were
// over the last one (pins, topics, members).
public function show-tab(tab: MobileTab) {
pins-open = false;
topics-open = false;
members-open = false;
show(tab == MobileTab.home ? Page.home : Page.server);
mobile-tab = tab;
}
public function open-settings(section: SettingsSection) {
if !settings-active {
settings-active = true;
+87 -4
View File
@@ -6,6 +6,8 @@ import { Bridge, BookmarkForm, ShareForm } from "../bridge.slint";
import { Nav, Page } from "../nav.slint";
import { Icon, Button, ButtonKind, IconButton, TextField, Field, Select, Toggle, ToggleRow, Slider, Modal, Card, Chip, Banner, Avatar, Status, ListView, ScrollView } from "../components/index.slint";
import { AboutSlint } from "std-widgets.slint";
import { StudioBridge } from "../studio-bridge.slint";
import { MixerRow, PickDialog } from "studio-parts.slint";
// Buttons at the bottom right of a dialog.
component Footer inherits HorizontalLayout {
@@ -182,15 +184,57 @@ component SourceCard inherits Rectangle {
}
}
export component ShareDialog inherits Modal {
// The stream's audio: the Stream Studio's mixer rows (`stream.audio_sources`,
// levels while live) and Add, which opens its picker.
component ShareAudio inherits VerticalLayout {
callback add();
spacing: Theme.space-1;
HorizontalLayout {
spacing: Theme.space-2;
Text {
text: @tr("Audio sources");
color: Theme.text-secondary;
font-size: Theme.font-sm;
font-weight: Theme.weight-semibold;
vertical-alignment: center;
horizontal-stretch: 1;
}
Button {
small: true;
icon: Icons.plus;
text: @tr("Add");
clicked => { root.add(); }
}
}
if StudioBridge.audio.length == 0: Text {
text: @tr("No audio: add your microphone, the desktop or an application.");
color: Theme.text-muted;
font-size: Theme.font-sm;
wrap: word-wrap;
}
// Three rows at a time.
if StudioBridge.audio.length > 0: ListView {
height: min(StudioBridge.audio.length, 3) * 56px;
accessible-label: @tr("Audio sources");
for audio[i] in StudioBridge.audio: MixerRow {
audio: audio;
index: i;
compact: true;
phone: Nav.narrow;
}
}
}
component ShareCard inherits Modal {
in-out property <ShareForm> form;
callback done();
callback pick-audio();
property <bool> live: Bridge.share-state == "live" || Bridge.share-state == "starting";
title: Bridge.share-state == "live" ? @tr("You are sharing your screen") : Bridge.share-state == "starting" ? @tr("Starting…") : @tr("Share screen");
subtitle: live ? Bridge.share-status : @tr("Stream to the people in your channel.");
icon: Icons.radio;
card-width: 600px;
card-height: 660px;
card-height: 860px;
dismissed => { done(); }
if live: VerticalLayout {
@@ -264,6 +308,15 @@ export component ShareDialog inherits Modal {
}
}
}
// Changes apply to the stream at once.
if Bridge.share-audio: ShareAudio {
add => { root.pick-audio(); }
}
if !Bridge.share-audio: Text {
text: @tr("This stream has no sound.");
color: Theme.text-muted;
font-size: Theme.font-sm;
}
Footer {
Button {
text: @tr("Close");
@@ -320,7 +373,8 @@ export component ShareDialog inherits Modal {
input-type: number;
placeholder: @tr("fps");
label: @tr("Frames per second");
width: 80px;
// On a phone both pairs fit side by side.
width: Nav.narrow ? 60px : 80px;
horizontal-stretch: 0;
}
}
@@ -340,17 +394,22 @@ export component ShareDialog inherits Modal {
input-type: number;
placeholder: @tr("kbit/s");
label: @tr("Bitrate in kbit/s");
width: 80px;
// On a phone both pairs fit side by side.
width: Nav.narrow ? 60px : 80px;
horizontal-stretch: 0;
}
}
}
}
// Off: no audio at all.
ToggleRow {
text: @tr("Share system audio");
icon: Icons.volume-2;
checked <=> form.audio;
}
if form.audio: ShareAudio {
add => { root.pick-audio(); }
}
ToggleRow {
text: @tr("Let everyone in the channel watch without asking");
icon: Icons.users;
@@ -377,6 +436,30 @@ export component ShareDialog inherits Modal {
}
}
// Share the screen or a window, with the stream's audio; the studio's
// audio picker opens over it.
export component ShareDialog inherits Rectangle {
in-out property <ShareForm> form;
callback done();
property <bool> picking;
ShareCard {
width: parent.width;
height: parent.height;
form <=> root.form;
done => { root.done(); }
pick-audio => {
StudioBridge.list-audio();
root.picking = true;
}
}
if root.picking: PickDialog {
width: parent.width;
height: parent.height;
kind: "audio";
done => { root.picking = false; }
}
}
// Local volume and mute of one client.
export component ClientAudioDialog inherits Modal {
callback done();
@@ -0,0 +1,713 @@
// The voice channel on the phone (design mockup 02): the channel's name
// and Leave, the stream we watch (or a card to watch one), the people in
// the channel, the channel's chat, and the voice controls at the bottom in
// place of the navigation.
import { Theme } from "../theme.slint";
import { Icons } from "../icons.slint";
import { Bridge, MemberItem, StreamItem } from "../bridge.slint";
import { Nav, MobileTab } from "../nav.slint";
import { Icon, IconButton, Button, ButtonKind, Avatar, LiveBadge, Select, Slider, SpeakingBars, ScrollView } from "../components/index.slint";
import { MessageList, Composer } from "chat.slint";
import { StudioBridge } from "../studio-bridge.slint";
// Back to the navigation; a stream we watch goes on behind it.
export global PhoneVoice {
public function close() {
if Bridge.viewer-open {
Bridge.hide-viewer();
}
Nav.show-voice(false);
}
}
// The channel's name and topic, back, and Leave.
component ChannelBar inherits HorizontalLayout {
padding-left: Theme.space-3;
padding-right: Theme.space-3;
spacing: Theme.space-3;
height: 56px;
IconButton {
icon: Icons.arrow-left;
label: @tr("Back");
round: true;
filled: true;
size: 40px;
y: (parent.height - self.height) / 2;
clicked => { PhoneVoice.close(); }
}
Icon {
source: Icons.volume-2;
size: 28px;
tint: Theme.text-secondary;
y: (parent.height - self.height) / 2;
}
VerticalLayout {
alignment: center;
horizontal-stretch: 1;
Text {
text: Bridge.own-channel;
color: Theme.text;
font-size: Theme.font-lg;
font-weight: Theme.weight-semibold;
overflow: elide;
}
if Bridge.own-channel-topic != "": Text {
text: Bridge.own-channel-topic;
color: Theme.text-secondary;
font-size: Theme.font-sm;
overflow: elide;
}
}
Button {
kind: ButtonKind.danger;
icon: Icons.log-out;
text: @tr("Leave");
y: (parent.height - self.height) / 2;
clicked => {
PhoneVoice.close();
Bridge.disconnect-voice();
}
}
}
// A translucent pill over the picture.
component OverlayChip inherits Rectangle {
in property <string> text;
in property <image> icon;
height: 26px;
width: row.preferred-width;
border-radius: Theme.radius-pill;
background: #060a18b0;
border-width: 1px;
border-color: #ffffff24;
row := HorizontalLayout {
padding-left: Theme.space-3;
padding-right: Theme.space-3;
spacing: Theme.space-2;
if root.icon.width > 0: Icon {
source: root.icon;
size: 14px;
tint: #ffffff;
y: (parent.height - self.height) / 2;
}
Text {
text: root.text;
color: #ffffff;
font-size: Theme.font-sm;
font-weight: Theme.weight-medium;
vertical-alignment: center;
}
}
}
// The stream we watch: the picture with LIVE, the viewers and the quality
// over its top, the title and who streams it over its bottom, and volume
// and full screen below them.
component PhonePlayer inherits Rectangle {
border-radius: Theme.radius-lg;
clip: true;
background: #000000;
border-width: 1px;
border-color: Theme.accent.transparentize(0.45);
accessible-role: AccessibleRole.groupbox;
accessible-label: Bridge.viewer-title;
Image {
width: parent.width;
height: parent.height;
source: Bridge.viewer-frame;
image-fit: contain;
visible: Bridge.viewer-has-frame;
accessible-role: AccessibleRole.image;
accessible-label: @tr("Stream picture");
}
if Bridge.viewer-status != "": Text {
width: parent.width - 48px;
text: Bridge.viewer-status;
color: #ffffff;
font-size: Theme.font-sm;
horizontal-alignment: center;
vertical-alignment: center;
wrap: word-wrap;
accessible-live-region: polite;
}
// Shades for what is drawn over the picture.
Rectangle {
y: 0;
height: 64px;
background: @linear-gradient(180deg, #000000b0 0%, #00000000 100%);
}
Rectangle {
y: parent.height - self.height;
height: 104px;
background: @linear-gradient(180deg, #00000000 0%, #000000d0 100%);
}
// LIVE, viewers; the quality and full screen.
HorizontalLayout {
y: Theme.space-3;
height: 30px;
padding-left: Theme.space-3;
padding-right: Theme.space-3;
spacing: Theme.space-2;
if !Bridge.viewer-ended: LiveBadge {
large: true;
y: (parent.height - self.height) / 2;
}
if Bridge.viewer-count > 0: OverlayChip {
icon: Icons.eye;
text: Bridge.viewer-count;
y: (parent.height - self.height) / 2;
}
Rectangle { horizontal-stretch: 1; }
// Simulcast layers the streamer offers ("Auto" follows the
// bandwidth estimate); otherwise the height of what arrives.
if Bridge.viewer-qualities.length > 1: Select {
width: 116px;
horizontal-stretch: 0;
label: @tr("Quality");
model: Bridge.viewer-qualities;
current-index <=> Bridge.viewer-quality;
selected(_) => { Bridge.set-stream-quality(Bridge.viewer-quality); }
}
if Bridge.viewer-qualities.length <= 1 && Bridge.viewer-has-frame: OverlayChip {
text: @tr("{}p", Bridge.viewer-frame.height);
y: (parent.height - self.height) / 2;
}
IconButton {
icon: Icons.maximize;
label: @tr("Full screen");
size: 30px;
icon-size: 16px;
tint: #ffffff;
y: (parent.height - self.height) / 2;
clicked => { Bridge.toggle-fullscreen(); }
}
}
// The title, who streams it, and the controls.
VerticalLayout {
height: self.preferred-height;
y: parent.height - self.height;
padding-left: Theme.space-4;
padding-right: Theme.space-3;
padding-bottom: Theme.space-1;
spacing: 1px;
Text {
text: Bridge.viewer-title;
color: #ffffff;
font-size: Theme.font-md;
font-weight: Theme.weight-semibold;
overflow: elide;
}
HorizontalLayout {
spacing: Theme.space-2;
alignment: start;
Text {
text: Bridge.viewer-streamer;
color: #ffffffd0;
font-size: Theme.font-sm;
vertical-alignment: center;
overflow: elide;
}
if Bridge.viewer-streamer-admin: Icon {
source: Icons.crown;
size: 14px;
tint: Theme.gold;
y: (parent.height - self.height) / 2;
}
if !Bridge.viewer-ended: Text {
text: "• " + Bridge.viewer-elapsed;
color: #ffffffa0;
font-size: Theme.font-sm;
vertical-alignment: center;
}
}
HorizontalLayout {
height: 40px;
spacing: Theme.space-2;
IconButton {
icon: Bridge.viewer-volume > 0 ? Icons.volume-2 : Icons.volume-x;
label: Bridge.viewer-volume > 0 ? @tr("Mute") : @tr("Unmute");
size: 34px;
tint: #ffffff;
y: (parent.height - self.height) / 2;
clicked => { Bridge.set-stream-volume(Bridge.viewer-volume > 0 ? 0 : 100); }
}
Slider {
y: (parent.height - self.height) / 2;
minimum: 0;
maximum: 200;
step: 5;
value <=> Bridge.viewer-volume;
enabled: !Bridge.viewer-ended;
label: @tr("Stream volume");
changed(v) => { Bridge.set-stream-volume(v); }
}
IconButton {
icon: Bridge.viewer-ended ? Icons.x : Icons.log-out;
label: Bridge.viewer-ended ? @tr("Close") : @tr("Stop watching");
size: 34px;
tint: #ffffff;
y: (parent.height - self.height) / 2;
clicked => { Bridge.leave-stream(); }
}
}
}
}
// A stream in the channel that we do not show: LIVE, the title, who, and
// Watch (or Show, if we watch it already).
component StreamPrompt inherits Rectangle {
in property <StreamItem> stream;
height: 76px;
border-radius: Theme.radius-lg;
clip: true;
background: @linear-gradient(160deg, #26237a 0%, #0c1430 100%);
border-width: 1px;
border-color: stream.watching ? Theme.accent : Theme.border-strong;
accessible-role: AccessibleRole.groupbox;
accessible-label: stream.name;
HorizontalLayout {
padding: Theme.space-3;
padding-left: Theme.space-4;
spacing: Theme.space-3;
VerticalLayout {
alignment: center;
horizontal-stretch: 1;
spacing: Theme.space-1;
HorizontalLayout {
spacing: Theme.space-2;
alignment: start;
if stream.id != "": LiveBadge {
y: (parent.height - self.height) / 2;
}
Text {
text: stream.id == "" ? @tr("{} is streaming", stream.streamer) : stream.name != "" ? stream.name : @tr("Untitled stream");
color: #ffffff;
font-weight: Theme.weight-semibold;
vertical-alignment: center;
overflow: elide;
}
}
Text {
text: stream.id == "" ? (stream.channel == "" ? @tr("Looking it up…") : @tr("In {}; looking it up…", stream.channel))
: stream.own ? @tr("Your stream")
: stream.channel != "" ? @tr("{} · in {}", stream.streamer, stream.channel)
: stream.viewers > 0 ? @tr("{} · {} watching", stream.streamer, stream.viewers)
: stream.streamer;
color: #ffffffb0;
font-size: Theme.font-sm;
overflow: elide;
}
}
if stream.id != "" && !stream.own: Button {
kind: ButtonKind.primary;
small: true;
icon: stream.watching ? Icons.monitor : Icons.eye;
text: stream.watching ? @tr("Show") : @tr("Watch");
y: (parent.height - self.height) / 2;
clicked => {
if stream.watching {
Bridge.show-viewer();
} else {
Bridge.watch-stream(stream.id);
}
}
}
}
}
// One person: an avatar ringed green while talking (blue while
// streaming), the muted mark, the name with the crown, LIVE below.
component VoiceMember inherits VerticalLayout {
in property <MemberItem> member;
property <length> size: 54px;
width: 68px;
spacing: Theme.space-1;
accessible-role: AccessibleRole.list-item;
accessible-label: member.name;
accessible-description: member.status;
accessible-action-default => { Bridge.open-member(member.id); }
HorizontalLayout {
alignment: center;
Rectangle {
width: root.size + 8px;
height: root.size + 8px;
border-radius: self.width / 2;
border-width: member.talking || member.streaming ? 2px : 0px;
border-color: member.talking ? Theme.success : Theme.accent;
Avatar {
size: root.size;
initials: member.initials;
tint: member.tint;
image: member.avatar;
label: member.name;
}
if member.talking || member.muted || member.sound-off: Rectangle {
x: parent.width - self.width;
y: parent.height - self.height;
width: 22px;
height: 22px;
border-radius: 11px;
background: member.talking ? Theme.accent : Theme.surface;
border-width: 2px;
border-color: Theme.surface;
if member.talking: SpeakingBars {
width: 12px;
height: 12px;
tint: #ffffff;
}
if !member.talking: Icon {
source: member.sound-off ? Icons.headphone-off : Icons.mic-off;
size: 12px;
tint: Theme.danger;
}
}
TouchArea {
clicked => { Bridge.open-member(member.id); }
}
}
}
HorizontalLayout {
alignment: center;
spacing: Theme.space-1;
Text {
text: member.name;
color: member.myself ? Theme.accent-text : Theme.text;
font-size: Theme.font-sm;
overflow: elide;
max-width: root.width - (member.admin ? 16px : 0px);
}
if member.admin: Icon {
source: Icons.crown;
size: 13px;
tint: Theme.gold;
y: (parent.height - self.height) / 2;
}
}
if member.streaming: HorizontalLayout {
alignment: center;
LiveBadge { }
}
}
// "# Chill Zone Chat · Linked to this voice channel", with the pins, the
// topics and the members.
component ChatHeader inherits Rectangle {
height: 56px;
border-radius: Theme.radius-lg;
background: Theme.surface-2;
border-width: 1px;
border-color: Theme.border;
HorizontalLayout {
padding-left: Theme.space-4;
padding-right: Theme.space-3;
spacing: Theme.space-3;
Icon {
source: Icons.hash;
size: 24px;
tint: Theme.text-secondary;
y: (parent.height - self.height) / 2;
}
VerticalLayout {
alignment: center;
horizontal-stretch: 1;
Text {
text: @tr("{} Chat", Bridge.own-channel);
color: Theme.text;
font-size: Theme.font-md;
font-weight: Theme.weight-semibold;
overflow: elide;
}
Text {
text: @tr("Linked to this voice channel");
color: Theme.text-secondary;
font-size: Theme.font-xs;
overflow: elide;
}
}
if Bridge.has-pins: IconButton {
icon: Icons.pin;
label: @tr("Pinned Messages");
filled: true;
size: 36px;
icon-size: 18px;
tint: Theme.accent-text;
y: (parent.height - self.height) / 2;
clicked => { Nav.show-pins(true); }
}
if Bridge.has-topics: IconButton {
icon: Icons.book-open;
label: @tr("Topics");
filled: true;
size: 36px;
icon-size: 18px;
y: (parent.height - self.height) / 2;
clicked => { Nav.show-topics(true); }
}
IconButton {
icon: Icons.users;
label: @tr("Members");
filled: true;
size: 36px;
icon-size: 18px;
y: (parent.height - self.height) / 2;
clicked => { Nav.members-open = true; }
}
}
}
// A round control with its caption, for the voice bar.
component VoiceControl inherits VerticalLayout {
in property <image> icon;
in property <string> text;
in property <bool> checked;
in property <bool> danger;
in property <bool> enabled: true;
// Filled red (Leave).
in property <bool> alarm;
callback clicked();
horizontal-stretch: 1;
spacing: Theme.space-1;
alignment: center;
accessible-role: AccessibleRole.button;
accessible-label: text;
accessible-enabled: enabled;
accessible-checkable: !alarm;
accessible-checked: checked;
accessible-action-default => { if enabled { clicked(); } }
HorizontalLayout {
alignment: center;
Rectangle {
width: 48px;
height: 48px;
border-radius: 24px;
background: root.alarm ? (touch.pressed ? Theme.danger.darker(0.2) : Theme.danger)
: root.checked ? (root.danger ? Theme.danger-soft : Theme.accent-soft)
: touch.pressed ? Theme.surface-4 : Theme.surface-2;
border-width: root.alarm ? 0px : 1px;
border-color: root.checked ? (root.danger ? Theme.danger.transparentize(0.5) : Theme.accent) : Theme.border-strong;
opacity: root.enabled ? 1.0 : 0.45;
Icon {
source: root.icon;
size: 22px;
tint: root.alarm ? #ffffff : root.checked ? (root.danger ? Theme.danger : Theme.accent-text) : Theme.icon;
}
touch := TouchArea {
enabled: root.enabled;
clicked => { root.clicked(); }
}
}
}
Text {
text: root.text;
color: root.checked && root.danger ? Theme.danger : Theme.text-secondary;
font-size: Theme.font-xs;
horizontal-alignment: center;
accessible-role: AccessibleRole.none;
}
}
// Mute, Deafen, Go Live (the Stream Studio; "Live" while it or a share
// is), Share (the screen, at once) and Leave.
component VoiceBar inherits Rectangle {
height: 84px;
background: Theme.surface;
border-width: 1px;
border-color: Theme.border;
accessible-role: AccessibleRole.groupbox;
accessible-label: @tr("Voice");
HorizontalLayout {
padding-left: Theme.space-2;
padding-right: Theme.space-2;
padding-top: Theme.space-3;
padding-bottom: Theme.space-3;
VoiceControl {
icon: Bridge.input-muted ? Icons.mic-off : Icons.mic;
text: Bridge.input-muted ? @tr("Unmute") : @tr("Mute");
checked: Bridge.input-muted;
danger: true;
clicked => { Bridge.set-input-muted(!Bridge.input-muted); }
}
VoiceControl {
icon: Bridge.output-muted ? Icons.headphone-off : Icons.headphones;
text: Bridge.output-muted ? @tr("Undeafen") : @tr("Deafen");
checked: Bridge.output-muted;
danger: true;
clicked => { Bridge.set-output-muted(!Bridge.output-muted); }
}
// The big one: the Stream Studio, or live there.
if Bridge.streams-available && Bridge.can-share: VerticalLayout {
horizontal-stretch: 1.6;
spacing: Theme.space-1;
alignment: center;
accessible-role: AccessibleRole.button;
accessible-label: @tr("Go Live");
accessible-action-default => { Nav.open-studio(); }
Rectangle {
height: 48px;
border-radius: 24px;
background: live.pressed ? Theme.accent-pressed : Theme.accent;
border-width: 2px;
border-color: Theme.glow;
Icon {
source: Icons.radio;
size: 26px;
tint: Theme.on-accent;
}
live := TouchArea {
clicked => { Nav.open-studio(); }
}
}
Text {
text: Bridge.share-state == "live" || StudioBridge.status.live ? @tr("Live") : @tr("Go Live");
color: Theme.text;
font-size: Theme.font-xs;
font-weight: Theme.weight-semibold;
horizontal-alignment: center;
}
}
if Bridge.streams-available && Bridge.can-share: VoiceControl {
icon: Icons.screen-share;
text: Bridge.share-state == "live" ? @tr("Sharing") : @tr("Share");
checked: Bridge.share-state == "live";
clicked => { Nav.open-share(); }
}
VoiceControl {
icon: Icons.phone-off;
text: @tr("Leave");
alarm: true;
clicked => {
PhoneVoice.close();
Bridge.disconnect-voice();
}
}
}
}
// Push-to-talk at the end of the composer: talks while held.
component TalkButton inherits Rectangle {
width: 48px;
height: 48px;
border-radius: 24px;
background: Bridge.transmitting ? Theme.success : touch.pressed ? Theme.accent-pressed : Theme.accent;
border-width: 2px;
border-color: Bridge.transmitting ? Theme.success.transparentize(0.4) : Theme.glow;
accessible-role: AccessibleRole.button;
accessible-label: @tr("Hold to talk");
accessible-checkable: true;
accessible-checked: Bridge.transmitting;
accessible-action-default => { Bridge.push-to-talk(!Bridge.transmitting); }
Icon {
source: Icons.mic;
size: 22px;
tint: Theme.on-accent;
}
touch := TouchArea {
pointer-event(e) => {
if e.kind == PointerEventKind.down {
Bridge.push-to-talk(true);
} else if e.kind == PointerEventKind.up || e.kind == PointerEventKind.cancel {
Bridge.push-to-talk(false);
}
}
}
}
// The whole screen.
export component MobileVoice inherits VerticalLayout {
// A topic opened from the drawer shows in the chat page.
property <int> topic: Bridge.current-topic;
changed topic => {
if topic >= 0 {
PhoneVoice.close();
Nav.mobile-tab = MobileTab.chat;
}
}
clip := TextInput {
visible: false;
width: 0;
height: 0;
}
ChannelBar { }
sv := ScrollView {
// The stream, the people and the chat header scroll away together
// when the window is short; the messages always keep some room.
vertical-stretch: 0;
height: min(content.preferred-height, root.height * 0.55);
content := VerticalLayout {
width: sv.visible-width;
padding-left: Theme.space-3;
padding-right: Theme.space-3;
spacing: Theme.space-3;
if Bridge.viewer-open: PhonePlayer {
height: (sv.visible-width - 2 * Theme.space-3) * 9 / 16;
}
if !Bridge.viewer-open: VerticalLayout {
spacing: Theme.space-2;
for stream in Bridge.streams: StreamPrompt {
stream: stream;
}
}
people := ScrollView {
height: 112px;
HorizontalLayout {
padding-top: Theme.space-2;
spacing: Theme.space-2;
alignment: start;
for member in Bridge.members: VoiceMember {
member: member;
}
VerticalLayout {
width: 68px;
spacing: Theme.space-1;
alignment: start;
HorizontalLayout {
alignment: center;
IconButton {
icon: Icons.user-plus;
label: @tr("Invite: copy a link to this channel");
round: true;
filled: true;
size: 62px;
icon-size: 24px;
// Through a text field: Slint copies only
// what is selected in one.
clicked => {
clip.text = Bridge.invite();
clip.select-all();
clip.copy();
}
}
}
Text {
text: @tr("Invite");
color: Theme.text-secondary;
font-size: Theme.font-sm;
horizontal-alignment: center;
}
}
}
}
ChatHeader { }
}
}
MessageList {
vertical-stretch: 1;
min-height: 96px;
model: Bridge.messages;
older: true;
}
HorizontalLayout {
padding-right: Bridge.audio.transmit == 0 ? Theme.space-4 : 0px;
Composer {
placeholder: @tr("Message #{}…", Bridge.own-channel);
padding: Theme.space-3;
padding-right: Bridge.audio.transmit == 0 ? Theme.space-3 : Theme.space-5;
}
// Push-to-talk is the transmit mode: talking is at hand.
if Bridge.audio.transmit == 0: TalkButton {
y: (parent.height - self.height) / 2;
}
}
VoiceBar { }
}
+33 -1
View File
@@ -1,5 +1,6 @@
// Pages of the narrow (phone) layout that the desktop shows elsewhere:
// the server list with the channels, activity, and the "You" page.
// the server list with the channels, activity, the "You" page, and the
// pins, topics and members over the page.
import { Theme } from "../theme.slint";
import { Icons } from "../icons.slint";
@@ -8,6 +9,8 @@ import { Nav, Page, SettingsSection } from "../nav.slint";
import { Icon, Button, ButtonKind, IconButton, Avatar, Status, CountBadge, LiveBadge, NavItem, ListItem, SectionHeader, Card, Banner, ScrollView, ActionButton } from "../components/index.slint";
import { ServerHeader, ConnectActions, ChannelTree } from "channels.slint";
import { StreamsPanel } from "streams.slint";
import { PinsDrawer, TopicsDrawer } from "drawers.slint";
import { MembersPanel } from "members.slint";
import { VoiceCard, VoiceButtons } from "../shells/common.slint";
import { StudioBridge } from "../studio-bridge.slint";
import { ShareMenu } from "../share-menu.slint";
@@ -230,3 +233,32 @@ export component YouPage inherits ScrollView {
}
}
}
// The pins, the topics or the server's members as a page over the current
// one (the desktop shows them beside the chat).
export component PhoneSheet inherits Rectangle {
background: Theme.bg-app;
// Nothing below takes clicks while it is shown.
TouchArea { }
if Nav.pins-open: PinsDrawer { }
if Nav.topics-open && !Nav.pins-open: TopicsDrawer { }
if Nav.members-open && !Nav.pins-open && !Nav.topics-open: VerticalLayout {
HorizontalLayout {
padding-left: Theme.space-3;
padding-top: Theme.space-3;
spacing: Theme.space-2;
alignment: start;
IconButton {
icon: Icons.arrow-left;
label: @tr("Back");
round: true;
filled: true;
size: 36px;
clicked => { Nav.members-open = false; }
}
}
MembersPanel {
vertical-stretch: 1;
}
}
}
+15 -5
View File
@@ -108,12 +108,13 @@ export component StreamsPanel inherits VerticalLayout {
overflow: elide;
vertical-alignment: center;
}
IconButton {
icon: Icons.x;
label: @tr("Close the panel");
// The phone's voice channel screen.
if Bridge.voice-connected: IconButton {
icon: Icons.chevron-right;
label: @tr("Open the voice channel");
size: 28px;
icon-size: Theme.icon-sm;
clicked => { Nav.right-panel-open = false; }
clicked => { Nav.show-voice(true); }
}
}
if Bridge.members.length == 0: Text {
@@ -367,7 +368,16 @@ component StreamPlayer inherits Rectangle {
vertical-alignment: center;
}
}
Rectangle { horizontal-stretch: 1; }
// What arrives: codec, size, frame rate, bitrate.
Text {
horizontal-stretch: 1;
text: Bridge.viewer-quality-detail;
color: #ffffff80;
font-size: Theme.font-xs;
horizontal-alignment: right;
vertical-alignment: center;
overflow: elide;
}
if !Bridge.viewer-fullscreen && !Nav.narrow: IconButton {
icon: Icons.minimize-2;
label: @tr("Back to the chat (keeps watching)");
+50 -20
View File
@@ -317,21 +317,25 @@ component SourceRow inherits Rectangle {
{ text: source.locked ? @tr("Unlock") : @tr("Lock"), icon: Icons.lock, enabled: true },
{ text: source.background == "keep" ? @tr("Blur background") : @tr("Background effect off"), icon: Icons.sparkles, enabled: source.kind == "camera", separator: true },
{ text: @tr("Background effect…"), icon: Icons.sliders-horizontal, enabled: source.kind == "camera" },
// A phone's front and back camera, or the next webcam.
{ text: @tr("Switch camera"), icon: Icons.video, enabled: source.kind == "camera" },
{ text: @tr("Bring forward"), icon: Icons.chevron-up, enabled: !source.front, separator: true },
{ text: @tr("Send backward"), icon: Icons.chevron-down, enabled: !source.back },
{ text: @tr("Rename…"), icon: Icons.pencil, enabled: true, separator: true },
{ text: @tr("Remove"), icon: Icons.trash-2, enabled: true, danger: true },
];
activated(i) => {
if i == 0 || i == 1 || i == 2 || i == 5 || i == 8 {
if i == 0 || i == 1 || i == 2 || i == 5 || i == 9 {
StudioNav.edit-source(source.id);
} else if i == 3 {
StudioBridge.source-action(source.id, "lock");
} else if i == 4 {
StudioBridge.source-action(source.id, source.background == "keep" ? "bg-blur" : "bg-keep");
} else if i == 6 {
StudioBridge.source-action(source.id, "up");
StudioBridge.source-action(source.id, "next-camera");
} else if i == 7 {
StudioBridge.source-action(source.id, "up");
} else if i == 8 {
StudioBridge.source-action(source.id, "down");
} else {
StudioBridge.source-action(source.id, "remove");
@@ -731,8 +735,8 @@ export component StudioHeader inherits HorizontalLayout {
}
}
// One audio source: meter, gain, mute, a menu.
component MixerRow inherits Rectangle {
// One audio source: meter, gain, mute, a menu (also the share dialog's).
export component MixerRow inherits Rectangle {
in property <StudioAudio> audio;
in property <int> index;
in property <bool> compact;
@@ -1918,12 +1922,13 @@ component SourceDialog inherits Modal {
}
}
// Pick a screen, window, camera or audio source.
component PickDialog inherits Modal {
// Pick a screen, window, camera or audio source (audio: also over the
// share dialog).
export component PickDialog inherits Modal {
in property <string> kind;
callback done();
title: kind == "screen" ? @tr("Share a screen") : kind == "window" ? @tr("Share a window") : kind == "camera" ? @tr("Add a camera") : @tr("Add an audio source");
subtitle: kind == "audio" ? @tr("Mixed into the stream's audio.") : @tr("Added to the live scene.");
title: kind == "screen" ? @tr("Share a screen") : kind == "window" ? @tr("Share a window") : kind == "camera" ? @tr("Add a camera") : @tr("Audio sources");
subtitle: kind == "audio" ? @tr("Mixed into the stream's audio. Pick as many as you like.") : @tr("Added to the live scene.");
icon: StudioKinds.icon(kind == "audio" ? "microphone" : kind);
card-width: 520px;
card-height: 540px;
@@ -1944,24 +1949,22 @@ component PickDialog inherits Modal {
accessible-role: AccessibleRole.button;
accessible-label: pick.name;
accessible-description: pick.detail;
accessible-action-default => {
if root.kind == "audio" {
StudioBridge.add-audio(i);
} else {
StudioBridge.add-picked(root.kind, i);
}
root.done();
}
accessible-checkable: root.kind == "audio";
accessible-checked: pick.selected;
accessible-action-default => { pick-touch.pick(); }
pick-touch := TouchArea {
mouse-cursor: MouseCursor.pointer;
clicked => {
// Audio sources are switched on and off (several at once);
// the rest is added and the picker closes.
function pick() {
if root.kind == "audio" {
StudioBridge.add-audio(i);
StudioBridge.toggle-audio(i);
} else {
StudioBridge.add-picked(root.kind, i);
root.done();
}
root.done();
}
clicked => { self.pick(); }
}
HorizontalLayout {
padding-left: Theme.space-3;
@@ -1973,10 +1976,15 @@ component PickDialog inherits Modal {
y: (parent.height - self.height) / 2;
border-radius: Theme.radius-md;
background: Theme.surface-3;
Icon {
if pick.icon.width == 0: Icon {
source: StudioKinds.icon(pick.kind);
size: 18px;
}
if pick.icon.width > 0: Image {
width: 28px;
height: 28px;
source: pick.icon;
}
}
VerticalLayout {
alignment: center;
@@ -1993,9 +2001,31 @@ component PickDialog inherits Modal {
overflow: elide;
}
}
if root.kind == "audio": Rectangle {
width: 24px;
height: 24px;
y: (parent.height - self.height) / 2;
border-radius: 12px;
background: pick.selected ? Theme.accent : transparent;
border-width: pick.selected ? 0 : 1.5px;
border-color: Theme.border-strong;
if pick.selected: Icon {
source: Icons.check;
size: 16px;
tint: Theme.on-accent;
}
}
}
}
}
if root.kind == "audio": HorizontalLayout {
alignment: end;
Button {
kind: ButtonKind.primary;
text: @tr("Done");
clicked => { root.done(); }
}
}
}
// Rename a scene.
+12
View File
@@ -69,6 +69,10 @@ export component VoiceCard inherits Rectangle {
border-color: Theme.border;
accessible-role: AccessibleRole.groupbox;
accessible-label: @tr("Voice");
// The phone: a tap opens the voice channel screen.
if Nav.narrow && Bridge.voice-connected: TouchArea {
clicked => { Nav.show-voice(true); }
}
VerticalLayout {
padding: Theme.space-3;
spacing: Theme.space-3;
@@ -97,6 +101,14 @@ export component VoiceCard inherits Rectangle {
overflow: elide;
}
}
if Nav.narrow && Bridge.voice-connected: IconButton {
icon: Icons.chevron-right;
label: @tr("Open the voice channel");
size: 32px;
icon-size: Theme.icon-sm;
y: (parent.height - self.height) / 2;
clicked => { Nav.show-voice(true); }
}
IconButton {
icon: Icons.phone-off;
label: @tr("Disconnect");
+121 -12
View File
@@ -1,12 +1,13 @@
// The narrow (phone) frame: a top bar, one page at a time (@children), and
// the bottom navigation (Home, Servers, Chat, Activity, You). Used while
// the bottom navigation (Home, Servers, Chats, Activity, You). Used while
// the window is narrower than `Nav.narrow-breakpoint`.
import { Theme } from "../theme.slint";
import { Icons } from "../icons.slint";
import { Bridge } from "../bridge.slint";
import { Nav, Page, MobileTab, SettingsSection } from "../nav.slint";
import { Icon, IconButton, CountBadge } from "../components/index.slint";
import { Icon, IconButton, CountBadge, PopupMenu, MenuEntry } from "../components/index.slint";
import { PhoneVoice } from "../screens/mobile-voice.slint";
// One entry of the bottom navigation.
component NavTab inherits Rectangle {
@@ -68,6 +69,40 @@ component NavTab inherits Rectangle {
}
}
// The people in our channel, as a pill (the voice channel screen's top bar).
component PeoplePill inherits Rectangle {
callback clicked();
width: row.preferred-width;
height: 40px;
border-radius: 20px;
background: touch.pressed ? Theme.surface-4 : Theme.surface-2;
border-width: 1px;
border-color: Theme.border;
accessible-role: AccessibleRole.button;
accessible-label: @tr("{} in voice", Bridge.members.length);
accessible-action-default => { root.clicked(); }
touch := TouchArea {
clicked => { root.clicked(); }
}
row := HorizontalLayout {
padding-left: Theme.space-4;
padding-right: Theme.space-4;
spacing: Theme.space-2;
Icon {
source: Icons.users;
size: 18px;
tint: Theme.icon;
y: (parent.height - self.height) / 2;
}
Text {
text: Bridge.members.length;
color: Theme.text;
font-size: Theme.font-md;
vertical-alignment: center;
}
}
}
export component MobileShell inherits Rectangle {
in property <string> title;
in property <string> subtitle;
@@ -75,6 +110,12 @@ export component MobileShell inherits Rectangle {
in property <int> unread;
// Show a back arrow (sub-pages such as the settings).
in property <bool> back;
// The bottom navigation; pages with their own controls there (the
// voice channel, the Stream Studio) go without.
in property <bool> navigation: true;
// The voice channel screen's buttons in the top bar: the people, the
// chats and a menu.
in property <bool> voice;
callback go-back();
background: Theme.backdrop;
VerticalLayout {
@@ -117,7 +158,7 @@ export component MobileShell inherits Rectangle {
overflow: elide;
}
}
IconButton {
if !root.voice: IconButton {
icon: Icons.search;
label: @tr("Search");
round: true;
@@ -125,7 +166,21 @@ export component MobileShell inherits Rectangle {
y: (parent.height - self.height) / 2;
clicked => { Nav.open-search(""); }
}
IconButton {
// The voice channel we are in, from any page.
if !root.voice && Bridge.voice-connected: IconButton {
icon: Icons.volume-2;
label: @tr("Voice channel");
round: true;
filled: true;
dot: true;
dot-color: Theme.success;
y: (parent.height - self.height) / 2;
clicked => {
Nav.show(Page.server);
Nav.show-voice(true);
}
}
if !root.voice: IconButton {
icon: Icons.bell;
label: @tr("Notifications");
round: true;
@@ -135,6 +190,60 @@ export component MobileShell inherits Rectangle {
y: (parent.height - self.height) / 2;
clicked => { Nav.notifications-open = !Nav.notifications-open; }
}
if root.voice: PeoplePill {
y: (parent.height - self.height) / 2;
clicked => { Nav.members-open = true; }
}
if root.voice: Rectangle {
width: 40px;
height: 40px;
y: (parent.height - self.height) / 2;
IconButton {
icon: Icons.message-square;
label: @tr("Chats");
round: true;
filled: true;
size: 40px;
clicked => {
PhoneVoice.close();
Nav.mobile-tab = MobileTab.chat;
}
}
if root.unread > 0: CountBadge {
x: parent.width - self.width / 2 - 4px;
y: -4px;
count: root.unread;
}
}
if root.voice: IconButton {
icon: Icons.more-horizontal;
label: @tr("More");
round: true;
filled: true;
y: (parent.height - self.height) / 2;
clicked => { more.show(self.x + self.width - 220px, self.y + self.height + 4px); }
}
}
more := PopupMenu {
entries: [
{ text: @tr("Stream Studio"), icon: Icons.radio, enabled: Bridge.streams-available },
{ text: @tr("Voice Settings"), icon: Icons.settings, enabled: true },
{ text: @tr("Activity"), icon: Icons.activity, enabled: true },
{ text: @tr("Leave Voice"), icon: Icons.phone-off, danger: true, enabled: true, separator: true },
];
activated(i) => {
if i == 0 {
Nav.open-studio();
} else if i == 1 {
Nav.open-settings(SettingsSection.voice);
} else if i == 2 {
PhoneVoice.close();
Nav.mobile-tab = MobileTab.activity;
} else {
PhoneVoice.close();
Bridge.disconnect-voice();
}
}
}
}
Rectangle {
@@ -142,7 +251,7 @@ export component MobileShell inherits Rectangle {
@children
}
// Bottom navigation.
Rectangle {
if root.navigation: Rectangle {
height: 64px;
background: Theme.surface;
border-width: 1px;
@@ -156,34 +265,34 @@ export component MobileShell inherits Rectangle {
icon: Icons.home;
text: @tr("Home");
selected: Nav.page == Page.home || Nav.page == Page.friends || Nav.page == Page.messages || Nav.page == Page.library || (Nav.mobile-tab == MobileTab.home && Nav.page == Page.server);
clicked => { Nav.show(Page.home); Nav.mobile-tab = MobileTab.home; }
clicked => { Nav.show-tab(MobileTab.home); }
}
NavTab {
icon: Icons.server;
text: @tr("Servers");
selected: (Nav.mobile-tab == MobileTab.servers && Nav.page == Page.server) || Nav.page == Page.events;
dot: Bridge.voice-connected;
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.servers; }
clicked => { Nav.show-tab(MobileTab.servers); }
}
NavTab {
icon: Bridge.viewer-open ? Icons.monitor : Icons.message-circle;
text: Bridge.viewer-open ? @tr("Stream") : @tr("Chat");
icon: Icons.message-circle;
text: @tr("Chats");
selected: Nav.mobile-tab == MobileTab.chat && Nav.page == Page.server;
badge: root.unread;
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.chat; }
clicked => { Nav.show-tab(MobileTab.chat); }
}
NavTab {
icon: Icons.activity;
text: @tr("Activity");
selected: Nav.mobile-tab == MobileTab.activity && Nav.page == Page.server;
badge: Bridge.share-requests;
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.activity; }
clicked => { Nav.show-tab(MobileTab.activity); }
}
NavTab {
icon: Icons.user;
text: @tr("You");
selected: (Nav.mobile-tab == MobileTab.you && Nav.page == Page.server) || Nav.page == Page.settings;
clicked => { Nav.show(Page.server); Nav.mobile-tab = MobileTab.you; }
clicked => { Nav.show-tab(MobileTab.you); }
}
}
}
+7 -2
View File
@@ -78,6 +78,10 @@ export struct StudioPick {
detail: string,
// For the icon: monitor, window, portal, camera, microphone, desktop, app, tone
kind: string,
// The application's own icon (audio), if it has one.
icon: image,
// Already mixed in (audio): picking it again takes it out.
selected: bool,
}
// The header, the preview's badges and the bottom bar.
@@ -223,9 +227,10 @@ export global StudioBridge {
// The phone layout's source cards: screen, camera, window.
callback main-source(string);
// Audio: fill `picks` with what can be added; add, change, remove.
// Audio: fill `picks` with what can be mixed in (marking what is);
// mix one in or take it out, change, remove.
callback list-audio();
callback add-audio(int);
callback toggle-audio(int);
// While dragging (`done` false) and at the end.
callback set-gain(int, float, bool);
callback toggle-mute(int);