- bridge: ps-client on a tokio runtime of its own, awaited from GPUI's executor; log following as a channel that reconnects. - model: status polled every 2 s (outbounds every fifth round and on a reconnect), the zapret presets and tg links on connecting, and changes sent through ps-client's edits; what came of each is a notification, the service's own words when it refuses or cannot apply. - The window: a sidebar of pages; the overview shows the local proxy, the DPI bypass and the Telegram proxy with their states and switches, and what the service warns of. The other pages come next. - Icons: the components' own and the few the app adds, not all of Lucide. - zapret's engines by upstream's names (zapret-discord-youtube, zapret2). - gui-shot.sh can click before the shot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
843 B
Rust
28 lines
843 B
Rust
//! The icons: the components' own (`Assets`), and the few more the app uses, embedded one by
|
|
//! one rather than the whole Lucide catalogue.
|
|
|
|
use std::borrow::Cow;
|
|
|
|
use gpui_kit::*;
|
|
|
|
gpui_kit::assets::icon_assets!(Extra, [Shield, Send, Package, Pin, PinOff, RefreshCw, Save, Trash, Plus, Copy, Download, Link, Gauge, Power]);
|
|
|
|
pub struct AppAssets;
|
|
|
|
impl AssetSource for AppAssets {
|
|
fn load(&self, path: &str) -> Result<Option<Cow<'static, [u8]>>> {
|
|
match Extra.load(path)? {
|
|
Some(bytes) => Ok(Some(bytes)),
|
|
None => gpui_kit::assets::Assets.load(path),
|
|
}
|
|
}
|
|
|
|
fn list(&self, path: &str) -> Result<Vec<SharedString>> {
|
|
let mut paths = gpui_kit::assets::Assets.list(path)?;
|
|
paths.extend(Extra.list(path)?);
|
|
paths.sort();
|
|
paths.dedup();
|
|
Ok(paths)
|
|
}
|
|
}
|