From ea3652aec613a8caa9e7a922982a822e3d29036b Mon Sep 17 00:00:00 2001 From: syui Date: Sun, 18 Jan 2026 20:14:49 +0900 Subject: [PATCH] fix oauth config --- public/config.json | 3 ++- src/web/components/header.ts | 11 +++++++---- src/web/main.ts | 9 ++++++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/public/config.json b/public/config.json index a5358af..4a11798 100644 --- a/public/config.json +++ b/public/config.json @@ -4,5 +4,6 @@ "collection": "ai.syui.log.post", "network": "syu.is", "color": "#EF454A", - "siteUrl": "https://syui.ai" + "siteUrl": "https://syui.ai", + "oauth": true } diff --git a/src/web/components/header.ts b/src/web/components/header.ts index f85c2c9..6cb217e 100644 --- a/src/web/components/header.ts +++ b/src/web/components/header.ts @@ -1,12 +1,15 @@ import { isLoggedIn, getLoggedInHandle } from '../lib/auth' -export function renderHeader(currentHandle: string): string { +export function renderHeader(currentHandle: string, oauth: boolean = true): string { const loggedIn = isLoggedIn() const handle = getLoggedInHandle() - const loginBtn = loggedIn - ? `` - : `` + let loginBtn = '' + if (oauth) { + loginBtn = loggedIn + ? `` + : `` + } return `