Desktop: tray mini card on left click (store status at a glance next to the tray icon; Refresh runs the main window's Refresh all)
This commit is contained in:
parent
c03938f9dc
commit
60a72e6947
23 changed files with 1052 additions and 11 deletions
|
|
@ -43,6 +43,19 @@ pub fn require_main(label: &str, url: &Url, dev: bool) -> Result<(), String> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
/// The tray card window (card.rs): it may call only the card commands (`card_get`, `card_action`).
|
||||
pub const CARD: &str = "card";
|
||||
|
||||
pub fn require_card(label: &str, url: &Url, dev: bool) -> Result<(), String> {
|
||||
if label != CARD {
|
||||
return Err(format!("not allowed from window '{label}'"));
|
||||
}
|
||||
if !is_local_origin(url, dev) {
|
||||
return Err("not allowed from this page".into());
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Method kinds the sidecar announces in its `session.hello` descriptors.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum Kind {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue