573b2af334
UX polish batch 1 (clients/windows/ui-polish-plan.md, workstreams W0/A1/B/C/E):
- W0: the shell's duplicated trust/settings structs are gone — src/trust.rs
re-exports pf-client-core's, so the shell and the spawned session binary share
ONE Settings shape over client-windows-settings.json. Fixes real bugs: the
shell's saves no longer drop session-side fields; the stats-overlay toggle
(show_hud -> show_stats, serde alias migrates old files) and the forwarded-
controller pick now actually reach the spawned session. The "Streaming engine"
Settings combo is gone (PUNKTFUNK_BUILTIN_STREAM=1 stays as the dev A/B knob).
- Forwarded-controller pinning by stable key (vid:pid:name, pf-client-core's
format): persisted as forward_pad, applied by the shell's own service at
startup AND by the session binary in session_params (both OSes — the session
never applied the pin before).
- A1 single window: the shell hides itself when the spawned session window
presents its first frame ({"ready":true}) and restores + foregrounds on the
child's exit — exactly one visible Punktfunk window at any time. Restore runs
before the request-access cancel gate so a Ready/Cancel race can't strand the
shell hidden.
- C console UI: punktfunk-session --browse gains --json-status (ready when the
library window presents; error line on a failed start), and the shell
surfaces it — "Open console UI" on paired hosts' menus, plus a controller-
detected hint card targeting the most recent paired host (x64 only; aarch64
ships no skia ui feature). Browse spawns hide/restore the shell like streams.
- B responsive: minimum window size (420x360); the hosts header collapses to
icon-only buttons below 700 px; the session status card shrinks instead of
clipping (max_width); busy pages, help actions, licenses and long labels wrap.
- E polish: session exe gets the app icon (winresource + WM_SETICON via the new
pf-presenter win32.rs); both exes share an explicit AppUserModelID on
unpackaged runs (packaged identity wins) so the windows group as one taskbar
app across the visibility handoff; "Start streams fullscreen" toggle passes
--fullscreen (GTK parity); connects stamp KnownHost::last_used; the connect
target is stashed for every route so "Connecting to X" always names the host.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
75 lines
2.5 KiB
Rust
75 lines
2.5 KiB
Rust
//! Static screen: the app's own license + the third-party software notices (reached from
|
|
//! Settings).
|
|
|
|
use super::style::*;
|
|
use super::Screen;
|
|
use windows_reactor::*;
|
|
|
|
/// punktfunk's own license (MIT OR Apache-2.0).
|
|
const APP_LICENSE: &str = concat!(
|
|
include_str!("../../../../LICENSE-MIT"),
|
|
"\n\n================================ Apache-2.0 ================================\n\n",
|
|
include_str!("../../../../LICENSE-APACHE"),
|
|
);
|
|
/// Third-party software notices for the linked Rust crates (generated by
|
|
/// scripts/gen-third-party-notices.sh; the MSIX also ships this under licenses/).
|
|
const THIRD_PARTY_NOTICES: &str = include_str!("../../../../THIRD-PARTY-NOTICES.txt");
|
|
|
|
pub(crate) fn licenses_page(set_screen: &AsyncSetState<Screen>) -> Element {
|
|
let back_btn = button("Back").accent().icon(Symbol::Back).on_click({
|
|
let ss = set_screen.clone();
|
|
move || ss.call(Screen::Settings)
|
|
});
|
|
|
|
let app_card = card(
|
|
vstack((
|
|
text_block("punktfunk").font_size(15.0).semibold(),
|
|
text_block("Licensed under MIT OR Apache-2.0, at your option.")
|
|
.font_size(12.0)
|
|
.wrap()
|
|
.foreground(ThemeRef::SecondaryText),
|
|
text_block(APP_LICENSE)
|
|
.font_size(11.0)
|
|
.wrap()
|
|
.foreground(ThemeRef::SecondaryText),
|
|
))
|
|
.spacing(8.0),
|
|
);
|
|
|
|
let natives_card = card(
|
|
vstack((
|
|
text_block("Bundled components").font_size(15.0).semibold(),
|
|
text_block(
|
|
"FFmpeg is bundled under the LGPL v2.1+ (dynamically linked, replaceable DLLs); its \
|
|
license and notice ship in the installed licenses\\ folder. SDL 3 (Zlib) and the \
|
|
Windows App SDK (Microsoft) are also linked.",
|
|
)
|
|
.font_size(12.0)
|
|
.wrap()
|
|
.foreground(ThemeRef::SecondaryText),
|
|
))
|
|
.spacing(8.0),
|
|
);
|
|
|
|
let notices_card = card(
|
|
vstack((
|
|
text_block("Rust crates").font_size(15.0).semibold(),
|
|
text_block(THIRD_PARTY_NOTICES)
|
|
.font_size(11.0)
|
|
.wrap()
|
|
.foreground(ThemeRef::SecondaryText),
|
|
))
|
|
.spacing(8.0),
|
|
);
|
|
|
|
page(vec![
|
|
page_header("Third-party licenses", back_btn),
|
|
section("PUNKTFUNK"),
|
|
app_card.into(),
|
|
section("BUNDLED"),
|
|
natives_card.into(),
|
|
section("OPEN SOURCE"),
|
|
notices_card.into(),
|
|
])
|
|
}
|