feat: 1:1 Yandex ID account menu, official WordsCard AI replies, VibeResetButton pill, and git.tatar updater

This commit is contained in:
marwy 2026-11-27 13:43:33 +03:00
parent 682e3579ab
commit 6c30a33a9b
28 changed files with 2574 additions and 461 deletions

View file

@ -622,9 +622,9 @@ pub fn render_settings(
y += sc_h + 14.0;
// -------------------------------------------------------------------------
// 7. About 5.129.0 & Cache
// 7. About & Updates (`git.tatar/marwy/yandex-music-rs`) & Cache
// -------------------------------------------------------------------------
let about_h = 148.0;
let about_h = 172.0;
let about_inner = draw_settings_card(
ctx,
pal,
@ -634,9 +634,9 @@ pub fn render_settings(
{
let mut cy = about_inner.top();
let ver_str = if ru {
format!("Яндекс Музыка · Версия {}", APP_VERSION)
format!("yandex-music-rs · Версия {}", APP_VERSION)
} else {
format!("Yandex Music · Version {}", APP_VERSION)
format!("yandex-music-rs · Version {}", APP_VERSION)
};
ctx.draw_text_ellipsis(
&ver_str,
@ -645,10 +645,41 @@ pub fn render_settings(
TextAlign::Left,
);
cy += 24.0;
let repo_label = "git.tatar/marwy/yandex-music-rs";
let repo_w = ctx
.measure_text(repo_label, TextStyle::medium(13.0, pal.text_secondary), None)
.x
+ 8.0;
let repo_r = Rect::from_xywh(about_inner.left(), cy, repo_w.min(about_inner.width()), 20.0);
let repo_resp = ctx.interact(WidgetId::new("set_repo_link"), repo_r);
ctx.draw_text_ellipsis(
repo_label,
TextStyle::medium(
13.0,
if repo_resp.hovered {
pal.text_bright
} else if pal.is_dark {
pal.yellow
} else {
pal.outline_selected
},
),
repo_r,
TextAlign::Left,
);
if repo_resp.hovered {
ctx.set_cursor(CursorKind::Pointer);
}
if repo_resp.clicked {
actions.push(AppAction::OpenUrl(
"https://git.tatar/marwy/yandex-music-rs".into(),
));
}
cy += 22.0;
let cache_str = if ru {
format!("© Яндекс · Кэш обложек: {} шт.", covers.len())
format!("Кэш обложек: {} шт.", covers.len())
} else {
format!("© Yandex · Cover cache: {} items", covers.len())
format!("Cover cache: {} items", covers.len())
};
ctx.draw_text_ellipsis(
&cache_str,
@ -658,19 +689,26 @@ pub fn render_settings(
);
cy += 28.0;
let upd_label = if let Some((ref new_ver, _)) = app.available_update {
if ru {
format!("Обновить до {}", new_ver)
} else {
format!("Update to {}", new_ver)
}
} else if ru {
"Проверить обновления".to_string()
} else {
"Check for updates".to_string()
};
let (upd_resp, upd_r) = secondary_pill_button(
ctx,
pal,
WidgetId::new("set_check_updates"),
Pos2::new(about_inner.left(), cy),
None,
if ru {
"Проверить обновления"
} else {
"Check for updates"
},
&upd_label,
36.0,
false,
app.available_update.is_some(),
);
if upd_resp.clicked {
actions.push(AppAction::CheckForUpdates);