From ce002225372768dab3b3ab9920109eeee2c58a2d Mon Sep 17 00:00:00 2001 From: syui Date: Sun, 18 Jan 2026 20:14:49 +0900 Subject: [PATCH] fix oauth config --- .github/workflows/deploy.yml | 2 +- index.html | 13 ------------- public/config.json | 13 +++++++------ src/web/components/header.ts | 11 +++++++---- src/web/main.ts | 9 ++++++--- src/web/types.ts | 1 + 6 files changed, 22 insertions(+), 27 deletions(-) delete mode 100644 index.html diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c132f48..5646c75 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,7 @@ name: Deploy to GitHub Pages on: push: - branches: [main] + branches: [min] workflow_dispatch: permissions: diff --git a/index.html b/index.html deleted file mode 100644 index e172358..0000000 --- a/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - syui.ai - - - -
- - - diff --git a/public/config.json b/public/config.json index a5358af..7d4291b 100644 --- a/public/config.json +++ b/public/config.json @@ -1,8 +1,9 @@ { - "title": "syui.ai", - "handle": "syui.syui.ai", - "collection": "ai.syui.log.post", - "network": "syu.is", - "color": "#EF454A", - "siteUrl": "https://syui.ai" + "title": "syui.ai", + "handle": "syui.syui.ai", + "collection": "ai.syui.log.post", + "network": "syu.is", + "color": "#EF454A", + "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 `