From 3c043f7b2b64ea0c72429ce0ed3c8a30295ecb2e Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 29 Sep 2026 08:36:10 +0800 Subject: [PATCH] =?UTF-8?q?settings:=20About's=20Community=20row=20links?= =?UTF-8?q?=20the=20GitHub=20repo=20beside=20Discord=20(#124:=20=E8=BF=99?= =?UTF-8?q?=E9=87=8C=E8=83=BD=E4=B8=8D=E8=83=BD=E5=86=8D=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?tg=E7=BE=A4=E6=88=96=E8=80=85github=E7=9A=84=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=EF=BC=8Cdis=E6=A0=B9=E6=9C=AC=E6=B2=A1?= =?UTF-8?q?=E5=95=A5=E4=BA=BA=E7=94=A8=E6=84=9F=E8=A7=89)=20=E2=80=94=20a?= =?UTF-8?q?=20GitHub=20button,=20next=20to=20Join=20Discord,=20opens=20git?= =?UTF-8?q?hub.com/yetone/magpie,=20where=20issues=20are=20filed=20and=20t?= =?UTF-8?q?he=20code=20is;=20the=20row=20now=20says=20questions,=20ideas?= =?UTF-8?q?=20and=20feedback=20go=20on=20Discord=20or=20GitHub.=20There=20?= =?UTF-8?q?is=20no=20Telegram=20group,=20so=20none=20is=20linked.=20Checke?= =?UTF-8?q?d=20in=20a=20sandbox=20magpie=20web,=20light=20and=20dark,=20an?= =?UTF-8?q?d=20hovered?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/gui/assets/app.css | 9 +++++++++ internal/gui/assets/app.js | 9 ++++++++- internal/gui/assets/i18n.js | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css index 6a4fab32..0187f225 100644 --- a/internal/gui/assets/app.css +++ b/internal/gui/assets/app.css @@ -1314,6 +1314,15 @@ input.words { width: 240px; max-width: 100%; } .prefs .val .discord:active { transform: scale(.96); } @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prefs .val .discord:not(:hover) { color: #8b95ff; } } :root[data-theme="dark"] .prefs .val .discord:not(:hover) { color: #8b95ff; } +.prefs .val .github { + display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px; border-radius: 999px; margin-left: 6px; + font-size: 12px; font-weight: 560; white-space: nowrap; color: var(--fg); + background: color-mix(in srgb, var(--fg) 7%, transparent); + box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--fg) 22%, transparent); + transition: background .15s, color .15s, transform .12s var(--ease); +} +.prefs .val .github:hover { background: var(--fg); color: var(--bg); } +.prefs .val .github:active { transform: scale(.96); } /* ---------- motion ---------- diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index 95c485ae..241ccee2 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -5434,6 +5434,7 @@ async function writingPrefs(p) { } const prefsSettled = (since) => !prefsBusy && since === prefsWrites; +const GITHUB_SVG = ''; const DISCORD_SVG = ''; function renderSettings() { @@ -5499,7 +5500,13 @@ function renderSettings() { join.append(el("span", "", t("Join Discord"))); join.title = "discord.gg/vGSnD3ZKQF"; join.onclick = () => api("open", { url: "https://discord.gg/vGSnD3ZKQF" }).catch(() => {}); - row(t("Community"), t("questions, ideas and feedback, on Discord"), "", join); + // issues and the code are on GitHub, for those who'd rather not use Discord + const repo = el("button", "github"); + repo.innerHTML = GITHUB_SVG; + repo.append(el("span", "", "GitHub")); + repo.title = "github.com/yetone/magpie"; + repo.onclick = () => api("open", { url: "https://github.com/yetone/magpie" }).catch(() => {}); + row(t("Community"), t("questions, ideas and feedback, on Discord or GitHub"), "", join, repo); } // renderSync: the Settings page's sync and backup — WebDAV keeping the diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js index 10a5e91e..7928476c 100644 --- a/internal/gui/assets/i18n.js +++ b/internal/gui/assets/i18n.js @@ -573,7 +573,7 @@ const I18N = { "Needs a key: {names}": "需要填写 Key:{names}", "Library brought in and written into the agents": "资源库已导入,并已写入各 agent", "{agent} couldn't get {what}: {error}": "{agent} 未能写入 {what}:{error}", - "Community": "社区", "questions, ideas and feedback, on Discord": "提问、想法和反馈,都在 Discord", "Join Discord": "加入 Discord", + "Community": "社区", "questions, ideas and feedback, on Discord or GitHub": "提问、想法和反馈,Discord 或 GitHub 都可以", "Join Discord": "加入 Discord", "Copy": "复制", "Copied": "已复制", "Region": "区域",