chore: release v0.11.3

This commit is contained in:
晴天
2026-04-03 00:16:50 +08:00
parent 61400397ec
commit ce4e9ee8b0
19 changed files with 269 additions and 76 deletions

2
src-tauri/Cargo.lock generated
View File

@@ -351,7 +351,7 @@ dependencies = [
[[package]]
name = "clawpanel"
version = "0.11.2"
version = "0.11.3"
dependencies = [
"base64 0.22.1",
"chrono",

View File

@@ -1,6 +1,6 @@
[package]
name = "clawpanel"
version = "0.11.2"
version = "0.11.3"
edition = "2021"
description = "ClawPanel - OpenClaw 可视化管理面板"
authors = ["qingchencloud"]

View File

@@ -101,6 +101,36 @@ fn panel_version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
fn find_panel_policy_entry<'a>(policy: &'a VersionPolicy, current_version: &str) -> Option<&'a VersionPolicyEntry> {
if let Some(entry) = policy.panels.get(current_version) {
return Some(entry);
}
let current_parts = parse_version(current_version);
if current_parts.len() < 2 {
return None;
}
policy
.panels
.iter()
.filter_map(|(version, entry)| {
let parts = parse_version(version);
if parts.len() < 2 {
return None;
}
if parts[0] != current_parts[0] || parts[1] != current_parts[1] {
return None;
}
if parts > current_parts {
return None;
}
Some((parts, entry))
})
.max_by(|(left, _), (right, _)| left.cmp(right))
.map(|(_, entry)| entry)
}
fn parse_version(value: &str) -> Vec<u32> {
value
.split(|c: char| !c.is_ascii_digit())
@@ -231,7 +261,7 @@ pub(crate) fn all_standalone_dirs() -> Vec<PathBuf> {
fn recommended_version_for(source: &str) -> Option<String> {
let policy = load_version_policy();
let panel_entry = policy.panels.get(panel_version());
let panel_entry = find_panel_policy_entry(&policy, panel_version());
match source {
"official" => panel_entry
.and_then(|entry| entry.official.recommended.clone())

View File

@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-config-schema/schema.json",
"productName": "ClawPanel",
"version": "0.11.2",
"version": "0.11.3",
"identifier": "ai.openclaw.clawpanel",
"build": {
"frontendDist": "../dist",