Settings → About: version, website, release notes, sources, support, donations
The About tab shows the version and links to the website (in the interface language), the release notes of this version, the source code and the support contacts; "Support the project" opens chess.vrubel.xyz/donate, which the website server sends on to DONATE_URL (the support section while it is not set), so the donation service can change without a new release. Links open in the browser (eframe "links": webbrowser, MIT OR Apache-2.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
530f801ae9
commit
507e44b6ae
8 changed files with 452 additions and 6 deletions
|
|
@ -59,7 +59,7 @@ pub struct App {
|
|||
|
||||
/// Dev-only startup automation for screenshots/manual QA (see docs/dev/desktop.md):
|
||||
/// `CP_OPEN=<game index>` opens a game from the first database, `CP_PLY=<n>` steps
|
||||
/// along the main line, `CP_ANALYZE=1` starts the engine, `CP_SETTINGS=1` opens settings,
|
||||
/// along the main line, `CP_ANALYZE=1` starts the engine, `CP_SETTINGS=1` opens settings (`=board`, `=about`: that tab),
|
||||
/// `CP_REVIEW=1` starts the whole-game analysis (`=dialog` only opens its dialog).
|
||||
#[derive(Default)]
|
||||
struct DebugStartup {
|
||||
|
|
@ -148,8 +148,10 @@ impl App {
|
|||
if let Ok(tab) = std::env::var("CP_SETTINGS") {
|
||||
// Opened after a short delay (see debug_screenshot) so a fullscreen switch is done first.
|
||||
self.debug.open_settings = true;
|
||||
if tab == "board" {
|
||||
self.settings_ui.tab = Tab::Board;
|
||||
match tab.as_str() {
|
||||
"board" => self.settings_ui.tab = Tab::Board,
|
||||
"about" => self.settings_ui.tab = Tab::About,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
self
|
||||
|
|
|
|||
|
|
@ -2691,6 +2691,86 @@ const ROWS: &[[&str; 6]] = &[
|
|||
"Aljechin",
|
||||
"Alekhine",
|
||||
"Aljechin",
|
||||
], // Settings → About.
|
||||
[
|
||||
"About",
|
||||
"О программе",
|
||||
"À propos",
|
||||
"Über",
|
||||
"Acerca de",
|
||||
"Informazioni",
|
||||
],
|
||||
[
|
||||
"Version",
|
||||
"Версия",
|
||||
"Version",
|
||||
"Version",
|
||||
"Versión",
|
||||
"Versione",
|
||||
],
|
||||
[
|
||||
"Free chess database software for Windows, macOS and Linux.",
|
||||
"Бесплатная программа для работы с шахматными базами на Windows, macOS и Linux.",
|
||||
"Logiciel gratuit pour bases de données d'échecs sur Windows, macOS et Linux.",
|
||||
"Kostenloses Programm für Schachdatenbanken unter Windows, macOS und Linux.",
|
||||
"Programa gratuito para bases de datos de ajedrez en Windows, macOS y Linux.",
|
||||
"Programma gratuito per database di scacchi su Windows, macOS e Linux.",
|
||||
],
|
||||
[
|
||||
"Website",
|
||||
"Сайт",
|
||||
"Site web",
|
||||
"Website",
|
||||
"Sitio web",
|
||||
"Sito web",
|
||||
],
|
||||
[
|
||||
"What's new",
|
||||
"Что нового",
|
||||
"Nouveautés",
|
||||
"Neuigkeiten",
|
||||
"Novedades",
|
||||
"Novità",
|
||||
],
|
||||
[
|
||||
"Source code",
|
||||
"Исходный код",
|
||||
"Code source",
|
||||
"Quellcode",
|
||||
"Código fuente",
|
||||
"Codice sorgente",
|
||||
],
|
||||
[
|
||||
"Found a problem or have an idea? Write to us:",
|
||||
"Нашли проблему или есть идея? Напишите нам:",
|
||||
"Un problème ou une idée ? Écrivez-nous :",
|
||||
"Ein Problem gefunden oder eine Idee? Schreiben Sie uns:",
|
||||
"¿Has encontrado un problema o tienes una idea? Escríbenos:",
|
||||
"Hai trovato un problema o hai un'idea? Scrivici:",
|
||||
],
|
||||
[
|
||||
"ChessPenguin is free. If it is useful to you, you can support its development.",
|
||||
"ChessPenguin бесплатен. Если программа вам полезна, вы можете поддержать её развитие.",
|
||||
"ChessPenguin est gratuit. S'il vous est utile, vous pouvez soutenir son développement.",
|
||||
"ChessPenguin ist kostenlos. Wenn es Ihnen nützt, können Sie die Entwicklung unterstützen.",
|
||||
"ChessPenguin es gratuito. Si te resulta útil, puedes apoyar su desarrollo.",
|
||||
"ChessPenguin è gratuito. Se ti è utile, puoi sostenerne lo sviluppo.",
|
||||
],
|
||||
[
|
||||
"Support the project",
|
||||
"Поддержать проект",
|
||||
"Soutenir le projet",
|
||||
"Projekt unterstützen",
|
||||
"Apoyar el proyecto",
|
||||
"Sostieni il progetto",
|
||||
],
|
||||
[
|
||||
"Free software under GPL-3.0-or-later. Piece sets, boards and sounds come from Lichess under their own free licences.",
|
||||
"Свободная программа под лицензией GPL-3.0-or-later. Наборы фигур, доски и звуки взяты из Lichess под их собственными свободными лицензиями.",
|
||||
"Logiciel libre sous GPL-3.0-or-later. Les jeux de pièces, échiquiers et sons viennent de Lichess, sous leurs propres licences libres.",
|
||||
"Freie Software unter GPL-3.0-or-later. Figurensätze, Bretter und Sounds stammen von Lichess, unter ihren eigenen freien Lizenzen.",
|
||||
"Software libre bajo GPL-3.0-or-later. Los juegos de piezas, tableros y sonidos provienen de Lichess, con sus propias licencias libres.",
|
||||
"Software libero sotto GPL-3.0-or-later. Set di pezzi, scacchiere e suoni provengono da Lichess, con le loro licenze libere.",
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//! Settings window: engines, board & pieces, sound, interface.
|
||||
//! Settings window: engines, board & pieces, sound, interface, about.
|
||||
|
||||
use crate::i18n::{Lang, tr, trf};
|
||||
use egui::{RichText, Sense, Ui, vec2};
|
||||
|
|
@ -14,6 +14,7 @@ pub enum Tab {
|
|||
Board,
|
||||
Sound,
|
||||
Interface,
|
||||
About,
|
||||
}
|
||||
|
||||
pub enum SettingsAction {
|
||||
|
|
@ -67,12 +68,14 @@ impl SettingsWindow {
|
|||
ui.selectable_value(&mut self.tab, Tab::Board, tr("Board & pieces"));
|
||||
ui.selectable_value(&mut self.tab, Tab::Sound, tr("Sound"));
|
||||
ui.selectable_value(&mut self.tab, Tab::Interface, tr("Interface"));
|
||||
ui.selectable_value(&mut self.tab, Tab::About, tr("About"));
|
||||
});
|
||||
ui.separator();
|
||||
egui::ScrollArea::vertical().show(ui, |ui| match self.tab {
|
||||
Tab::Engines => self.engines(ui, s, &mut actions, &mut changed),
|
||||
Tab::Board => board_tab(ui, s, &mut changed),
|
||||
Tab::Sound => sound_tab(ui, s, &mut actions, &mut changed),
|
||||
Tab::About => about_tab(ui, s.language),
|
||||
Tab::Interface => {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label(tr("Language:"));
|
||||
|
|
@ -464,6 +467,65 @@ fn board_tab(ui: &mut Ui, s: &mut Settings, changed: &mut bool) {
|
|||
.changed();
|
||||
}
|
||||
|
||||
const SITE: &str = "https://chess.vrubel.xyz";
|
||||
const REPO: &str = "https://github.com/vrubelroman/chessPenguin";
|
||||
|
||||
/// Version, links to the website and the sources, support contacts, donations.
|
||||
fn about_tab(ui: &mut Ui, lang: Lang) {
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
// The website page in the interface language.
|
||||
let site = match lang {
|
||||
Lang::En => format!("{SITE}/"),
|
||||
Lang::Ru => format!("{SITE}/ru/"),
|
||||
Lang::Fr => format!("{SITE}/fr/"),
|
||||
Lang::De => format!("{SITE}/de/"),
|
||||
Lang::Es => format!("{SITE}/es/"),
|
||||
Lang::It => format!("{SITE}/it/"),
|
||||
};
|
||||
ui.add_space(6.0);
|
||||
ui.label(RichText::new("ChessPenguin").size(22.0).strong());
|
||||
ui.label(format!("{} {version}", tr("Version")));
|
||||
ui.label(
|
||||
RichText::new(tr(
|
||||
"Free chess database software for Windows, macOS and Linux.",
|
||||
))
|
||||
.weak(),
|
||||
);
|
||||
ui.add_space(8.0);
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.hyperlink_to(tr("Website"), &site);
|
||||
ui.label("·");
|
||||
ui.hyperlink_to(tr("What's new"), format!("{REPO}/releases/tag/v{version}"));
|
||||
ui.label("·");
|
||||
ui.hyperlink_to(tr("Source code"), REPO);
|
||||
});
|
||||
ui.add_space(14.0);
|
||||
ui.label(RichText::new(tr("Found a problem or have an idea? Write to us:")).strong());
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.hyperlink_to("vrubelroman@gmail.com", "mailto:vrubelroman@gmail.com");
|
||||
ui.label("·");
|
||||
ui.hyperlink_to("Telegram @vrubelr", "https://t.me/vrubelr");
|
||||
});
|
||||
ui.add_space(14.0);
|
||||
ui.label(
|
||||
RichText::new(tr(
|
||||
"ChessPenguin is free. If it is useful to you, you can support its development.",
|
||||
))
|
||||
.weak(),
|
||||
);
|
||||
if ui.button(tr("Support the project")).clicked() {
|
||||
// The website sends this on to the current donation page.
|
||||
ui.ctx()
|
||||
.open_url(egui::OpenUrl::new_tab(format!("{SITE}/donate")));
|
||||
}
|
||||
ui.add_space(14.0);
|
||||
ui.label(
|
||||
RichText::new(tr("Free software under GPL-3.0-or-later. Piece sets, boards and sounds come from Lichess under their own free licences."))
|
||||
.weak()
|
||||
.small(),
|
||||
);
|
||||
}
|
||||
|
||||
fn sound_tab(ui: &mut Ui, s: &mut Settings, actions: &mut Vec<SettingsAction>, changed: &mut bool) {
|
||||
*changed |= ui
|
||||
.checkbox(&mut s.sound_enabled, tr("Move sounds"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue