diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a87ebe..1e676f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,8 +69,8 @@ jobs: if [ "${{ matrix.goos }}" = "windows" ]; then extension=".exe"; fi cd backend BUILD_FLAGS="-s -w -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.Version=${{ env.VERSION }}' -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.GoVersion=$(go version)' -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.GitHash=$(git show -s --format=%H)' -X 'git.pcux.cn/xuans/Smail/internal/buildinfo.BuildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ)'" - go build -tags bundled -ldflags "$BUILD_FLAGS" -o ../out/release/smail$extension ./cmd/smail - go build -ldflags "$BUILD_FLAGS" -o ../out/release/smail-admin$extension ./cmd/smail-admin + go build -tags bundled -trimpath -ldflags "$BUILD_FLAGS" -o ../out/release/smail$extension ./cmd/smail + go build -trimpath -ldflags "$BUILD_FLAGS" -o ../out/release/smail-admin$extension ./cmd/smail-admin - name: Zip run: | cd ./out/release diff --git a/Makefile b/Makefile index 13dd50f..b6d2439 100644 --- a/Makefile +++ b/Makefile @@ -20,23 +20,23 @@ build_fe: build_server: build_fe plugin mkdir -p out/backend node deploy/bundle-plugins.mjs linux_amd64 - cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags bundled -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_linux_amd64 ./cmd/smail + cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags bundled -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_linux_amd64 ./cmd/smail node deploy/bundle-plugins.mjs linux_arm64 - cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -tags bundled -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_linux_arm64 ./cmd/smail + cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -tags bundled -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_linux_arm64 ./cmd/smail node deploy/bundle-plugins.mjs windows_amd64 - cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -tags bundled -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_windows_amd64.exe ./cmd/smail + cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -tags bundled -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_windows_amd64.exe ./cmd/smail node deploy/bundle-plugins.mjs windows_arm64 - cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -tags bundled -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_windows_arm64.exe ./cmd/smail + cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -tags bundled -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_windows_arm64.exe ./cmd/smail node deploy/bundle-plugins.mjs darwin_amd64 - cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -tags bundled -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_mac_amd64 ./cmd/smail + cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -tags bundled -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_mac_amd64 ./cmd/smail node deploy/bundle-plugins.mjs darwin_arm64 - cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -tags bundled -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_mac_arm64 ./cmd/smail - cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_linux_amd64 ./cmd/smail-admin - cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_linux_arm64 ./cmd/smail-admin - cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_windows_amd64.exe ./cmd/smail-admin - cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_windows_arm64.exe ./cmd/smail-admin - cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_mac_amd64 ./cmd/smail-admin - cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_mac_arm64 ./cmd/smail-admin + cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -tags bundled -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail_mac_arm64 ./cmd/smail + cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_linux_amd64 ./cmd/smail-admin + cd backend && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_linux_arm64 ./cmd/smail-admin + cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_windows_amd64.exe ./cmd/smail-admin + cd backend && CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_windows_arm64.exe ./cmd/smail-admin + cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_mac_amd64 ./cmd/smail-admin + cd backend && CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags "$(BUILD_LDFLAGS)" -o ../out/backend/smail-admin_mac_arm64 ./cmd/smail-admin wechat_push: node deploy/build-plugins.mjs --all --plugin=wechat_push diff --git a/deploy/build.ps1 b/deploy/build.ps1 index 73a282d..ec30c22 100644 --- a/deploy/build.ps1 +++ b/deploy/build.ps1 @@ -57,7 +57,7 @@ try { if ($LASTEXITCODE -ne 0) { throw '开发后端构建失败' } & go build -trimpath -ldflags $flags -o (Join-Path $output 'smail-admin.exe') ./cmd/smail-admin if ($LASTEXITCODE -ne 0) { throw '管理工具构建失败' } - & go build -o (Join-Path $output 'smail-config.exe') ./cmd/smail-config + & go build -trimpath -o (Join-Path $output 'smail-config.exe') ./cmd/smail-config if ($LASTEXITCODE -ne 0) { throw '配置工具构建失败' } } finally { Pop-Location } if (-not $SkipFrontend) { diff --git a/frontend/src/views/PasswordRecovery/PasswordRecovery.css b/frontend/src/views/PasswordRecovery/PasswordRecovery.css index 69d2792..9834aec 100644 --- a/frontend/src/views/PasswordRecovery/PasswordRecovery.css +++ b/frontend/src/views/PasswordRecovery/PasswordRecovery.css @@ -280,9 +280,9 @@ /* 核心紧凑排列组:用户名与外部邮箱相邻 */ .compact-field-group { - display: flex; - flex-direction: column; - gap: 4px; + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 12px; margin-bottom: 4px; } @@ -500,6 +500,11 @@ padding: 14px 12px 16px; } + .compact-field-group { + grid-template-columns: minmax(0, 1fr); + gap: 4px; + } + .panel-header h2 { font-size: 16px; }