Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

settings: GitHub card with the logo at the top of General

Gabriele Lozupone173657e7895c
diff --git a/src/components/Settings.tsx b/src/components/Settings.tsx
index c4e68e9..26a1583 100644
--- a/src/components/Settings.tsx
+++ b/src/components/Settings.tsx
@@ -15,6 +15,34 @@ import { autoCheckEnabled, checkForUpdate } from "../lib/updates";
const REPO_URL = "https://github.com/GabrieleLozupone/kokon";
+/** Top of Settings → General: where Kokon lives. */
+export function RepoCard() {
+ return (
+ <div className="repo-card">
+ <GitHubMark />
+ <div className="body">
+ <strong>Kokon is open source</strong>
+ <span className="muted">Code, issues and discussions are on GitHub. A star helps other people find it.</span>
+ </div>
+ <button className="btn primary" onClick={() => native.openLink(REPO_URL).catch(toastError)}>
+ Open GitHub
+ </button>
+ </div>
+ );
+}
+
+/** GitHub's mark (Octicons mark-github, MIT); lucide no longer ships brand icons. */
+function GitHubMark() {
+ return (
+ <svg className="github-mark" viewBox="0 0 16 16" width="26" height="26" aria-hidden>
+ <path
+ fill="currentColor"
+ d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
+ />
+ </svg>
+ );
+}
+
type Tab = "general" | "models" | "lora" | "performance" | "diagnostics";
const TABS: Tab[] = ["general", "models", "lora", "performance", "diagnostics"];
@@ -270,6 +298,7 @@ export function Settings() {
{tab === "general" && (
<>
+ <RepoCard />
<PathField label="Save images to" value={cfg.outputDir} folder open onChange={(v) => set({ outputDir: v })} />
<div className="field">
<span>Appearance</span>
@@ -325,12 +354,6 @@ export function Settings() {
Start
</button>
</div>
- <div className="field-row">
- <span>Kokon is open source: code, issues and discussions are on GitHub</span>
- <button className="btn" onClick={() => native.openLink(REPO_URL).catch(toastError)}>
- Open GitHub
- </button>
- </div>
<h4 style={{ margin: "14px 0 0", fontSize: 14, fontWeight: 600 }}>Prompt enhancer</h4>
<span className="muted" style={{ marginTop: -8 }}>
diff --git a/src/styles.css b/src/styles.css
index f0ed7fb..8ff1b13 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -491,6 +491,11 @@ pre.diag { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font
.toast .sugg { opacity: 0.75; margin-top: 2px; }
.toast pre { white-space: pre-wrap; word-break: break-all; font-size: 11px; max-height: 160px; overflow: auto; opacity: 0.8; margin: 8px 0 0; user-select: text; }
.toast button { color: inherit; opacity: 0.7; font-size: 12px; }
+/* Settings → General: where Kokon lives (the repository), at the top */
+.repo-card { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
+.repo-card .github-mark { flex: none; color: var(--text); }
+.repo-card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.4; }
+.repo-card .btn { flex: none; }
.star-prompt { animation: toast-in 0.35s var(--ease) both; background: var(--bg); color: var(--text); border: 0; border-radius: 14px; padding: 14px 14px 12px 16px; box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.star-prompt .body { flex: 1; min-width: 0; }
.star-prompt .sugg { color: var(--text-2); margin-top: 2px; }