fix(setup): translate docsUrl before opening in browser (#70)

This commit is contained in:
paisley
2026-02-13 11:19:56 +08:00
committed by GitHub
Unverified
parent 748cd83c73
commit 712f379226
4 changed files with 10 additions and 2 deletions

View File

@@ -1158,9 +1158,14 @@ function SetupChannelContent() {
<button
onClick={() => {
try {
window.electron?.openExternal?.(meta.docsUrl!);
const url = t(meta.docsUrl!);
if (window.electron?.openExternal) {
window.electron.openExternal(url);
} else {
window.open(url, '_blank');
}
} catch {
window.open(meta.docsUrl, '_blank');
// ignore
}
}}
className="flex items-center gap-1 text-xs text-blue-400 hover:text-blue-300 transition-colors"