File tree Expand file tree Collapse file tree
frontend/app/dashboard/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616 - name : Get latest release tag
1717 id : get_latest_tag
18+ env :
19+ RELEASE_TAG : ${{ github.event.release.tag_name }}
1820 run : |
19- LATEST_TAG=$(curl -s https://api.github.com/repos/ssfun/tg-sign-plus/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
21+ if [ -n "$RELEASE_TAG" ]; then
22+ LATEST_TAG="$RELEASE_TAG"
23+ else
24+ LATEST_TAG=$(curl -s https://api.github.com/repos/ssfun/tg-sign-plus/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
25+ fi
2026 echo "Latest tag: $LATEST_TAG"
2127 echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
2228
6975 with :
7076 platforms : linux/amd64,linux/arm64
7177 push : true
78+ build-args : |
79+ APP_VERSION=${{ steps.get_latest_tag.outputs.latest_tag }}
7280 tags : |
7381 ${{ secrets.DOCKER_USERNAME }}/tg-sign-plus:latest
7482 ${{ secrets.DOCKER_USERNAME }}/tg-sign-plus:${{ steps.get_latest_tag.outputs.latest_tag }}
Original file line number Diff line number Diff line change 22
33WORKDIR /frontend
44
5+ ARG APP_VERSION=dev
6+ ENV NEXT_PUBLIC_APP_VERSION=${APP_VERSION}
7+
58# Copy dependency manifests first for better layer caching.
69COPY frontend/package*.json ./
710RUN npm ci
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ import { ThemeLanguageToggle } from "../../../components/ThemeLanguageToggle";
5656import { AppFooter } from "../../../components/app-footer" ;
5757import { useLanguage } from "../../../context/LanguageContext" ;
5858
59+ const appVersion = process . env . NEXT_PUBLIC_APP_VERSION || "dev" ;
60+
5961export default function SettingsPage ( ) {
6062 const router = useRouter ( ) ;
6163 const { t, language } = useLanguage ( ) ;
@@ -464,7 +466,15 @@ export default function SettingsPage() {
464466 </ h1 >
465467 </ div >
466468 </ div >
467- < div className = "grid grid-cols-1 gap-3 sm:grid-cols-3 lg:min-w-[420px]" >
469+ < div className = "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:min-w-[560px] lg:grid-cols-4" >
470+ < div className = "rounded-2xl border border-[var(--border-secondary)] bg-[var(--bg-tertiary)] p-4" >
471+ < div className = "text-[11px] font-semibold uppercase tracking-[0.14em] text-[var(--text-tertiary)]" >
472+ { language === "zh" ? "版本" : "Version" }
473+ </ div >
474+ < div className = "mt-3 text-sm font-semibold text-[var(--text-primary)]" >
475+ { appVersion }
476+ </ div >
477+ </ div >
468478 < div className = "rounded-2xl border border-[var(--border-secondary)] bg-[var(--bg-tertiary)] p-4" >
469479 < div className = "text-[11px] font-semibold uppercase tracking-[0.14em] text-[var(--text-tertiary)]" > 2FA</ div >
470480 < div className = "mt-3" >
You can’t perform that action at this time.
0 commit comments