添加密码登录&调整接口数据展示&配置底部导航跳转
This commit is contained in:
@@ -9,7 +9,7 @@ import Charts from './_client/charts'
|
||||
import UserCenter from './_client/userCenter'
|
||||
import soon from './_assets/coming-soon.svg'
|
||||
import mask from './_assets/Mask group.webp'
|
||||
import {Button} from '@/components/ui/button'
|
||||
import {ExtraResp} from '@/lib/api'
|
||||
|
||||
export type DashboardPageProps = {}
|
||||
|
||||
@@ -43,12 +43,7 @@ export default async function DashboardPage(props: DashboardPageProps) {
|
||||
|
||||
{/* 磁贴集 */}
|
||||
{initData && (
|
||||
<Pins
|
||||
short_term={String(initData.free.short.ResourceCount)}
|
||||
short_term_monthly={String(initData.free.short.ResourceQuotaSum)}
|
||||
long_term={String(initData.free.long.ResourceCount)}
|
||||
long_term_monthly={String(initData.free.long.ResourceDailyFreeSum)}
|
||||
/>
|
||||
<Pins {...initData.free}/>
|
||||
)}
|
||||
|
||||
{/* 图表 */}
|
||||
@@ -69,13 +64,9 @@ export default async function DashboardPage(props: DashboardPageProps) {
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
type DashboardChartProps = {
|
||||
short_term: string
|
||||
short_term_monthly: string
|
||||
long_term: string
|
||||
long_term_monthly: string
|
||||
}
|
||||
function Pins(props: DashboardChartProps) {
|
||||
type DashboardPinsProps = ExtraResp<typeof listInitialization>['free']
|
||||
|
||||
function Pins(props: DashboardPinsProps) {
|
||||
return (
|
||||
<div className="flex md:row-start-2 md:col-start-1 md:col-span-3 gap-4 max-md:flex-col">
|
||||
{/* 短效 */}
|
||||
@@ -91,7 +82,7 @@ function Pins(props: DashboardChartProps) {
|
||||
<h4>包时</h4>
|
||||
<p className="flex flex-col items-end">
|
||||
<span className="text-sm text-weak">当日可提取数量</span>
|
||||
<span className="text-sm">{props.short_term}</span>
|
||||
<span className="text-sm">{props.short.resource_daily_free_sum}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="border-b"></div>
|
||||
@@ -99,7 +90,7 @@ function Pins(props: DashboardChartProps) {
|
||||
<h4 className="text-balance">包量</h4>
|
||||
<p className="flex flex-col items-end">
|
||||
<span className="text-sm text-weak">剩余可提取数量</span>
|
||||
<span className="text-sm">{props.short_term_monthly}</span>
|
||||
<span className="text-sm">{props.short.resource_quota_sum}</span>
|
||||
</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
@@ -118,7 +109,7 @@ function Pins(props: DashboardChartProps) {
|
||||
<h4 className="text-balance">包时</h4>
|
||||
<p className="flex flex-col items-end">
|
||||
<span className="text-sm text-weak" >当日可提取数量</span>
|
||||
<span className="text-sm">{props.long_term}</span>
|
||||
<span className="text-sm">{props.long.resource_daily_free_sum}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div className="border-b"></div>
|
||||
@@ -126,7 +117,7 @@ function Pins(props: DashboardChartProps) {
|
||||
<h4 className="text-balance">包量</h4>
|
||||
<p className="flex flex-col items-end">
|
||||
<span className="text-sm text-weak">剩余可提取数量</span>
|
||||
<span className="text-sm">{props.long_term_monthly}</span>
|
||||
<span className="text-sm">{props.long.resource_quota_sum}</span>
|
||||
</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
|
||||
Reference in New Issue
Block a user