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": "区域",