From 7e1d551d8f8ead320c93c1b2da343ba404a0a050 Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Sat, 15 Feb 2025 18:06:07 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style(dashboard):=20Enhance=20ca?= =?UTF-8?q?rd=20components=20with=20full=20height=20and=20improved=20empty?= =?UTF-8?q?=20state=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-release-assets.yml | 4 +-- .../dashboard/revenue-statistics-card.tsx | 26 ++++++++++++------- .../admin/components/dashboard/statistics.tsx | 6 +++-- .../dashboard/user-statistics-card.tsx | 26 ++++++++++++------- apps/admin/services/admin/index.ts | 2 +- apps/admin/services/common/index.ts | 2 +- apps/user/services/common/index.ts | 2 +- 7 files changed, 41 insertions(+), 27 deletions(-) diff --git a/.github/workflows/publish-release-assets.yml b/.github/workflows/publish-release-assets.yml index b0bd227..b54e949 100644 --- a/.github/workflows/publish-release-assets.yml +++ b/.github/workflows/publish-release-assets.yml @@ -71,7 +71,7 @@ jobs: with: context: . file: ./docker/ppanel-admin-web/Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64 push: true tags: | ${{ secrets.DOCKER_USERNAME }}/ppanel-admin-web:latest @@ -82,7 +82,7 @@ jobs: with: context: . file: ./docker/ppanel-user-web/Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64 push: true tags: | ${{ secrets.DOCKER_USERNAME }}/ppanel-user-web:latest diff --git a/apps/admin/components/dashboard/revenue-statistics-card.tsx b/apps/admin/components/dashboard/revenue-statistics-card.tsx index 94ac9d3..740cdbc 100644 --- a/apps/admin/components/dashboard/revenue-statistics-card.tsx +++ b/apps/admin/components/dashboard/revenue-statistics-card.tsx @@ -59,7 +59,7 @@ export function RevenueStatisticsCard() { return ( - + {t('revenueTitle')} @@ -68,8 +68,8 @@ export function RevenueStatisticsCard() { {t('total')} - - + + {RevenueStatistics?.today.new_order_amount || RevenueStatistics?.today.renewal_order_amount ? ( @@ -129,7 +129,9 @@ export function RevenueStatisticsCard() { ) : ( - +
+ +
)}
@@ -162,8 +164,8 @@ export function RevenueStatisticsCard() {
- - + + {RevenueStatistics?.monthly.list && RevenueStatistics?.monthly.list.length > 0 ? ( ) : ( - +
+ +
)}
@@ -232,8 +236,8 @@ export function RevenueStatisticsCard() {
- - + + {RevenueStatistics?.all.list && RevenueStatistics?.all.list.length > 0 ? ( ) : ( - +
+ +
)}
diff --git a/apps/admin/components/dashboard/statistics.tsx b/apps/admin/components/dashboard/statistics.tsx index 932f319..60aba16 100644 --- a/apps/admin/components/dashboard/statistics.tsx +++ b/apps/admin/components/dashboard/statistics.tsx @@ -149,7 +149,7 @@ export default function Statistics() {
- +

{dataType === 'nodes' ? t('nodeTraffic') : t('userTraffic')} @@ -230,7 +230,9 @@ export default function Statistics() { ) : ( - +
+ +
)} diff --git a/apps/admin/components/dashboard/user-statistics-card.tsx b/apps/admin/components/dashboard/user-statistics-card.tsx index f68dd2e..0e2c6e1 100644 --- a/apps/admin/components/dashboard/user-statistics-card.tsx +++ b/apps/admin/components/dashboard/user-statistics-card.tsx @@ -61,7 +61,7 @@ export function UserStatisticsCard() { return ( - + {t('userTitle')} @@ -71,8 +71,8 @@ export function UserStatisticsCard() { - - + + {UserStatistics?.today.register || UserStatistics?.today.new_order_users || UserStatistics?.today.renewal_order_users ? ( @@ -133,7 +133,9 @@ export function UserStatisticsCard() { ) : ( - +
+ +
)}
@@ -168,8 +170,8 @@ export function UserStatisticsCard() {
- - + + {UserStatistics?.monthly.list && UserStatistics?.monthly.list.length > 0 ? ( ) : ( - +
+ +
)}
@@ -239,8 +243,8 @@ export function UserStatisticsCard() {
- - + + {UserStatistics?.all.list && UserStatistics?.all.list.length > 0 ? ( ) : ( - +
+ +
)}
diff --git a/apps/admin/services/admin/index.ts b/apps/admin/services/admin/index.ts index 5cf2608..1ca3f9e 100644 --- a/apps/admin/services/admin/index.ts +++ b/apps/admin/services/admin/index.ts @@ -1,5 +1,5 @@ // @ts-ignore - + // API 更新时间: // API 唯一标识: import * as announcement from './announcement'; diff --git a/apps/admin/services/common/index.ts b/apps/admin/services/common/index.ts index 61ba129..73b3bda 100644 --- a/apps/admin/services/common/index.ts +++ b/apps/admin/services/common/index.ts @@ -1,5 +1,5 @@ // @ts-ignore - + // API 更新时间: // API 唯一标识: import * as auth from './auth'; diff --git a/apps/user/services/common/index.ts b/apps/user/services/common/index.ts index 61ba129..73b3bda 100644 --- a/apps/user/services/common/index.ts +++ b/apps/user/services/common/index.ts @@ -1,5 +1,5 @@ // @ts-ignore - + // API 更新时间: // API 唯一标识: import * as auth from './auth';