Files
qbz/src-tauri/src/snap.rs
T
vicrodh 00675de6b8 feat(snap): add snap sandbox detection and welcome modal wiring
Detect when QBZ runs inside a Snap sandbox (via SNAP env var) and show
a one-time welcome modal with required plug connection commands. Adds a
Snap Sandbox section in Settings with copyable commands, mirroring the
existing Flatpak pattern.

Backend: snap.rs module, DB table snap_welcome_shown, V2 commands.
Frontend: updatesService, +page.svelte modal queue, SettingsView section.
2026-03-02 11:10:50 -06:00

17 lines
340 B
Rust

//! Snap runtime detection and utilities
//!
//! Detects when QBZ is running inside a Snap sandbox
//! and provides sandbox-specific guidance.
use std::env;
/// Check if QBZ is running inside a Snap sandbox
pub fn is_snap() -> bool {
env::var("SNAP").is_ok()
}
#[tauri::command]
pub fn is_running_in_snap() -> bool {
is_snap()
}