Add update policy controls

This commit is contained in:
2026-05-09 04:13:41 -04:00
parent 726471ea64
commit e30fce9213
7 changed files with 212 additions and 17 deletions
+2
View File
@@ -19,6 +19,7 @@ mod split;
mod sync;
mod tab;
mod tab_group;
mod update;
mod url_text;
pub use archive::{ArchiveSource, ArchivedTab};
@@ -57,4 +58,5 @@ pub use sync::{
};
pub use tab::{BrowserTab, TabFlags, TabState};
pub use tab_group::TabGroup;
pub use update::UpdatePolicy;
pub use url_text::UrlText;
+26
View File
@@ -0,0 +1,26 @@
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum UpdatePolicy {
#[default]
Automatic,
Manual,
}
impl UpdatePolicy {
pub const ALL: &[Self] = &[Self::Automatic, Self::Manual];
#[must_use]
pub fn name(self) -> &'static str {
match self {
Self::Automatic => "Automatic",
Self::Manual => "Manual",
}
}
#[must_use]
pub fn detail(self) -> &'static str {
match self {
Self::Automatic => "Use release manifests as the automatic update source.",
Self::Manual => "Keep release manifest checks user-initiated.",
}
}
}