use super::*;
pub(crate) fn mount_window_viewport_card(
state: &ShowcaseState,
dpr_sig: Signal<f32>,
tokens: ThemeTokens,
) -> NodeId {
let p: ThemePalette = tokens.get_palette();
let ctx_win: Context = current_context();
let vp_sig: Signal<Size> = use_viewport_size();
let bp_sig: Signal<Breakpoint> = use_breakpoint();
let safe_area_sig: Signal<SafeAreaInsets> = use_safe_area();
let orient_sig: Signal<ScreenOrientation> = ctx_win.get_orientation();
let locale_sig: Signal<String> = ctx_win.get_locale();
let focus_sig: Signal<bool> = ctx_win.get_window_focused();
let fs_sig: Signal<bool> = state.get_fullscreen();
let clip_draft: Signal<String> = Signal::new(WINDOW_CLIPBOARD_DEFAULT.to_string());
let clip_status: Signal<String> = Signal::new(WINDOW_CLIPBOARD_READY.to_string());
let viewport_line = move || -> String {
let vp: Size = vp_sig.get();
format!(
"Live Viewport: {:.0}x{:.0} @ {:.2}x DPR | Breakpoint: {:?}",
vp.get_width(),
vp.get_height(),
dpr_sig.get(),
bp_sig.get()
)
};
let safe_area_line = move || -> String {
let sa: SafeAreaInsets = safe_area_sig.get();
format!(
"SafeArea: T{:.0} R{:.0} B{:.0} L{:.0} | Orientation: {:?}",
sa.get_top(),
sa.get_right(),
sa.get_bottom(),
sa.get_left(),
orient_sig.get()
)
};
let locale_line = move || -> String {
format!(
"Locale: {} | Window Focused: {}",
locale_sig.get(),
focus_sig.get()
)
};
let clip_status_text = move || -> String { clip_status.get() };
let ctx_for_copy: Context = ctx_win.clone();
let on_copy = move |_: &UiEvent| {
let payload: String = clip_draft.get_untracked();
let accepted: bool = ctx_for_copy.copy_to_clipboard(&payload);
let tag: &str = if accepted {
WINDOW_CLIPBOARD_COPIED
} else {
WINDOW_CLIPBOARD_SIMULATED
};
let _: bool = clip_status.set(format!("Clipboard ({tag}): {} bytes", payload.len()));
};
view! {
EuvCard {
title: WINDOW_VIEWPORT_CARD_TITLE.to_string()
tokens: tokens
subtitle: WINDOW_VIEWPORT_CARD_SUB
column {
style: {
width: Length::Percent(100.0)
gap: SPACE_SM
}
text {
style: {
width: Length::Percent(100.0)
font_size: 13.5
font_weight: FontWeight::SemiBold
color: p.get_primary()
}
{ viewport_line }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.5
font_family: FontFamily::Monospace
color: p.get_foreground()
}
{ safe_area_line }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.5
color: p.get_muted_foreground()
}
{ locale_line }
}
EuvSwitch {
checked: fs_sig
label: SWITCH_FULLSCREEN.to_string()
tokens: tokens
}
EuvInput {
value: clip_draft
placeholder: WINDOW_CLIPBOARD_PLACEHOLDER.to_string()
tokens: tokens
}
EuvActionRow {
EuvButton {
label: WINDOW_BTN_COPY_CLIPBOARD.to_string()
tokens: tokens
sm()
on_click: on_copy
}
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.0
font_family: FontFamily::Monospace
color: p.get_card_foreground()
}
{ clip_status_text }
}
}
}
}
}
pub(crate) fn mount_window_hardware_card(tokens: ThemeTokens) -> NodeId {
let p: ThemePalette = tokens.get_palette();
let (font_info, gpu_info): (SystemFontInfo, GpuAdapterInfo) = cached_window_hardware_probe();
let platform: PlatformKind = current_platform();
let caps: PlatformCapabilities = PlatformCapabilities::for_platform(platform);
let summary: String = format!(
"Platform: {:?} | Font: {} ({:?})",
platform,
font_info.get_family_name(),
font_info.get_backend()
);
let gpu_line: String = format!(
"GPU Adapter: {} | Shader Compiled: {} | Haptics: {} | A11y Bridge: {}",
gpu_info.get_device_name(),
gpu_info.get_shader_compiled(),
caps.get_haptics(),
caps.get_accessibility_bridge()
);
view! {
EuvCard {
title: WINDOW_HARDWARE_CARD_TITLE.to_string()
tokens: tokens
subtitle: WINDOW_HARDWARE_CARD_SUB
column {
style: {
width: Length::Percent(100.0)
gap: SPACE_SM
}
text {
style: {
width: Length::Percent(100.0)
font_size: 13.5
font_weight: FontWeight::SemiBold
color: p.get_foreground()
}
{ summary }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.5
font_family: FontFamily::Monospace
color: p.get_muted_foreground()
}
{ gpu_line }
}
EuvCodeBlock {
code: CODE_WINDOW_SNIPPET.to_string()
tokens: tokens
}
}
}
}
}
pub(crate) fn mount_window_fps_card(state: &ShowcaseState, tokens: ThemeTokens) -> NodeId {
let p: ThemePalette = tokens.get_palette();
let ctx_win: Context = current_context();
let fps_limit_sig: Signal<Option<u32>> = ctx_win.get_fps_limit();
let live_fps_sig: Signal<f32> = ctx_win.get_live_fps();
let native_hz_sig: Signal<f32> = ctx_win.get_display_refresh_rate();
let demo_fps_idx: Signal<usize> = state.get_demo_fps_cap_index();
let demo_fps_line = move || -> String {
let native_hz: f32 = native_hz_sig.get().max(24.0);
let (target_label, target_hz): (String, f32) = match demo_fps_idx.get() {
1 => (FPS_OPT_30.to_string(), 30.0),
2 => (FPS_OPT_60.to_string(), 60.0),
3 => (FPS_OPT_120.to_string(), 120.0),
4 => (FPS_OPT_144.to_string(), 144.0),
5 => (FPS_OPT_240.to_string(), 240.0),
6 => (FPS_OPT_360.to_string(), 360.0),
_ => (format!("{FPS_OPT_NATIVE} ({native_hz:.0} Hz)"), native_hz),
};
let budget_ms: f32 = 1_000.0 / target_hz;
format!("Demo Widget Pacing: {target_label} ({budget_ms:.2} ms/frame — Card-Scoped Only)")
};
let global_fps_line = move || -> String {
let native_hz: f32 = native_hz_sig.get();
let cap_txt: String = match fps_limit_sig.get() {
None => format!("{FPS_OPT_NATIVE} ({native_hz:.0} Hz)"),
Some(v) => format!("Capped at {v} FPS"),
};
let live_fps: f32 = live_fps_sig.get();
if !live_fps.is_finite() || live_fps <= 0.05 {
format!("Global App Policy (Read-Only): {cap_txt} | Status: {LABEL_FPS_IDLE} (0.0 FPS)")
} else {
format!("Global App Policy (Read-Only): {cap_txt} | Live Measured: {live_fps:.1} FPS")
}
};
view! {
EuvCard {
title: FPS_DEMO_CARD_TITLE.to_string()
tokens: tokens
subtitle: FPS_DEMO_CARD_SUB
column {
style: {
width: Length::Percent(100.0)
gap: SPACE_SM
}
EuvSegmented {
options: vec![
FPS_OPT_NATIVE.to_string(),
FPS_OPT_30.to_string(),
FPS_OPT_60.to_string(),
FPS_OPT_120.to_string(),
FPS_OPT_144.to_string(),
FPS_OPT_240.to_string(),
FPS_OPT_360.to_string(),
]
selected: demo_fps_idx
tokens: tokens
}
text {
style: {
width: Length::Percent(100.0)
font_size: 13.0
font_weight: FontWeight::SemiBold
color: p.get_primary()
}
{ demo_fps_line }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.5
font_weight: FontWeight::Medium
color: p.get_muted_foreground()
}
{ global_fps_line }
}
}
}
}
}
pub(crate) fn mount_window_services_card(
state: &ShowcaseState,
native_feedback: Signal<String>,
tokens: ThemeTokens,
) -> (NodeId, NodeId) {
let p: ThemePalette = tokens.get_palette();
let platform: PlatformKind = current_platform();
let caps: PlatformCapabilities = PlatformCapabilities::for_platform(platform);
let hub: PlatformServiceHub = PlatformServiceHub::new(platform);
let cam_key: &'static str = SystemPermission::Camera.native_key(platform);
let island_active: Signal<bool> = state.get_island_active();
let island_progress: Signal<u8> = state.get_island_progress();
let cam_status: Signal<String> = state.get_camera_perm_status();
let proto_status: Signal<String> = state.get_protocol_status();
let a11y_count: Signal<u32> = state.get_a11y_announcements();
let haptic_count: Signal<u32> = state.get_haptic_pulses();
let feedback_text = move || -> String { native_feedback.get() };
let island_line = move || -> String {
format!(
"Dynamic Island: active={} ({}%) | Mode: {:?} | Biometrics: {:?}",
island_active.get(),
island_progress.get(),
PlatformServiceHub::default_island_mode(platform),
hub.biometric_kind()
)
};
let proto_cam_line = move || -> String {
format!(
"Protocol: {} | Camera: {} ({cam_key})",
proto_status.get(),
cam_status.get()
)
};
let a11y_haptic_line = move || -> String {
format!(
"A11y Bridge: {} (announcements={}) | Haptics: {} (pulses={})",
caps.get_accessibility_bridge(),
a11y_count.get(),
caps.get_haptics(),
haptic_count.get()
)
};
let on_toggle_island = move |_: &UiEvent| {
let next_active: bool = !island_active.get_untracked();
let _: bool = island_active.set_if_changed(next_active);
let next_pct: u8 = if next_active {
let cur: u8 = island_progress.get_untracked();
if cur >= 100 { 25 } else { (cur + 25).min(100) }
} else {
island_progress.get_untracked()
};
let _: bool = island_progress.set_if_changed(next_pct);
let mut svc: PlatformServiceHub = PlatformServiceHub::new(platform);
if next_active {
let mut content: LiveActivityContent = LiveActivityContent::new(
WINDOW_ISLAND_TITLE.to_string(),
format!("Active ({next_pct}%) on {platform:?}"),
);
content.set_progress_percent(Some(next_pct));
let _: LiveActivityHandle =
svc.start_live_activity(WINDOW_ISLAND_ID.to_string(), content);
let _: bool = native_feedback.set(format!(
"Dynamic Island LIVE ({next_pct}%) dispatched to {platform:?}"
));
} else {
let _: bool = dispatch_native_action(
NATIVE_ACTION_ISLAND,
WINDOW_ISLAND_STOP_CMD,
WINDOW_ISLAND_STOP_MSG,
);
let _: bool = native_feedback.set(WINDOW_ISLAND_ENDED.to_string());
}
};
let on_register_proto = move |_: &UiEvent| {
let mut reg: ProtocolRegistry = ProtocolRegistry::new();
let spec: ProtocolRegistration = ProtocolRegistration::new(
"euv".to_string(),
WINDOW_PROTO_APP_NAME.to_string(),
SHOWCASE_BUNDLE_ID.to_string(),
);
let native_ok: bool =
dispatch_native_action(NATIVE_ACTION_PROTOCOL, "euv", SHOWCASE_BUNDLE_ID);
if let Ok(desc) = reg.register(spec, platform) {
let tag: &str = if native_ok {
WINDOW_PROTO_TAG_BRIDGED
} else {
WINDOW_PROTO_TAG_VERIFIED
};
let msg: String = format!("Registered euv:// via {} ({tag})", desc.get_mechanism());
let _: bool = proto_status.set_if_changed(msg.clone());
let _: bool = native_feedback.set(msg);
}
};
let on_request_cam = move |_: &UiEvent| {
let mut mgr: PermissionManager = PermissionManager::new();
let desc: PermissionDescriptor = mgr.request(
SystemPermission::Camera,
WINDOW_CAMERA_REASON.to_string(),
platform,
);
let msg: String = format!("{:?} ({})", desc.get_status(), desc.get_native_key());
let _: bool = cam_status.set_if_changed(msg.clone());
let _: bool = native_feedback.set(format!("Permission requested: {msg}"));
};
let on_a11y_haptic = move |_: &UiEvent| {
let mut svc: PlatformServiceHub = PlatformServiceHub::new(platform);
let fired: bool = svc.trigger_haptic(HapticStyle::Medium);
svc.announce_a11y(WINDOW_A11Y_PULSE_MSG.to_string(), A11yLiveRegion::Polite);
let _: bool = a11y_count.update(|v: &mut u32| *v += 1);
let _: bool = haptic_count.update(|v: &mut u32| *v += 1);
let _: bool = native_feedback.set(format!(
"Dispatched Haptic pulse (ok={fired}) + A11y announcement #{}",
a11y_count.get_untracked()
));
};
let mut body_id: NodeId = NodeId::default();
let card: NodeId = view! {
EuvCard {
title: WINDOW_CARD_TITLE.to_string()
tokens: tokens
subtitle: WINDOW_CARD_SUB
column {
node_ref: body_id
role: A11yRole::Region
a11y_label: WINDOW_A11Y_TELEMETRY
style: {
width: Length::Percent(100.0)
gap: SPACE_SM
}
text {
style: {
width: Length::Percent(100.0)
font_size: 13.0
font_weight: FontWeight::SemiBold
color: p.get_card_foreground()
}
{ feedback_text }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 13.0
color: p.get_primary()
}
{ island_line }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.5
color: p.get_muted_foreground()
}
{ proto_cam_line }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.5
color: p.get_muted_foreground()
}
{ a11y_haptic_line }
}
EuvActionRow {
EuvButton {
label: WINDOW_BTN_TOGGLE_ISLAND.to_string()
tokens: tokens
on_click: on_toggle_island
}
EuvButton {
label: WINDOW_BTN_REGISTER_PROTO.to_string()
tokens: tokens
outline()
on_click: on_register_proto
}
EuvButton {
label: WINDOW_BTN_REQUEST_CAMERA.to_string()
tokens: tokens
outline()
on_click: on_request_cam
}
EuvButton {
label: WINDOW_BTN_A11Y_HAPTIC.to_string()
tokens: tokens
outline()
on_click: on_a11y_haptic
}
}
}
}
};
(card, body_id)
}
pub(crate) fn mount_window_island_card(state: &ShowcaseState, tokens: ThemeTokens) -> NodeId {
let target_plat_idx: Signal<usize> = state.get_os_target_platform_idx();
let island_mode_idx: Signal<usize> = state.get_island_mode_idx();
let island_active: Signal<bool> = state.get_island_active();
let island_progress: Signal<u8> = state.get_island_progress();
let sys_notifs: Signal<Vec<(String, String)>> = state.get_system_notifications();
let pill_text = move || -> String {
let tp: PlatformKind = WINDOW_ALL_PLATFORMS[target_plat_idx.get() % 7];
let im: IslandPresentationMode = WINDOW_ALL_ISLAND_MODES[island_mode_idx.get() % 6];
let def_im: IslandPresentationMode = PlatformServiceHub::default_island_mode(tp);
let active: bool = island_active.get();
let pct: u8 = island_progress.get();
let state_tag: &str = if active {
WINDOW_ISLAND_STATE_LIVE
} else {
WINDOW_ISLAND_STATE_IDLE
};
format!(
"[{state_tag}] Dynamic Island ({tp:?}) | Mode: {im:?} (OS Default: {def_im:?}) | Progress: {pct}%"
)
};
let on_alert_notif = move |_: &UiEvent| {
let tp: PlatformKind = WINDOW_ALL_PLATFORMS[target_plat_idx.get_untracked() % 7];
let mut svc: PlatformServiceHub = PlatformServiceHub::new(tp);
let n: SystemNotification = SystemNotification::new(
WINDOW_NOTIF_ALERT_ID.to_string(),
format!("{tp:?} Alert Notification"),
WINDOW_NOTIF_ALERT_BODY.to_string(),
);
svc.send_notification(n.clone());
let _: bool = sys_notifs.update(|v: &mut Vec<(String, String)>| {
v.insert(0, (n.get_title().clone(), n.get_body().clone()));
v.truncate(5);
});
};
let on_silent_notif = move |_: &UiEvent| {
let tp: PlatformKind = WINDOW_ALL_PLATFORMS[target_plat_idx.get_untracked() % 7];
let mut svc: PlatformServiceHub = PlatformServiceHub::new(tp);
let mut n: SystemNotification = SystemNotification::new(
WINDOW_NOTIF_SYNC_ID.to_string(),
format!("{tp:?} Silent Sync (Badge 3)"),
WINDOW_NOTIF_SYNC_BODY.to_string(),
);
n.set_silent(true);
n.set_badge_count(Some(3));
svc.send_notification(n.clone());
let _: bool = sys_notifs.update(|v: &mut Vec<(String, String)>| {
v.insert(0, (n.get_title().clone(), n.get_body().clone()));
v.truncate(5);
});
};
let on_clear_notifs = move |_: &UiEvent| {
let _: bool = sys_notifs.set_if_changed(Vec::new());
};
view! {
EuvCard {
title: WINDOW_ISLAND_CARD_TITLE.to_string()
tokens: tokens
subtitle: WINDOW_ISLAND_CARD_SUB
column {
style: {
width: Length::Percent(100.0)
gap: SPACE_SM
}
EuvSegmented {
options: vec![
WINDOW_PLAT_IOS.to_string(),
WINDOW_PLAT_IPADOS.to_string(),
LABEL_PLATFORM_ANDROID.to_string(),
LABEL_PLATFORM_MACOS.to_string(),
WINDOW_PLAT_WINDOWS.to_string(),
WINDOW_PLAT_LINUX.to_string(),
WINDOW_PLAT_WEB.to_string(),
]
selected: target_plat_idx
tokens: tokens
}
EuvSegmented {
options: vec![
WINDOW_MODE_COMPACT.to_string(),
WINDOW_MODE_MINIMAL.to_string(),
WINDOW_MODE_EXPANDED.to_string(),
WINDOW_MODE_LOCKSCREEN.to_string(),
WINDOW_MODE_FALLBACK.to_string(),
WINDOW_MODE_STATUSBAR.to_string(),
]
selected: island_mode_idx
tokens: tokens
}
column {
style: {
width: Length::Percent(100.0)
padding: Edges::all(SPACE_MD)
gap: SPACE_XS
background: Color::hex(0x09090B)
radius: 20.0
overflow: Overflow::Hidden
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.0
font_weight: FontWeight::SemiBold
color: Color::hex(0xF8FAFC)
}
{ pill_text }
}
}
EuvActionRow {
EuvButton {
label: WINDOW_BTN_ALERT_NOTIF.to_string()
tokens: tokens
sm()
on_click: on_alert_notif
}
EuvButton {
label: WINDOW_BTN_SILENT_NOTIF.to_string()
tokens: tokens
outline()
sm()
on_click: on_silent_notif
}
EuvButton {
label: WINDOW_BTN_CLEAR_NOTIFS.to_string()
tokens: tokens
outline()
sm()
on_click: on_clear_notifs
}
}
EuvSonner {
messages: sys_notifs
tokens: tokens
}
}
}
}
}
pub(crate) fn mount_window_permissions_card(
state: &ShowcaseState,
native_feedback: Signal<String>,
tokens: ThemeTokens,
) -> NodeId {
let platform: PlatformKind = current_platform();
let target_plat_idx: Signal<usize> = state.get_os_target_platform_idx();
let perm_statuses: Signal<Vec<PermissionStatus>> = state.get_permission_statuses();
let vp_sig: Signal<Size> = use_viewport_size();
let matrix_grid_style = move || -> Style {
let cols: u16 = responsive_grid_columns(vp_sig.get().get_width(), 2);
Style::default()
.grid(cols)
.width(Length::Percent(100.0))
.gap(SPACE_SM)
};
let build_perm_cards = move || -> Vec<NodeId> {
let live: ThemeTokens = live_tokens_untracked(tokens);
let live_p: ThemePalette = live.get_palette();
let live_g: ThemeGeometry = live.get_geometry();
let tp: PlatformKind = WINDOW_ALL_PLATFORMS[target_plat_idx.get() % 7];
let statuses: Vec<PermissionStatus> = perm_statuses.get();
WINDOW_ALL_PERMS
.iter()
.copied()
.enumerate()
.map(|(idx, perm): (usize, SystemPermission)| {
let st: PermissionStatus = statuses
.get(idx)
.copied()
.unwrap_or(PermissionStatus::NotDetermined);
let native_key: &'static str = perm.native_key(tp);
let row_title: String = format!("{perm:?} [{st:?}]");
let key_line: String = native_key.to_string();
let on_req = move |_: &UiEvent| {
let mut mgr: PermissionManager = PermissionManager::new();
let desc: PermissionDescriptor =
mgr.request(perm, format!("Test {perm:?} access"), platform);
let _: bool = perm_statuses.update(|vec: &mut Vec<PermissionStatus>| {
if let Some(slot) = vec.get_mut(idx) {
*slot = desc.get_status();
}
});
let _: bool = native_feedback.set(format!(
"Requested {perm:?} ({}) -> {:?}",
perm.native_key(platform),
desc.get_status()
));
};
let on_deny = move |_: &UiEvent| {
let _: bool = perm_statuses.update(|vec: &mut Vec<PermissionStatus>| {
if let Some(slot) = vec.get_mut(idx) {
*slot = PermissionStatus::Denied;
}
});
let _: bool = native_feedback.set(format!("Marked {perm:?} as Denied"));
};
view! {
column {
style: {
width: Length::Percent(100.0)
padding: Edges::all(SPACE_MD)
gap: SPACE_XS
background: live_p.get_card()
border: (live_g.get_border_width(), live_p.get_border())
radius: live_g.get_radius_sm()
overflow: Overflow::Hidden
}
text {
style: {
width: Length::Percent(100.0)
font_size: 12.5
font_weight: FontWeight::SemiBold
color: live_p.get_card_foreground()
}
{ row_title }
}
text {
style: {
width: Length::Percent(100.0)
font_size: 11.5
font_family: FontFamily::Monospace
color: live_p.get_muted_foreground()
}
{ key_line }
}
EuvActionRow {
EuvButton {
label: WINDOW_BTN_PERM_REQUEST.to_string()
tokens: live
outline()
sm()
on_click: on_req
}
EuvButton {
label: WINDOW_BTN_PERM_DENY.to_string()
tokens: live
destructive()
sm()
on_click: on_deny
}
}
}
}
})
.collect()
};
view! {
EuvCard {
title: WINDOW_PERMS_CARD_TITLE.to_string()
tokens: tokens
subtitle: WINDOW_PERMS_CARD_SUB
grid {
bind_style: matrix_grid_style
bind_children: build_perm_cards
}
}
}
}
pub fn mount_window_page(state: &ShowcaseState, tokens: ThemeTokens) -> NodeId {
let ctx_win: Context = current_context();
let native_feedback: Signal<String> = Signal::new(WINDOW_READY_FEEDBACK.to_string());
let dpr_sig: Signal<f32> = Signal::new(1.0);
let fs_sig: Signal<bool> = state.get_fullscreen();
let prev_fs: Rc<Cell<bool>> = Rc::new(Cell::new(fs_sig.get_untracked()));
let (win_scope, _): (Scope, Effect) = Scope::run(|_: Scope| {
let _: SystemEventSubscription = on_system_event(move |ev: &SystemEvent| {
if let SystemEvent::Resize { scale_factor, .. } = ev {
let _: bool = dpr_sig.set_if_changed(*scale_factor);
}
});
Effect::new(move || {
let now_fs: bool = fs_sig.get();
if prev_fs.replace(now_fs) != now_fs {
let arg: &str = if now_fs { "on" } else { "off" };
let _: bool = dispatch_native_action(NATIVE_ACTION_FULLSCREEN, arg, "");
let _: bool = native_feedback.set(format!("Immersive fullscreen mode: {arg}"));
}
})
});
let viewport_card: NodeId = mount_window_viewport_card(state, dpr_sig, tokens);
let hardware_card: NodeId = mount_window_hardware_card(tokens);
let fps_card: NodeId = mount_window_fps_card(state, tokens);
let (services_card, body_id): (NodeId, NodeId) =
mount_window_services_card(state, native_feedback, tokens);
let island_card: NodeId = mount_window_island_card(state, tokens);
let perms_card: NodeId = mount_window_permissions_card(state, native_feedback, tokens);
let top_grid: NodeId = mount_responsive_grid(vec![viewport_card, services_card], 2);
let mid_grid: NodeId = mount_responsive_grid(vec![fps_card, hardware_card], 2);
let page: NodeId = view! {
EuvPage {
title: WINDOW_TITLE.to_string()
subtitle: WINDOW_SUBTITLE.to_string()
tokens: tokens
{ top_grid }
{ mid_grid }
{ island_card }
{ perms_card }
}
};
ctx_win.get_scene().with_write(
|tree: &mut SceneTree| {
tree.attach_scope(body_id, win_scope);
},
(),
);
page
}