ui: the phone's voice screen gets one header, room for chat and Hold to talk
The shell's top bar is the only header on the voice screen: Back, the channel on its banner, the server below it. ChannelBar and ChatHeader are gone, Pinned Messages and Topics are entries of the More menu, and Leave is only in the bottom bar. The people strip and the scroll cap leave the chat about 320 px at 390 x 844 (it had about 190). With push-to-talk, Hold to talk is the bottom bar's middle control and the composer's microphone button is gone; Go Live and Share are one Share control that opens the share menu, as on desktop; the microphone button reads Mic on or Mic off. The audio form was only filled when the settings opened, so every start showed push-to-talk controls whatever the stored mode; the transmit mode is now set at start and when the setting changes. VOELIN_OPEN=more opens the More menu for screenshots. The menu is not in a layout, so Slint centred it in the bar and it opened 30 px low; it now sits at the bar's corner. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
1 parent
a6caffa579
commit
034ee44e60
13 files changed
+337
-267
No files matched your search
@@ -148,6 +148,15 @@ User-visible changes of the apps and the `tsgw` gateway. The format follows
|
||||
pointer last moved over the picture (in full screen the cursor too; on a
|
||||
touch screen a tap shows or hides them), and the streamer, the title and
|
||||
LIVE are in the header above the picture instead of over it.
|
||||
- The phone's voice screen has one header: the top bar shows the channel on
|
||||
its banner, the server below it instead of the channel's topic, and Back;
|
||||
Leave is only in the bottom bar. Pinned messages and topics are in the
|
||||
More menu and the row of people is smaller, so the chat has about 130 px
|
||||
more room. With push-to-talk, Hold to talk is the bottom bar's middle
|
||||
button instead of the microphone button by the composer; Go Live and
|
||||
Share are one Share button that opens the share menu (a screen, or the
|
||||
Stream Studio) as on desktop. The microphone button says Mic on or Mic
|
||||
off.
|
||||
- Banners: up to 128 MiB, more time on slow hosts, BMP and ICO too, and
|
||||
SVG after a comment or DOCTYPE; pictures larger than 4096 pixels on a
|
||||
side are scaled down. A banner that fails is tried again for as long as
|
||||
@@ -207,6 +216,8 @@ User-visible changes of the apps and the `tsgw` gateway. The format follows
|
||||
joined with a new identity (the gateway did not know it yet).
|
||||
- tsgw reconnects its query connection for logins when the TeamSpeak server
|
||||
restarts; before, every login was refused until tsgw was restarted.
|
||||
- Push-to-talk controls (Hold to talk) showed in voice activation and
|
||||
continuous mode until the settings had been opened once.
|
||||
|
||||
## [0.0.1-alpha] - 2026-10-04
|
||||
|
||||
|
||||
@@ -903,6 +903,7 @@ pub fn run(options: RunOptions) -> Result<()> {
|
||||
app.apply_srtp();
|
||||
app.refresh_all();
|
||||
app.refresh_settings_flags();
|
||||
app.refresh_transmit();
|
||||
app.refresh_crash_notice();
|
||||
app.load_recent_chats();
|
||||
app.refresh_people();
|
||||
@@ -1071,6 +1072,8 @@ impl App {
|
||||
fn setting_changed(&mut self, key: &str) {
|
||||
if key == AUDIO.name() && !self.audio_dirty {
|
||||
self.audio = self.prefs.get(&AUDIO);
|
||||
// The voice controls follow the transmit mode.
|
||||
self.refresh_transmit();
|
||||
} else if key == CRASH_REPORTS.name() {
|
||||
let enabled = self.prefs.get(&CRASH_REPORTS);
|
||||
if enabled != self.settings.crash_reports {
|
||||
|
||||
+39
-15
@@ -20,6 +20,8 @@
|
||||
//! client once connected), `panel` / `no-panel` (the members panel),
|
||||
//! `voice` (the voice channel view; on the phone its own screen;
|
||||
//! `voice:compact` with the smaller stage, not stored),
|
||||
//! `more` (after `voice` on the phone: the voice screen's More menu,
|
||||
//! opened once the screen is laid out),
|
||||
//! `members` (the phone's members page), `notification` (a tapped voice
|
||||
//! notification), `shared:<text>` (text shared to the app on Android),
|
||||
//! `pins`, `topics` (the drawers),
|
||||
@@ -167,6 +169,7 @@ pub(crate) struct Running {
|
||||
_screenshot: Option<slint::Timer>,
|
||||
_resize: Option<slint::Timer>,
|
||||
_scroll: Option<slint::Timer>,
|
||||
_more: Option<slint::Timer>,
|
||||
}
|
||||
|
||||
/// Apply the switches once the app is set up.
|
||||
@@ -279,6 +282,8 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
|
||||
}
|
||||
}
|
||||
"pins" => nav.invoke_show_pins(true),
|
||||
// Opened once laid out (below).
|
||||
"more" => {}
|
||||
// The phone's members page.
|
||||
"members" => nav.set_members_open(true),
|
||||
// What Android hands over: a tapped voice notification, text
|
||||
@@ -410,20 +415,18 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
|
||||
// `unread`: up to the divider once the list is laid out (after the
|
||||
// resize above).
|
||||
let scroll = switches.open.iter().any(|o| o == "unread").then(|| {
|
||||
let weak = ui.as_weak();
|
||||
let timer = slint::Timer::default();
|
||||
timer.start(
|
||||
slint::TimerMode::SingleShot,
|
||||
Duration::from_millis(switches.screenshot_delay * 1000 * 3 / 4),
|
||||
move || {
|
||||
if let Some(ui) = weak.upgrade() {
|
||||
let bridge = ui.global::<Bridge>();
|
||||
bridge.set_jump_index(bridge.get_unread_index());
|
||||
bridge.set_jump_requests(bridge.get_jump_requests().wrapping_add(1));
|
||||
}
|
||||
},
|
||||
);
|
||||
timer
|
||||
late(ui, switches, |ui| {
|
||||
let bridge = ui.global::<Bridge>();
|
||||
bridge.set_jump_index(bridge.get_unread_index());
|
||||
bridge.set_jump_requests(bridge.get_jump_requests().wrapping_add(1));
|
||||
})
|
||||
});
|
||||
// `more`: the phone voice screen's More menu (a screenshot cannot tap).
|
||||
let more = switches.open.iter().any(|o| o == "more").then(|| {
|
||||
late(ui, switches, |ui| {
|
||||
let nav = ui.global::<Nav>();
|
||||
nav.set_more_requests(nav.get_more_requests().wrapping_add(1));
|
||||
})
|
||||
});
|
||||
let screenshot = switches.screenshot.clone().map(|path| {
|
||||
let weak = ui.as_weak();
|
||||
@@ -445,7 +448,28 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
|
||||
);
|
||||
timer
|
||||
});
|
||||
Running { _screenshot: screenshot, _resize: resize, _scroll: scroll }
|
||||
Running { _screenshot: screenshot, _resize: resize, _scroll: scroll, _more: more }
|
||||
}
|
||||
|
||||
/// A timer that runs `action` at three quarters of the screenshot delay, once
|
||||
/// the window has its size and the screens are laid out.
|
||||
fn late(
|
||||
ui: &MainWindow,
|
||||
switches: &Switches,
|
||||
action: impl Fn(&MainWindow) + 'static,
|
||||
) -> slint::Timer {
|
||||
let weak = ui.as_weak();
|
||||
let timer = slint::Timer::default();
|
||||
timer.start(
|
||||
slint::TimerMode::SingleShot,
|
||||
Duration::from_millis(switches.screenshot_delay * 1000 * 3 / 4),
|
||||
move || {
|
||||
if let Some(ui) = weak.upgrade() {
|
||||
action(&ui);
|
||||
}
|
||||
},
|
||||
);
|
||||
timer
|
||||
}
|
||||
|
||||
/// The current chat's read marker `back` messages before its end, as if
|
||||
|
||||
@@ -418,6 +418,23 @@ fn noise_level(index: i32) -> NoiseLevel {
|
||||
}
|
||||
}
|
||||
|
||||
/// The form's number for a transmit mode (`AudioForm.transmit`).
|
||||
pub fn transmit_index(mode: TransmitMode) -> i32 {
|
||||
match mode {
|
||||
TransmitMode::PushToTalk => 0,
|
||||
TransmitMode::VoiceActivation => 1,
|
||||
TransmitMode::Continuous => 2,
|
||||
}
|
||||
}
|
||||
|
||||
fn transmit_mode(index: i32) -> TransmitMode {
|
||||
match index {
|
||||
1 => TransmitMode::VoiceActivation,
|
||||
2 => TransmitMode::Continuous,
|
||||
_ => TransmitMode::PushToTalk,
|
||||
}
|
||||
}
|
||||
|
||||
/// The settings page's form for `settings`.
|
||||
pub fn audio_form(
|
||||
settings: &AudioSettings,
|
||||
@@ -428,11 +445,7 @@ pub fn audio_form(
|
||||
AudioForm {
|
||||
input_index: inputs.index_of(settings.input_device.as_deref()) as i32,
|
||||
output_index: outputs.index_of(settings.output_device.as_deref()) as i32,
|
||||
transmit: match settings.transmit {
|
||||
TransmitMode::PushToTalk => 0,
|
||||
TransmitMode::VoiceActivation => 1,
|
||||
TransmitMode::Continuous => 2,
|
||||
},
|
||||
transmit: transmit_index(settings.transmit),
|
||||
vad_threshold: settings.vad.threshold_db,
|
||||
echo_cancellation: p.echo_cancellation,
|
||||
noise_suppression: p.noise_suppression,
|
||||
@@ -454,11 +467,7 @@ pub fn apply_audio_form(
|
||||
let mut s = settings.clone();
|
||||
s.input_device = inputs.id_at(form.input_index);
|
||||
s.output_device = outputs.id_at(form.output_index);
|
||||
s.transmit = match form.transmit {
|
||||
1 => TransmitMode::VoiceActivation,
|
||||
2 => TransmitMode::Continuous,
|
||||
_ => TransmitMode::PushToTalk,
|
||||
};
|
||||
s.transmit = transmit_mode(form.transmit);
|
||||
s.vad.threshold_db = form.vad_threshold;
|
||||
s.processing.echo_cancellation = form.echo_cancellation;
|
||||
s.processing.noise_suppression = form.noise_suppression;
|
||||
@@ -522,6 +531,22 @@ mod tests {
|
||||
assert_eq!(changed.playback_buffer_ms, 180);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn transmit_modes() {
|
||||
for (mode, index) in [
|
||||
(TransmitMode::PushToTalk, 0),
|
||||
(TransmitMode::VoiceActivation, 1),
|
||||
(TransmitMode::Continuous, 2),
|
||||
] {
|
||||
assert_eq!(transmit_index(mode), index);
|
||||
assert_eq!(transmit_mode(index), mode);
|
||||
}
|
||||
// Any other number is the default, push-to-talk (Hold to talk shows).
|
||||
assert_eq!(transmit_mode(7), TransmitMode::PushToTalk);
|
||||
assert_eq!(transmit_mode(-1), TransmitMode::PushToTalk);
|
||||
assert_eq!(transmit_index(AudioSettings::default().transmit), 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn free_values() {
|
||||
assert_eq!(nearest_choice(&FPS_CHOICES, 60), 2);
|
||||
|
||||
@@ -136,6 +136,17 @@ impl App {
|
||||
bridge.set_crash_reports(self.settings.crash_reports);
|
||||
}
|
||||
|
||||
/// The transmit mode for the voice controls (Hold to talk shows for
|
||||
/// push-to-talk) before the settings page fills the whole form: only
|
||||
/// `transmit` changes, as the device lists are not read yet.
|
||||
pub(crate) fn refresh_transmit(&self) {
|
||||
let Some(ui) = self.ui.upgrade() else { return };
|
||||
let bridge = ui.global::<Bridge>();
|
||||
let mut form = bridge.get_audio();
|
||||
form.transmit = settings::transmit_index(self.audio.transmit);
|
||||
bridge.set_audio(form);
|
||||
}
|
||||
|
||||
pub(crate) fn set_crash_reports(&mut self, enabled: bool) {
|
||||
self.settings.crash_reports = enabled;
|
||||
// Also in the blob, for older versions.
|
||||
|
||||
@@ -31,7 +31,7 @@ import { MessagesPage, ConversationList, Conversation, DmProfile, OfflineDialog
|
||||
import { ServerLinks, EventsPage, EventDialog } from "screens/events.slint";
|
||||
import { NotificationsPanel, SearchPalette, Lightbox } from "screens/overlays.slint";
|
||||
import { MobileServers, ActivityPage, YouPage, PhoneSheet } from "screens/mobile.slint";
|
||||
import { MobileVoice } from "screens/mobile-voice.slint";
|
||||
import { MobileVoice, PhoneVoice } from "screens/mobile-voice.slint";
|
||||
import { BookmarkDialog, ShareDialog, ClientAudioDialog, ChannelPasswordDialog, PokeDialog, LinkDialog, AboutDialog } from "screens/dialogs.slint";
|
||||
import { StudioBridge } from "studio-bridge.slint";
|
||||
import { StudioPage, MobileStudio } from "screens/studio.slint";
|
||||
@@ -266,13 +266,13 @@ export component MainWindow inherits Window {
|
||||
&& Nav.mobile-tab == MobileTab.chat && !Bridge.viewer-open
|
||||
&& Bridge.current-tab >= 0 && Bridge.current-tab < Bridge.tabs.length
|
||||
&& Bridge.tabs[Bridge.current-tab].kind == 1;
|
||||
banner: self.channel-chat ? Bridge.tabs[Bridge.current-tab].banner : @image-url("");
|
||||
banner: Nav.phone-voice ? Bridge.own-channel-banner : self.channel-chat ? Bridge.tabs[Bridge.current-tab].banner : @image-url("");
|
||||
title: Nav.page == Page.settings ? @tr("Settings")
|
||||
: Nav.page == Page.friends ? @tr("Friends")
|
||||
: 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.phone-voice ? Bridge.own-channel
|
||||
: 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")
|
||||
@@ -282,13 +282,15 @@ export component MainWindow inherits Window {
|
||||
: Nav.page == Page.home || Nav.mobile-tab == MobileTab.home ? ""
|
||||
: 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;
|
||||
back: Nav.phone-voice || 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 {
|
||||
if Nav.phone-voice {
|
||||
PhoneVoice.back();
|
||||
} else if Nav.page == Page.messages && Bridge.dm.open {
|
||||
Bridge.open-conversation(-1);
|
||||
} else if Nav.page == Page.events || Nav.page == Page.settings {
|
||||
Nav.show(Page.server);
|
||||
|
||||
@@ -138,6 +138,9 @@ export global Nav {
|
||||
// The server's members as a page of their own (the desktop shows them
|
||||
// beside the chat).
|
||||
in-out property <bool> members-open;
|
||||
// Counts requests to open the voice screen's More menu, which MobileShell
|
||||
// opens (VOELIN_OPEN=more: a screenshot cannot tap).
|
||||
in-out property <int> more-requests;
|
||||
// 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);
|
||||
|
||||
@@ -1,82 +1,41 @@
|
||||
// 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.
|
||||
// The voice channel on the phone (design mockup 02), under the shell's top
|
||||
// bar (Back, the channel, the people, the chats and More): the stream we
|
||||
// watch (or the streams to watch), 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 } from "../bridge.slint";
|
||||
import { Nav, MobileTab } from "../nav.slint";
|
||||
import { Icon, IconButton, Button, ButtonKind, ActionButton, LiveBadge, Select, Slider, ScrollView, BannerPicture } from "../components/index.slint";
|
||||
import { Icon, IconButton, ActionButton, LiveBadge, Select, Slider, ScrollView } from "../components/index.slint";
|
||||
import { MessageList, Composer } from "chat.slint";
|
||||
import { Participant, StreamCard } from "voice-parts.slint";
|
||||
import { StudioBridge } from "../studio-bridge.slint";
|
||||
import { ShareMenu } from "../share-menu.slint";
|
||||
|
||||
// Back to the navigation; a stream we watch goes on behind it.
|
||||
export global PhoneVoice {
|
||||
// The top bar's Back: a page over the screen (the pins, the topics or
|
||||
// the members) first, then the screen.
|
||||
public function back() {
|
||||
if Nav.pins-open || Nav.topics-open || Nav.members-open {
|
||||
close-pages();
|
||||
} else {
|
||||
close();
|
||||
}
|
||||
}
|
||||
// Back to the navigation; a stream we watch goes on behind it. The pages
|
||||
// over the screen close with it (they would show over the next tab).
|
||||
public function close() {
|
||||
close-pages();
|
||||
if Bridge.viewer-open {
|
||||
Bridge.hide-viewer();
|
||||
}
|
||||
Nav.show-voice(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Channel background behind its name, topic, Back and Leave.
|
||||
component ChannelBar inherits Rectangle {
|
||||
height: 56px;
|
||||
clip: true;
|
||||
if Bridge.own-channel-banner.width > 0: BannerPicture {
|
||||
y: 0;
|
||||
source: Bridge.own-channel-banner;
|
||||
}
|
||||
HorizontalLayout {
|
||||
height: 56px;
|
||||
padding-left: Theme.space-3;
|
||||
padding-right: Theme.space-3;
|
||||
spacing: Theme.space-3;
|
||||
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: Bridge.own-channel-banner.width > 0 ? Theme.text : 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();
|
||||
}
|
||||
}
|
||||
function close-pages() {
|
||||
Nav.pins-open = false;
|
||||
Nav.topics-open = false;
|
||||
Nav.members-open = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,72 +222,6 @@ component PhonePlayer inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// "# 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The voice bar's controls: larger, on a stronger edge, sharing the width.
|
||||
component BarButton inherits ActionButton {
|
||||
size: 48px;
|
||||
@@ -338,8 +231,110 @@ component BarButton inherits ActionButton {
|
||||
horizontal-stretch: 1;
|
||||
}
|
||||
|
||||
// Mute, Deafen, Go Live (the Stream Studio; "Live" while it or a share
|
||||
// is), Share (the screen, at once) and Leave.
|
||||
// The bar's wide control in the middle: a pill with an icon, its caption
|
||||
// below. `hold` talks while pressed (push-to-talk), from the press to the
|
||||
// release or a cancelled press, instead of `clicked`.
|
||||
component BarPill inherits VerticalLayout {
|
||||
in property <image> icon;
|
||||
in property <string> text;
|
||||
// Green: our voice goes out.
|
||||
in property <bool> talking;
|
||||
// Screen readers hear it as checked (talking, sharing).
|
||||
in property <bool> checked;
|
||||
in property <bool> hold;
|
||||
callback clicked();
|
||||
callback held(bool);
|
||||
// Its width does not follow the caption (Hold to talk, Talking…), which
|
||||
// would move the buttons beside it while it is held.
|
||||
preferred-width: 80px;
|
||||
spacing: Theme.space-1;
|
||||
alignment: center;
|
||||
accessible-role: AccessibleRole.button;
|
||||
accessible-label: root.text;
|
||||
accessible-checkable: true;
|
||||
accessible-checked: root.checked;
|
||||
accessible-action-default => {
|
||||
if root.hold {
|
||||
root.held(!root.checked);
|
||||
} else {
|
||||
root.clicked();
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
height: 48px;
|
||||
border-radius: 24px;
|
||||
background: root.talking ? Theme.success : touch.pressed ? Theme.accent-pressed : Theme.accent;
|
||||
border-width: 2px;
|
||||
border-color: root.talking ? Theme.success.transparentize(0.4) : Theme.glow;
|
||||
Icon {
|
||||
source: root.icon;
|
||||
size: 26px;
|
||||
tint: Theme.on-accent;
|
||||
}
|
||||
touch := TouchArea {
|
||||
mouse-cursor: MouseCursor.pointer;
|
||||
pointer-event(e) => {
|
||||
if root.hold && e.kind == PointerEventKind.down {
|
||||
root.held(true);
|
||||
} else if root.hold && (e.kind == PointerEventKind.up || e.kind == PointerEventKind.cancel) {
|
||||
root.held(false);
|
||||
}
|
||||
}
|
||||
clicked => {
|
||||
if !root.hold {
|
||||
root.clicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Text {
|
||||
text: root.text;
|
||||
color: Theme.text;
|
||||
font-size: Theme.font-xs;
|
||||
font-weight: Theme.weight-semibold;
|
||||
horizontal-alignment: center;
|
||||
accessible-role: AccessibleRole.none;
|
||||
}
|
||||
}
|
||||
|
||||
// Share a screen or a window, or go live in the Stream Studio: the share
|
||||
// menu above the bar, as the desktop's call bar has it (while a share
|
||||
// runs, the share dialog at once). Wide, in the middle, when there is no
|
||||
// Hold to talk.
|
||||
component ShareControl inherits Rectangle {
|
||||
in property <bool> wide;
|
||||
property <bool> live: Bridge.share-state == "live" || StudioBridge.status.live;
|
||||
property <string> caption: Bridge.share-state == "live" ? @tr("Sharing") : StudioBridge.status.live ? @tr("Live") : @tr("Share");
|
||||
horizontal-stretch: root.wide ? 1.6 : 1;
|
||||
// Centred over this control, above the bar (whose padding is space-3).
|
||||
function open-menu() {
|
||||
share-menu.open((root.width - share-menu.menu-width) / 2, - share-menu.menu-height - Theme.space-3 - 4px);
|
||||
}
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
if root.wide: BarPill {
|
||||
icon: Icons.monitor-up;
|
||||
text: root.caption;
|
||||
checked: root.live;
|
||||
clicked => { root.open-menu(); }
|
||||
}
|
||||
if !root.wide: BarButton {
|
||||
icon: Icons.monitor-up;
|
||||
text: root.caption;
|
||||
checked: root.live;
|
||||
clicked => { root.open-menu(); }
|
||||
}
|
||||
}
|
||||
// Not in the layout: its width of 0 would stop the control growing.
|
||||
share-menu := ShareMenu {
|
||||
x: 0;
|
||||
y: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Mic on or off and Deafen; with push-to-talk Hold to talk in the middle
|
||||
// (wide) and Share, otherwise Share in the middle; and Leave, the screen's
|
||||
// only one.
|
||||
component VoiceBar inherits Rectangle {
|
||||
height: 84px;
|
||||
background: Theme.surface;
|
||||
@@ -352,9 +347,10 @@ component VoiceBar inherits Rectangle {
|
||||
padding-right: Theme.space-2;
|
||||
padding-top: Theme.space-3;
|
||||
padding-bottom: Theme.space-3;
|
||||
// Named by its state, so it does not read as a talk button.
|
||||
BarButton {
|
||||
icon: Bridge.input-muted ? Icons.mic-off : Icons.mic;
|
||||
text: Bridge.input-muted ? @tr("Unmute") : @tr("Mute");
|
||||
text: Bridge.input-muted ? @tr("Mic off") : @tr("Mic on");
|
||||
checked: Bridge.input-muted;
|
||||
danger: true;
|
||||
clicked => { Bridge.set-input-muted(!Bridge.input-muted); }
|
||||
@@ -366,42 +362,18 @@ component VoiceBar inherits Rectangle {
|
||||
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 {
|
||||
// Push-to-talk is the transmit mode: talks while held.
|
||||
if Bridge.audio.transmit == 0: BarPill {
|
||||
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;
|
||||
}
|
||||
icon: Icons.mic;
|
||||
text: Bridge.transmitting ? @tr("Talking…") : @tr("Hold to talk");
|
||||
talking: Bridge.transmitting;
|
||||
checked: Bridge.transmitting;
|
||||
hold: true;
|
||||
held(on) => { Bridge.push-to-talk(on); }
|
||||
}
|
||||
if Bridge.streams-available && Bridge.can-share: BarButton {
|
||||
icon: Icons.screen-share;
|
||||
text: Bridge.share-state == "live" ? @tr("Sharing") : @tr("Share");
|
||||
checked: Bridge.share-state == "live";
|
||||
clicked => { Nav.open-share(); }
|
||||
if Bridge.streams-available && Bridge.can-share: ShareControl {
|
||||
wide: Bridge.audio.transmit != 0;
|
||||
}
|
||||
BarButton {
|
||||
icon: Icons.phone-off;
|
||||
@@ -415,35 +387,6 @@ component VoiceBar inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// 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.
|
||||
@@ -454,12 +397,12 @@ export component MobileVoice inherits VerticalLayout {
|
||||
Nav.mobile-tab = MobileTab.chat;
|
||||
}
|
||||
}
|
||||
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.
|
||||
// The stream and the people scroll away together when they would take
|
||||
// more than 45 % of the screen; the messages keep the rest (about
|
||||
// 320 px at 390 × 844 while watching).
|
||||
vertical-stretch: 0;
|
||||
height: min(content.preferred-height, root.height * 0.55);
|
||||
height: min(content.preferred-height, root.height * 0.45);
|
||||
content := VerticalLayout {
|
||||
width: sv.visible-width;
|
||||
padding-left: Theme.space-3;
|
||||
@@ -475,29 +418,36 @@ export component MobileVoice inherits VerticalLayout {
|
||||
compact: true;
|
||||
}
|
||||
}
|
||||
// At least 84 px; taller only for a LIVE mark under a name (or a
|
||||
// larger text size), which a fixed height would cut, with room
|
||||
// under it for the sideways scroll line.
|
||||
people := ScrollView {
|
||||
height: 112px;
|
||||
HorizontalLayout {
|
||||
height: max(84px, strip.preferred-height + Theme.space-3);
|
||||
strip := HorizontalLayout {
|
||||
padding-top: Theme.space-2;
|
||||
spacing: Theme.space-2;
|
||||
alignment: start;
|
||||
for member in Bridge.members: Participant {
|
||||
member: member;
|
||||
compact: true;
|
||||
size: 44px;
|
||||
}
|
||||
VerticalLayout {
|
||||
width: 68px;
|
||||
spacing: Theme.space-1;
|
||||
alignment: start;
|
||||
// Where an avatar is: 44 px in its 52 px ring.
|
||||
HorizontalLayout {
|
||||
alignment: center;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
IconButton {
|
||||
icon: Icons.user-plus;
|
||||
label: @tr("Invite: copy a link to this channel");
|
||||
round: true;
|
||||
filled: true;
|
||||
size: 62px;
|
||||
icon-size: 24px;
|
||||
size: 44px;
|
||||
icon-size: 20px;
|
||||
clicked => { Nav.copy(Bridge.invite()); }
|
||||
}
|
||||
}
|
||||
@@ -510,7 +460,6 @@ export component MobileVoice inherits VerticalLayout {
|
||||
}
|
||||
}
|
||||
}
|
||||
ChatHeader { }
|
||||
}
|
||||
}
|
||||
MessageList {
|
||||
@@ -519,17 +468,9 @@ export component MobileVoice inherits VerticalLayout {
|
||||
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;
|
||||
}
|
||||
Composer {
|
||||
placeholder: @tr("Message {}", Bridge.own-channel);
|
||||
padding: Theme.space-3;
|
||||
}
|
||||
VoiceBar { }
|
||||
}
|
||||
@@ -236,7 +236,8 @@ export component PhoneSheet inherits Rectangle {
|
||||
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 {
|
||||
// The voice screen's top bar has Back.
|
||||
if !Nav.phone-voice: HorizontalLayout {
|
||||
padding-left: Theme.space-3;
|
||||
padding-top: Theme.space-3;
|
||||
spacing: Theme.space-2;
|
||||
|
||||
@@ -10,7 +10,8 @@ import { StudioBridge } from "studio-bridge.slint";
|
||||
import { Nav } from "nav.slint";
|
||||
|
||||
export component ShareMenu inherits Rectangle {
|
||||
// The menu's height, to open it above a button.
|
||||
// The menu's size, to open it above a button.
|
||||
out property <length> menu-width: 220px;
|
||||
out property <length> menu-height: 2 * Theme.control-height + 2 * Theme.space-2 + 2px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
@@ -25,7 +26,7 @@ export component ShareMenu inherits Rectangle {
|
||||
}
|
||||
|
||||
menu := PopupMenu {
|
||||
menu-width: 220px;
|
||||
menu-width: root.menu-width;
|
||||
entries: [
|
||||
// The studio's stream takes the place of a simple share.
|
||||
{ text: @tr("Share screen"), icon: Icons.monitor-up, enabled: !StudioBridge.status.live },
|
||||
|
||||
@@ -109,15 +109,28 @@ export component MobileShell inherits Rectangle {
|
||||
in property <image> banner;
|
||||
// Unread messages in the server's chats (the Chat tab's badge).
|
||||
in property <int> unread;
|
||||
// Show a back arrow (sub-pages such as the settings).
|
||||
// Show a back arrow (sub-pages such as the settings, and the voice
|
||||
// channel screen).
|
||||
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.
|
||||
// chats and a menu (pinned messages, topics, the Stream Studio, the
|
||||
// voice settings, activity).
|
||||
in property <bool> voice;
|
||||
callback go-back();
|
||||
// VOELIN_OPEN=more opens the menu (a screenshot cannot tap).
|
||||
property <int> more-requests: Nav.more-requests;
|
||||
changed more-requests => {
|
||||
if root.voice {
|
||||
root.open-more();
|
||||
}
|
||||
}
|
||||
// Under the More button, at the right of the top bar.
|
||||
function open-more() {
|
||||
more.show(root.width - Theme.space-3 - more.menu-width, (60px + Theme.control-height) / 2 + 4px);
|
||||
}
|
||||
background: Theme.backdrop;
|
||||
VerticalLayout {
|
||||
// Top bar.
|
||||
@@ -195,7 +208,12 @@ export component MobileShell inherits Rectangle {
|
||||
}
|
||||
if root.voice: PeoplePill {
|
||||
y: (parent.height - self.height) / 2;
|
||||
clicked => { Nav.members-open = true; }
|
||||
// In front of the pins or the topics, which show first.
|
||||
clicked => {
|
||||
Nav.pins-open = false;
|
||||
Nav.topics-open = false;
|
||||
Nav.members-open = true;
|
||||
}
|
||||
}
|
||||
if root.voice: Rectangle {
|
||||
width: 40px;
|
||||
@@ -224,27 +242,35 @@ export component MobileShell inherits Rectangle {
|
||||
round: true;
|
||||
filled: true;
|
||||
y: (parent.height - self.height) / 2;
|
||||
clicked => { more.show(self.x + self.width - 220px, self.y + self.height + 4px); }
|
||||
clicked => { root.open-more(); }
|
||||
}
|
||||
}
|
||||
// Not in a layout, so Slint would centre it in the bar: `show`
|
||||
// is relative to its corner.
|
||||
more := PopupMenu {
|
||||
x: 0;
|
||||
y: 0;
|
||||
entries: [
|
||||
{ text: @tr("Stream Studio"), icon: Icons.radio, enabled: Bridge.streams-available },
|
||||
{ text: @tr("Pinned Messages"), icon: Icons.pin, enabled: Bridge.has-pins },
|
||||
{ text: @tr("Topics"), icon: Icons.book-open, enabled: Bridge.has-topics },
|
||||
{ text: @tr("Stream Studio"), icon: Icons.radio, enabled: Bridge.streams-available, separator: true },
|
||||
{ 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();
|
||||
Nav.members-open = false;
|
||||
Nav.show-pins(true);
|
||||
} else if i == 1 {
|
||||
Nav.open-settings(SettingsSection.voice);
|
||||
Nav.members-open = false;
|
||||
Nav.show-topics(true);
|
||||
} else if i == 2 {
|
||||
PhoneVoice.close();
|
||||
Nav.mobile-tab = MobileTab.activity;
|
||||
Nav.open-studio();
|
||||
} else if i == 3 {
|
||||
Nav.open-settings(SettingsSection.voice);
|
||||
} else {
|
||||
PhoneVoice.close();
|
||||
Bridge.disconnect-voice();
|
||||
Nav.mobile-tab = MobileTab.activity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -230,7 +230,7 @@ Things to try there: the bottom navigation (Home, Servers, Chats,
|
||||
Activity, You), joining a voice channel and its screen from the top bar's
|
||||
voice button, the voice notification (pull down the shade: Mute, Deafen,
|
||||
Leave, tap it), Share from another app's share sheet (text, then a file),
|
||||
the voice screen's Share (the screen share dialog) with sound from the
|
||||
audio picker (app icons) and its gain and mute while live, and Go Live's
|
||||
Stream Studio with a camera source (Waydroid usually has no camera: the
|
||||
source then says why).
|
||||
the voice screen's Share menu: Share screen (the screen share dialog) with
|
||||
sound from the audio picker (app icons) and its gain and mute while live,
|
||||
and the Stream Studio with a camera source (Waydroid usually has no camera:
|
||||
the source then says why).
|
||||
+26
-4
@@ -91,13 +91,17 @@ animations off its root element: Slint inlines such a component at every
|
||||
use, which grows the generated code and the compiler's memory (IconButton
|
||||
puts them on an inner `face`).
|
||||
|
||||
A 0 × 0 element (`PopupMenu`, `ShareMenu`) inside a layout caps that layout's
|
||||
size across its direction at its minimum: put it outside the layout with
|
||||
`x: 0; y: 0`, as the phone's `ShareControl` does.
|
||||
|
||||
| Component | File | Key properties |
|
||||
|---|---|---|
|
||||
| `Icon` | icon.slint | `source` (an `Icons.*`), `size`, `tint` |
|
||||
| `Spinner` | icon.slint | `size`, `tint`, `running` |
|
||||
| `Button` | button.slint | `text`, `icon`, `kind` (`ButtonKind.primary/secondary/danger/ghost`), `enabled`, `checked`, `small`; `clicked` |
|
||||
| `IconButton` | button.slint | `icon`, `label` (screen readers), `tooltip` (default `label`, "" for none; on hover, also while disabled, desktop only), `checked`, `danger`, `alarm` (filled red with a white icon: Leave), `round`, `filled`, `edge` (the border of a filled one while not checked), `size`, `icon-size`, `tint`, `dot`, `count` (a neutral number at the top right, hidden at 0 or less); `clicked` |
|
||||
| `ActionButton` | button.slint | round button with a caption (the phone's voice bar and You page: Mute, Deafen, Go Live, Leave), no tooltip: `icon`, `text`, `checked`, `danger`, `alarm`, `checkable` (screen readers hear `checked`), `size`, `icon-size`, `edge` |
|
||||
| `ActionButton` | button.slint | round button with a caption (the phone's voice bar: Mic on or off, Deafen, Share, Leave; the You page: Mute, Deafen, Go Live, Leave), no tooltip: `icon`, `text`, `checked`, `danger`, `alarm`, `checkable` (screen readers hear `checked`), `size`, `icon-size`, `edge` |
|
||||
| `FocusRing` | button.slint | the accent ring of focused controls |
|
||||
| `TextField` | text-field.slint | `text`, `placeholder`, `input-type`, `icon`, `label`, `bare`, `read-only`; out `has-focus`, `text-height` (the height of its lines); `accepted`, `edited`, `key-pressed`; `clear()`, `select-all()`, `focus-end()` (the cursor after the text) |
|
||||
| `SearchBox` | text-field.slint | a TextField with a magnifier and the Ctrl K hint (`show-shortcut`) |
|
||||
@@ -125,7 +129,7 @@ puts them on an inner `face`).
|
||||
| `SpeakingBars` | meter.slint | animated "speaking" bars |
|
||||
| `NavItem` | list-item.slint | navigation entry: `icon`, `text`, `subtitle`, `selected`, `badge`, `chevron`; `clicked` |
|
||||
| `ListItem` | list-item.slint | row with a leading slot (@children), `title`, `subtitle`, `trailing`, `selected` |
|
||||
| `PopupMenu` | overlay.slint | themed menu: `entries` ([MenuEntry]), `show(x, y)`; `activated(int)` |
|
||||
| `PopupMenu` | overlay.slint | themed menu: `entries` ([MenuEntry]), `show(x, y)`, relative to the menu element (where that is not in a layout give it `x: 0; y: 0`, or Slint centres it in its parent); `activated(int)` |
|
||||
| `Tooltip` | overlay.slint | wraps @children; `text` shows at the pointer after a moment, until it leaves (desktop only: `Bridge.desktop`) |
|
||||
| `HoverTooltip` | tooltip.slint | the same, put last in an element (as IconButton does): `text`; `pressed` and `hovered` of the element's TouchArea (a press closes it until the pointer leaves) |
|
||||
| `TooltipBubble` | tooltip.slint | a tooltip's bubble: `text`, wrapping at `widest` (400px) |
|
||||
@@ -143,7 +147,8 @@ Shell pieces (ui/shells/): `DesktopShell` (rail + top bar + panels as
|
||||
server shows its icon or its initials, on a colour no other server has while
|
||||
there are at most ten, kept when a server is added),
|
||||
`TopBar` (the search, starting over the main panel, opens the search like
|
||||
Ctrl+K; the bell at the right), `MobileShell` (top bar, page, bottom
|
||||
Ctrl+K; the bell at the right), `MobileShell` (top bar, on the voice screen
|
||||
with Back, the channel, the people, Chats and More; the page; bottom
|
||||
navigation), `VoiceCard`, `VoiceButtons` (mute, deafen, share; `gear` adds
|
||||
the voice settings; `round` and `filled` for the voice view's call bar),
|
||||
`UserCard` (its avatar and name open Settings → My Account), `HoldToTalk`.
|
||||
@@ -184,6 +189,22 @@ Activity tab, with the streams (the streamer's avatar on their colour, Watch,
|
||||
Show and Leave). The Chat tab counts the server's unread chats; private chats
|
||||
count on the Home tab, where the direct messages are.
|
||||
|
||||
The phone's voice screen (`voice` in a phone-sized window,
|
||||
`screens/mobile-voice.slint`) has one header, the shell's top bar: Back (it
|
||||
closes the pins, the topics or the members over the screen first, then the
|
||||
screen), the channel's name on its banner with the server below, the people
|
||||
in voice (the members page), Chats with the unread count, and More: Pinned
|
||||
Messages and Topics (with a gateway), Stream Studio, Voice Settings and
|
||||
Activity (`more` opens it). Below it come the stream we watch or the streams
|
||||
as rows, the people (44 px avatars, scrolling sideways) and Invite, the
|
||||
channel's chat and the composer. The stream and the people take at most
|
||||
45 % of the screen, so the chat keeps about 320 px at 390 × 844 while
|
||||
watching. The bottom bar has Mic on or Mic off and Deafen; with push-to-talk
|
||||
Hold to talk in the middle (green, Talking…, while held) and Share,
|
||||
otherwise Share in the middle; Share opens the share menu (Share screen,
|
||||
Stream Studio) as the desktop's call bar does; and Leave, the screen's only
|
||||
one. The transmit mode comes from the stored audio settings at start.
|
||||
|
||||
## Home, friends, messages and the settings pages
|
||||
|
||||
These follow the design mockups 01 (home, desktop and phone), 02 (direct
|
||||
@@ -500,7 +521,8 @@ Environment variables (see `src/dev.rs`):
|
||||
scrolled up), and a stream, without a server (nothing is stored).
|
||||
- `VOELIN_OPEN=<what>[,<what>...]`: `home`, `server` (`server:chat`: the server chat), `settings[:voice|keybinds|streaming|privacy|appearance|profiles]` (`identities` is the same as `profiles`),
|
||||
`about`, `share[:live]`, `bookmark[:edit]`, `emoji`, `client`, `panel`, `no-panel`,
|
||||
`voice` (`voice:compact`: the smaller stage, not stored), `pins`, `topics`, `topic:<id>`, `member`, `poke`,
|
||||
`voice` (`voice:compact`: the smaller stage, not stored), `more` (after `voice` on the phone: the
|
||||
voice screen's More menu), `pins`, `topics`, `topic:<id>`, `member`, `poke`,
|
||||
`channel-password[:wrong]`, `actions` (the last message's actions, as if
|
||||
hovered: a screenshot cannot hover), `first-run` (Home's banner as before
|
||||
the first server, over the sample data), `link-confirm[:<url>]` (the question
|
||||
|
||||
Reference in new issue
Block a user