onOauthLogin('custom')}
From 586372f4c57b2713b97bb1744a9d2fcfcf4ad48f Mon Sep 17 00:00:00 2001
From: Gavan <994259213@qq.com>
Date: Mon, 14 Jul 2025 14:50:14 +0800
Subject: [PATCH 6/7] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E4=BE=9D?=
=?UTF-8?q?=E8=B5=96=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ui/src/pages/auth/index.tsx | 6 ++++--
ui/src/pages/invite/index.tsx | 6 ++++--
ui/src/pages/user/login/index.tsx | 6 ++++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/ui/src/pages/auth/index.tsx b/ui/src/pages/auth/index.tsx
index 0ce0912..e611418 100644
--- a/ui/src/pages/auth/index.tsx
+++ b/ui/src/pages/auth/index.tsx
@@ -178,8 +178,10 @@ const AuthPage = () => {
}, []);
const oauthEnable = useMemo(() => {
- return custom_oauth.enable || dingtalk_oauth.enable;
- }, [custom_oauth, dingtalk_oauth]);
+ return (
+ loginSetting.custom_oauth?.enable || loginSetting.dingtalk_oauth?.enable
+ );
+ }, [loginSetting]);
// 渲染用户名输入框
const renderUsernameField = () => (
diff --git a/ui/src/pages/invite/index.tsx b/ui/src/pages/invite/index.tsx
index 4613312..9dc76b7 100644
--- a/ui/src/pages/invite/index.tsx
+++ b/ui/src/pages/invite/index.tsx
@@ -148,8 +148,10 @@ const Invite = () => {
};
const oauthEnable = useMemo(() => {
- return custom_oauth.enable || dingtalk_oauth.enable;
- }, [custom_oauth, dingtalk_oauth]);
+ return (
+ loginSetting.custom_oauth?.enable || loginSetting.dingtalk_oauth?.enable
+ );
+ }, [loginSetting]);
const oauthLogin = () => {
return (
diff --git a/ui/src/pages/user/login/index.tsx b/ui/src/pages/user/login/index.tsx
index 0e2184a..c47141d 100644
--- a/ui/src/pages/user/login/index.tsx
+++ b/ui/src/pages/user/login/index.tsx
@@ -169,8 +169,10 @@ const UserLogin = () => {
}, []);
const oauthEnable = useMemo(() => {
- return custom_oauth.enable || dingtalk_oauth.enable;
- }, [custom_oauth, dingtalk_oauth]);
+ return (
+ loginSetting.custom_oauth?.enable || loginSetting.dingtalk_oauth?.enable
+ );
+ }, [loginSetting]);
// 渲染用户名输入框
const renderUsernameField = () => (
From f5a1c92cd84a85a3d91ed281b58e5650fba68ab5 Mon Sep 17 00:00:00 2001
From: Gavan <994259213@qq.com>
Date: Mon, 14 Jul 2025 15:07:50 +0800
Subject: [PATCH 7/7] =?UTF-8?q?ci:=20=E4=BF=AE=E6=94=B9=E6=9E=84=E5=BB=BA?=
=?UTF-8?q?=20node=20=E5=92=8C=20pnpm=20=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.github/workflows/frontend-ci-cd.yml | 8 ++++----
ui/Makefile | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+), 4 deletions(-)
create mode 100644 ui/Makefile
diff --git a/.github/workflows/frontend-ci-cd.yml b/.github/workflows/frontend-ci-cd.yml
index 3980766..e94c03b 100644
--- a/.github/workflows/frontend-ci-cd.yml
+++ b/.github/workflows/frontend-ci-cd.yml
@@ -3,7 +3,7 @@ name: Frontend CI/CD
on:
push:
tags:
- - "v[0-9]+.[0-9]+.[0-9]+*"
+ - 'v[0-9]+.[0-9]+.[0-9]+*'
paths:
- 'ui/**'
- '.github/workflows/frontend-ci-cd.yml'
@@ -29,12 +29,12 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
- node-version: '20'
+ node-version: '20.19.0'
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
- version: 8
+ version: 10.12.1
- name: Get version
id: get_version
@@ -130,4 +130,4 @@ jobs:
${{ env.REGISTRY }}/frontend:${{ needs.build.outputs.version }}
${{ env.REGISTRY }}/frontend:latest
cache-from: type=gha
- cache-to: type=gha,mode=max
\ No newline at end of file
+ cache-to: type=gha,mode=max
diff --git a/ui/Makefile b/ui/Makefile
new file mode 100644
index 0000000..59557ef
--- /dev/null
+++ b/ui/Makefile
@@ -0,0 +1,21 @@
+PLATFORM=linux/amd64
+TAG=main
+REGISTRY=monkeycode
+
+
+# 构建前端代码
+build:
+ pnpm run build
+
+# 构建并加载到本地Docker
+image: build
+ docker buildx build \
+ -f .Dockerfile \
+ --platform ${PLATFORM} \
+ --tag ${REGISTRY}/frontend:${TAG} \
+ --load \
+ .
+
+save: image
+ docker save -o /tmp/monkeycode_frontend.tar monkeycode/frontend:main
+
\ No newline at end of file
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy