Format: the update dialog, toast and feedback tests pass cargo fmt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
44a7debfb6
commit
81d0f5f5dd
3 files changed
+24
-5
No files matched your search
+9
-2
@@ -124,7 +124,11 @@ impl RenderOnce for UpdateBanner {
|
||||
UpdateState::Available => text(cx, "update.available", &[("version", version)]),
|
||||
UpdateState::Downloading(value) => {
|
||||
let percent = (value * 100.0).round().to_string();
|
||||
text(cx, "update.downloading", &[("version", version), ("percent", &percent)])
|
||||
text(
|
||||
cx,
|
||||
"update.downloading",
|
||||
&[("version", version), ("percent", &percent)],
|
||||
)
|
||||
}
|
||||
UpdateState::Ready => text(cx, "update.ready", &[("version", version)]),
|
||||
};
|
||||
@@ -220,7 +224,10 @@ impl UpdateDialog {
|
||||
|
||||
impl RenderOnce for UpdateDialog {
|
||||
fn render(self, _: &mut Window, cx: &mut App) -> impl IntoElement {
|
||||
let args = [("name", self.name.as_ref()), ("version", self.version.as_ref())];
|
||||
let args = [
|
||||
("name", self.name.as_ref()),
|
||||
("version", self.version.as_ref()),
|
||||
];
|
||||
let headline = match self.state {
|
||||
UpdateState::Ready => text(cx, "update.headline.ready", &args),
|
||||
_ => text(cx, "update.headline.available", &args),
|
||||
|
||||
Reference in new issue
Block a user