v0.33.1
This commit is contained in:
1 parent
2ccc598b12
commit
b757b34a31
26 files changed
+671
-116
No files matched your search
+19
-10
@@ -25,20 +25,29 @@ fn default_admin_table_density() -> String {
|
||||
"normal".to_owned()
|
||||
}
|
||||
fn default_admin_dashboard_density() -> String {
|
||||
"compact".to_owned()
|
||||
DASHBOARD_DEFAULT_PRESET.dashboard_density.clone()
|
||||
}
|
||||
fn default_admin_dashboard_widgets() -> Vec<String> {
|
||||
DASHBOARD_WIDGETS
|
||||
.iter()
|
||||
.map(|widget| widget.id.clone())
|
||||
.collect()
|
||||
let mut order = DASHBOARD_DEFAULT_PRESET.dashboard_widgets.clone();
|
||||
for widget in DASHBOARD_WIDGETS.iter() {
|
||||
if !order.contains(&widget.id) {
|
||||
order.push(widget.id.clone());
|
||||
}
|
||||
}
|
||||
order
|
||||
}
|
||||
fn default_hidden_dashboard_widgets() -> Vec<String> {
|
||||
DASHBOARD_WIDGETS
|
||||
.iter()
|
||||
.filter(|widget| widget.default_hidden)
|
||||
.map(|widget| widget.id.clone())
|
||||
.collect()
|
||||
let mut hidden = DASHBOARD_DEFAULT_PRESET.dashboard_hidden_widgets.clone();
|
||||
for widget in DASHBOARD_WIDGETS.iter() {
|
||||
if !DASHBOARD_DEFAULT_PRESET
|
||||
.dashboard_widgets
|
||||
.contains(&widget.id)
|
||||
&& widget.default_hidden
|
||||
{
|
||||
hidden.push(widget.id.clone());
|
||||
}
|
||||
}
|
||||
hidden
|
||||
}
|
||||
|
||||
// Preserve the user's saved order/visibility, drop identifiers unknown to this
|
||||
|
||||
Reference in new issue
Block a user