feat: 侧栏卡片显隐、本地服务卡片恢复、页面同步滚动
- 侧边栏设置新增「侧栏卡片」:本地管理员/本地服务显隐,即时保存 show_profile/show_service - 首页固定第一位恢复「本地服务」卡片(运行时项目网格),移除卡片三点菜单 - 后台首页卡片新增只读「本地服务」表,标记不可删除 - 前台改为整页滚动,左右两栏同步 - 验证:显隐落库、三点为 0、本地表无删除、滚动两栏同步 300px
This commit is contained in:
+27
-1
@@ -79,9 +79,35 @@ impl Default for HeaderSettings {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Default)]
|
||||
fn default_true() -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
impl Default for SidebarSettings {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
show_profile: true,
|
||||
show_service: true,
|
||||
hidden: Vec::new(),
|
||||
order: Vec::new(),
|
||||
hidden_groups: Vec::new(),
|
||||
shown_groups: Vec::new(),
|
||||
group_order: std::collections::HashMap::new(),
|
||||
tree_hidden: Vec::new(),
|
||||
tree_order: std::collections::HashMap::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||
#[serde(default)]
|
||||
pub struct SidebarSettings {
|
||||
/// 是否显示「本地管理员」资料卡
|
||||
#[serde(default = "default_true")]
|
||||
pub show_profile: bool,
|
||||
/// 是否显示「本地服务」面板
|
||||
#[serde(default = "default_true")]
|
||||
pub show_service: bool,
|
||||
/// 隐藏的分类 id
|
||||
pub hidden: Vec<String>,
|
||||
/// 分类显示顺序(id);未列出的排在后面,保持原有顺序
|
||||
|
||||
Reference in New Issue
Block a user