diff --git a/src/version.rs b/src/version.rs index 7b89d5f..7563383 100644 --- a/src/version.rs +++ b/src/version.rs @@ -1 +1 @@ -pub static VERSION: &str = "v0.5.1"; \ No newline at end of file +pub static VERSION: &str = "v0.6.0"; \ No newline at end of file diff --git a/ui/logic.slint b/ui/logic.slint index b8fbf6e..3407f70 100644 --- a/ui/logic.slint +++ b/ui/logic.slint @@ -7,7 +7,7 @@ export global Logic { callback switch-rss(string, string); // from_suuid, to_suuid callback toggle-rss-favorite(string); // suuid callback sync-rss(string); // suuid - callback sync-rss_all(); + callback sync-rss-all(); callback get-rss-config-to-ui(string) -> RssConfig; // suuid callback exist-rss(string) -> bool; // suuid diff --git a/ui/panel/bodyer/add.slint b/ui/panel/bodyer/add.slint index ded63e6..2221557 100644 --- a/ui/panel/bodyer/add.slint +++ b/ui/panel/bodyer/add.slint @@ -2,7 +2,7 @@ import { CheckBox, ComboBox, LineEdit } from "std-widgets.slint"; import { Theme, Icons } from "../../theme.slint"; import { Store, TabIndex, RssConfig } from "../../store.slint"; import { Logic } from "../../logic.slint"; -import { CancelBtn, ConfirmBtn, Tag, IconBtn, NoMessageImg, Label, Head, SettingDetailInner, SettingDetailInnerVbox, SettingDetailLabel } from "../../base/widgets.slint"; +import { CancelBtn, ConfirmBtn, Tag, IconBtn, NoMessageImg, Label, Head, SettingDetailInner, SettingDetailInnerVbox, SettingDetailLabel, CenterLayout } from "../../base/widgets.slint"; enum BtnIndex { New, @@ -10,6 +10,21 @@ enum BtnIndex { Delete, } +component AHead inherits Head { + icon: Icons.add-small; + title: Logic.tr(Store.is-cn, "添加"); + hbox-alignment: LayoutAlignment.space-between; + + CenterLayout { + IconBtn { + icon: Icons.refresh; + icon-width: Theme.icon-size * 1.2; + background: Colors.transparent; + clicked => { Logic.sync-rss-all(); } + } + } +} + component RssList inherits Rectangle { private property item-height: 40px; private property selected-item-color: Theme.lighter-border-color; @@ -281,11 +296,7 @@ component Body inherits Rectangle { private property rss-list-btns-index: BtnIndex.New; rsslist-vbox := VerticalLayout { - Head { - hbox-alignment: LayoutAlignment.start; - icon: Icons.add-small; - title: Logic.tr(Store.is-cn, "添加"); - } + AHead { } rsslist := RssList { }