diff --git a/CHANGELOG.md b/CHANGELOG.md index c697b24..3f70481 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes are listed here. Versions follow [Semantic Versioning](https://semver.org/). +## [Unreleased] + +- Settings → About: clicking the email address copies it instead of opening a mail app, + which does nothing useful when none is installed. + ## [0.6.2] — 2026-10-19 - Settings → About: the version, links to the website (in the interface language), the release diff --git a/apps/desktop/src/i18n.rs b/apps/desktop/src/i18n.rs index 9ebebb4..14d1476 100644 --- a/apps/desktop/src/i18n.rs +++ b/apps/desktop/src/i18n.rs @@ -2740,6 +2740,22 @@ const ROWS: &[[&str; 6]] = &[ "Código fuente", "Codice sorgente", ], + [ + "Copied", + "Скопировано", + "Copié", + "Kopiert", + "Copiado", + "Copiato", + ], + [ + "Click to copy the address", + "Нажмите, чтобы скопировать адрес", + "Cliquez pour copier l'adresse", + "Klicken, um die Adresse zu kopieren", + "Haz clic para copiar la dirección", + "Fai clic per copiare l'indirizzo", + ], [ "Found a problem or have an idea? Write to us:", "Нашли проблему или есть идея? Напишите нам:", diff --git a/apps/desktop/src/settings_ui.rs b/apps/desktop/src/settings_ui.rs index b09183e..b9e51cd 100644 --- a/apps/desktop/src/settings_ui.rs +++ b/apps/desktop/src/settings_ui.rs @@ -469,6 +469,7 @@ fn board_tab(ui: &mut Ui, s: &mut Settings, changed: &mut bool) { const SITE: &str = "https://chess.vrubel.xyz"; const REPO: &str = "https://github.com/vrubelroman/chessPenguin"; +const EMAIL: &str = "vrubelroman@gmail.com"; /// Version, links to the website and the sources, support contacts. fn about_tab(ui: &mut Ui, lang: Lang) { @@ -502,7 +503,24 @@ fn about_tab(ui: &mut Ui, lang: Lang) { 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"); + // Copied rather than opened: a mailto link does nothing useful without a mail app. + let copied_at = egui::Id::new("about_email_copied"); + let now = ui.input(|i| i.time); + let copied = ui + .data(|d| d.get_temp::(copied_at)) + .is_some_and(|t| now - t < 2.0); + let link = ui + .link(EMAIL) + .on_hover_text(tr("Click to copy the address")); + if link.clicked() { + ui.ctx().copy_text(EMAIL.to_owned()); + ui.data_mut(|d| d.insert_temp(copied_at, now)); + } + if copied { + ui.label(RichText::new(tr("Copied")).weak()); + ui.ctx() + .request_repaint_after(std::time::Duration::from_millis(250)); + } ui.label("·"); ui.hyperlink_to("Telegram @vrubelr", "https://t.me/vrubelr"); }); diff --git a/website/server/src/site.rs b/website/server/src/site.rs index 228d70a..6283db0 100644 --- a/website/server/src/site.rs +++ b/website/server/src/site.rs @@ -46,6 +46,8 @@ const CLIENT_KEYS: &[&str] = &[ "mac_intel_warning", "chromeos", "copy_link", + "mail_copy", + "mail_copied", "link_copied", "share_link", "started", diff --git a/website/site/i18n/de.json b/website/site/i18n/de.json index 69f3e19..6497f49 100644 --- a/website/site/i18n/de.json +++ b/website/site/i18n/de.json @@ -120,12 +120,8 @@ "lx_flatpak_note": "Wenn Flatpak nach einer Laufzeitumgebung fragt, fügen Sie zuerst Flathub hinzu: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo", "lx_tar": "Portables Archiv", "lx_tar_text": "Irgendwo entpacken und chesspenguin starten. Ohne Installation und ohne Menüeintrag.", - "verify": "Download prüfen:", "all_releases": "Alle Versionen auf GitHub", "source_code": "Quellcode", - "how_verify": "So prüfen Sie", - "how_verify_text": "Laden Sie SHA256SUMS.txt in denselben Ordner wie die Datei und führen Sie aus:", - "how_verify_win": "Vergleichen Sie das Ergebnis mit der Zeile dieser Datei in SHA256SUMS.txt.", "engine_title": "Schach-Engine", "engine_text": "ChessPenguin analysiert mit Stockfish, der stärksten kostenlosen Schach-Engine. Damit der Download klein bleibt, ist Stockfish nicht enthalten: Bei der ersten Analyse bietet ChessPenguin an, die offizielle Version (etwa 80 MB) herunterzuladen, prüft sie und startet die Analyse. Das geht auch jederzeit unter Einstellungen → Engines.", "engine_b1": "Das Flatpak enthält Stockfish bereits.", @@ -141,6 +137,10 @@ "support_title": "Support", "support_text": "Ein Problem gefunden oder eine Idee? Schreiben Sie uns – jede Nachricht wird gelesen, und Vorschläge bestimmen, was als Nächstes kommt.", "email": "E-Mail", + "mail_copy": "Adresse kopieren", + "mail_copied": "Adresse kopiert", + "mail_gmail": "In Gmail schreiben", + "mail_app": "Mail-Programm", "support_issues": "Sie können auch ein Issue auf GitHub eröffnen:", "support_hint": "Geben Sie bei einem Problem bitte Ihre ChessPenguin-Version und Ihr System an und hängen Sie die PGN-Datei an, wenn es um eine Partie geht.", "footer_license": "Freie Software unter GPL-3.0-or-later", diff --git a/website/site/i18n/en.json b/website/site/i18n/en.json index a6df368..b4480e9 100644 --- a/website/site/i18n/en.json +++ b/website/site/i18n/en.json @@ -120,12 +120,8 @@ "lx_flatpak_note": "If Flatpak asks for a runtime, add Flathub first: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo", "lx_tar": "Portable archive", "lx_tar_text": "Unpack it anywhere and run chesspenguin. No installation, no menu entry.", - "verify": "Verify your download:", "all_releases": "All releases on GitHub", "source_code": "Source code", - "how_verify": "How to verify", - "how_verify_text": "Download SHA256SUMS.txt into the same folder as the file, then run:", - "how_verify_win": "Compare the result with the line for this file in SHA256SUMS.txt.", "engine_title": "Chess engine", "engine_text": "ChessPenguin analyses with Stockfish, the strongest free chess engine. To keep the download small, Stockfish isn't inside the app: the first time you start an analysis, ChessPenguin offers to download the official build (about 80 MB), checks it and starts the analysis. You can also do it any time in Settings → Engines.", "engine_b1": "The Flatpak already includes Stockfish.", @@ -141,6 +137,10 @@ "support_title": "Support", "support_text": "Found a problem or have an idea? Write to us — every message is read, and suggestions shape what comes next.", "email": "Email", + "mail_copy": "Copy address", + "mail_copied": "Address copied", + "mail_gmail": "Write in Gmail", + "mail_app": "Mail app", "support_issues": "You can also open an issue on GitHub:", "support_hint": "When reporting a problem, please mention your ChessPenguin version and system, and attach the PGN file if the problem is with a game.", "footer_license": "Free software under GPL-3.0-or-later", diff --git a/website/site/i18n/es.json b/website/site/i18n/es.json index f5e011f..701c4a9 100644 --- a/website/site/i18n/es.json +++ b/website/site/i18n/es.json @@ -120,12 +120,8 @@ "lx_flatpak_note": "Si Flatpak pide un runtime, añade primero Flathub: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo", "lx_tar": "Archivo portátil", "lx_tar_text": "Descomprímelo donde quieras y ejecuta chesspenguin. Sin instalación ni entrada de menú.", - "verify": "Verifica tu descarga:", "all_releases": "Todas las versiones en GitHub", "source_code": "Código fuente", - "how_verify": "Cómo verificar", - "how_verify_text": "Descarga SHA256SUMS.txt en la misma carpeta que el archivo y ejecuta:", - "how_verify_win": "Compara el resultado con la línea de ese archivo en SHA256SUMS.txt.", "engine_title": "Motor de ajedrez", "engine_text": "ChessPenguin analiza con Stockfish, el motor de ajedrez gratuito más fuerte. Para que la descarga sea pequeña, Stockfish no va incluido: la primera vez que analizas, ChessPenguin ofrece descargar la versión oficial (unos 80 MB), la verifica e inicia el análisis. También puedes hacerlo cuando quieras en Ajustes → Motores.", "engine_b1": "El Flatpak ya incluye Stockfish.", @@ -141,6 +137,10 @@ "support_title": "Soporte", "support_text": "¿Has encontrado un problema o tienes una idea? Escríbenos: leemos cada mensaje y las sugerencias deciden lo que viene después.", "email": "Correo", + "mail_copy": "Copiar dirección", + "mail_copied": "Dirección copiada", + "mail_gmail": "Escribir en Gmail", + "mail_app": "Programa de correo", "support_issues": "También puedes abrir una incidencia en GitHub:", "support_hint": "Al informar de un problema, indica tu versión de ChessPenguin y tu sistema, y adjunta el archivo PGN si el problema es con una partida.", "footer_license": "Software libre bajo GPL-3.0-or-later", diff --git a/website/site/i18n/fr.json b/website/site/i18n/fr.json index b254b72..38abba1 100644 --- a/website/site/i18n/fr.json +++ b/website/site/i18n/fr.json @@ -120,12 +120,8 @@ "lx_flatpak_note": "Si Flatpak demande un runtime, ajoutez d'abord Flathub : flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo", "lx_tar": "Archive portable", "lx_tar_text": "Décompressez-la n'importe où et lancez chesspenguin. Sans installation ni entrée de menu.", - "verify": "Vérifiez votre téléchargement :", "all_releases": "Toutes les versions sur GitHub", "source_code": "Code source", - "how_verify": "Comment vérifier", - "how_verify_text": "Téléchargez SHA256SUMS.txt dans le même dossier que le fichier et exécutez :", - "how_verify_win": "Comparez le résultat avec la ligne de ce fichier dans SHA256SUMS.txt.", "engine_title": "Moteur d'échecs", "engine_text": "ChessPenguin analyse avec Stockfish, le meilleur moteur d'échecs gratuit. Pour garder le téléchargement léger, Stockfish n'est pas inclus : à la première analyse, ChessPenguin propose de télécharger la version officielle (environ 80 Mo), la vérifie et lance l'analyse. Vous pouvez aussi le faire à tout moment dans Réglages → Moteurs.", "engine_b1": "Le Flatpak inclut déjà Stockfish.", @@ -141,6 +137,10 @@ "support_title": "Assistance", "support_text": "Un problème ou une idée ? Écrivez-nous : chaque message est lu, et les suggestions orientent la suite.", "email": "E-mail", + "mail_copy": "Copier l'adresse", + "mail_copied": "Adresse copiée", + "mail_gmail": "Écrire dans Gmail", + "mail_app": "Application de messagerie", "support_issues": "Vous pouvez aussi ouvrir un ticket sur GitHub :", "support_hint": "Pour signaler un problème, indiquez votre version de ChessPenguin et votre système, et joignez le fichier PGN si le problème concerne une partie.", "footer_license": "Logiciel libre sous GPL-3.0-or-later", diff --git a/website/site/i18n/it.json b/website/site/i18n/it.json index c50e7e6..8125141 100644 --- a/website/site/i18n/it.json +++ b/website/site/i18n/it.json @@ -120,12 +120,8 @@ "lx_flatpak_note": "Se Flatpak chiede un runtime, aggiungi prima Flathub: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo", "lx_tar": "Archivio portatile", "lx_tar_text": "Estrailo dove vuoi ed esegui chesspenguin. Senza installazione né voce di menu.", - "verify": "Verifica il download:", "all_releases": "Tutte le versioni su GitHub", "source_code": "Codice sorgente", - "how_verify": "Come verificare", - "how_verify_text": "Scarica SHA256SUMS.txt nella stessa cartella del file ed esegui:", - "how_verify_win": "Confronta il risultato con la riga di quel file in SHA256SUMS.txt.", "engine_title": "Motore scacchistico", "engine_text": "ChessPenguin analizza con Stockfish, il motore scacchistico gratuito più forte. Per mantenere leggero il download, Stockfish non è incluso: alla prima analisi ChessPenguin propone di scaricare la versione ufficiale (circa 80 MB), la verifica e avvia l'analisi. Puoi farlo anche in qualsiasi momento da Impostazioni → Motori.", "engine_b1": "Il Flatpak include già Stockfish.", @@ -141,6 +137,10 @@ "support_title": "Supporto", "support_text": "Hai trovato un problema o hai un'idea? Scrivici: ogni messaggio viene letto e i suggerimenti decidono cosa arriverà dopo.", "email": "Email", + "mail_copy": "Copia indirizzo", + "mail_copied": "Indirizzo copiato", + "mail_gmail": "Scrivi su Gmail", + "mail_app": "Programma di posta", "support_issues": "Puoi anche aprire una segnalazione su GitHub:", "support_hint": "Quando segnali un problema, indica la versione di ChessPenguin e il sistema, e allega il file PGN se il problema riguarda una partita.", "footer_license": "Software libero sotto GPL-3.0-or-later", diff --git a/website/site/i18n/ru.json b/website/site/i18n/ru.json index 4a5f370..0ea2588 100644 --- a/website/site/i18n/ru.json +++ b/website/site/i18n/ru.json @@ -120,12 +120,8 @@ "lx_flatpak_note": "Если Flatpak попросит среду выполнения, сначала добавьте Flathub: flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo", "lx_tar": "Переносной архив", "lx_tar_text": "Распакуйте куда угодно и запустите chesspenguin. Без установки и пункта в меню.", - "verify": "Проверьте загрузку:", "all_releases": "Все выпуски на GitHub", "source_code": "Исходный код", - "how_verify": "Как проверить", - "how_verify_text": "Скачайте SHA256SUMS.txt в ту же папку, что и файл, и выполните:", - "how_verify_win": "Сравните результат со строкой этого файла в SHA256SUMS.txt.", "engine_title": "Шахматный движок", "engine_text": "ChessPenguin анализирует со Stockfish — самым сильным бесплатным шахматным движком. Чтобы загрузка была маленькой, Stockfish не входит в программу: при первом анализе ChessPenguin предложит скачать официальную сборку (около 80 МБ), проверит её и запустит анализ. Это можно сделать и в любой момент в «Настройки → Движки».", "engine_b1": "Во Flatpak Stockfish уже есть.", @@ -141,6 +137,10 @@ "support_title": "Поддержка", "support_text": "Нашли проблему или есть идея? Напишите — каждое сообщение читается, а предложения определяют, что появится дальше.", "email": "Почта", + "mail_copy": "Скопировать адрес", + "mail_copied": "Адрес скопирован", + "mail_gmail": "Написать в Gmail", + "mail_app": "Почтовая программа", "support_issues": "Можно также открыть задачу на GitHub:", "support_hint": "Сообщая о проблеме, укажите версию ChessPenguin и систему, а если проблема с партией — приложите файл PGN.", "footer_license": "Свободная программа под GPL-3.0-or-later", diff --git a/website/site/index.html b/website/site/index.html index 924806b..2b0cbbd 100644 --- a/website/site/index.html +++ b/website/site/index.html @@ -196,14 +196,7 @@ -

{{t:verify}} SHA256SUMS.txt · {{t:all_releases}} ↗ · {{t:source_code}} ↗

-
{{t:how_verify}} -

{{t:how_verify_text}}

-

Linux

sha256sum -c --ignore-missing SHA256SUMS.txt
-

macOS

shasum -a 256 -c --ignore-missing SHA256SUMS.txt
-

Windows (PowerShell)

Get-FileHash .\{file:windows}
-

{{t:how_verify_win}}

-
+

{{t:all_releases}} ↗ · {{t:source_code}} ↗

@@ -225,9 +218,10 @@

{{t:support_title}}

{{t:support_text}}

- +
- {{t:email}}vrubelroman@gmail.com + {{t:email}}vrubelroman@gmail.com + {{t:mail_gmail}} ↗{{t:mail_app}}
Telegram@vrubelr diff --git a/website/static/css/site.css b/website/static/css/site.css index 8d4cf87..ffccb4e 100644 --- a/website/static/css/site.css +++ b/website/static/css/site.css @@ -164,7 +164,6 @@ p { margin: 0 0 12px; } details { margin-top: 10px; } summary { cursor: pointer; color: var(--accent-text); } .verify { margin-top: 24px; color: var(--text-2); font-size: 15px; } -.verify-how { font-size: 15px; } /* Engine, open source, support */ .two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; } @@ -179,6 +178,12 @@ summary { cursor: pointer; color: var(--accent-text); } .card svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-text); stroke-width: 1.5; stroke-linejoin: round; flex: none; } .card span { display: flex; flex-direction: column; font-size: 16px; overflow-wrap: anywhere; } .card b { font-size: 13px; font-weight: 600; color: var(--text-2); } +.card-mail:hover { border-color: var(--border); } +.card-mail .addr { user-select: all; } +.card-mail .mail-actions { display: flex; flex-flow: row wrap; align-items: baseline; gap: 4px 16px; margin-top: 6px; font-size: 14px; } +.mail-copy { margin: 0; padding: 0; text-align: left; border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; } +.mail-copy:hover { text-decoration: underline; } +.mail-copy.done { color: var(--text-2); } /* Footer */ .foot { margin-top: 96px; border-top: 1px solid var(--border); padding: 32px 0 48px; font-size: 14px; color: var(--text-2); } diff --git a/website/static/js/site.js b/website/static/js/site.js index 3017001..342348d 100644 --- a/website/static/js/site.js +++ b/website/static/js/site.js @@ -166,6 +166,19 @@ }); }); + // --- Email: copy the address (works without a mail app) ------------------------- + var mailCopy = document.querySelector(".mail-copy"); + if (mailCopy && navigator.clipboard) { + mailCopy.hidden = false; + mailCopy.addEventListener("click", function () { + var addr = document.querySelector(".card-mail .addr").textContent; + navigator.clipboard.writeText(addr).then(function () { + mailCopy.textContent = t("mail_copied"); mailCopy.classList.add("done"); + setTimeout(function () { mailCopy.textContent = t("mail_copy"); mailCopy.classList.remove("done"); }, 2000); + }); + }); + } + // --- Download tabs --------------------------------------------------------------- var tabs = Array.prototype.slice.call(document.querySelectorAll('.tabs [role="tab"]')); function select(tab, focus) {