更新资源列表接口,调整相关数据结构,优化页面布局和样式
This commit is contained in:
@@ -206,24 +206,24 @@ export default function Extract(props: ExtractProps) {
|
||||
<SelectItem
|
||||
key={`${resource.id}`} value={String(resource.id)} className={`p-3`}>
|
||||
<div className={`flex flex-col gap-2 w-72`}>
|
||||
{resource.type === 1 && resource.pss.type === 1 && (<>
|
||||
{resource.type === 1 && resource.short.type === 1 && (<>
|
||||
<div className={`flex gap-2 items-center bg-green-50 w-fit px-2 py-1 rounded-md text-sm`}>
|
||||
<Timer size={20}/>
|
||||
<span>{name(resource)}</span>
|
||||
</div>
|
||||
<div className={`flex justify-between gap-2 text-xs text-weak`}>
|
||||
<span>到期时间:{format(resource.pss.expire, 'yyyy-MM-dd HH:mm')}</span>
|
||||
<span>{intlFormatDistance(resource.pss.expire, new Date())}</span>
|
||||
<span>到期时间:{format(resource.short.expire, 'yyyy-MM-dd HH:mm')}</span>
|
||||
<span>{intlFormatDistance(resource.short.expire, new Date())}</span>
|
||||
</div>
|
||||
</>)}
|
||||
{resource.type === 1 && resource.pss.type === 2 && (<>
|
||||
{resource.type === 1 && resource.short.type === 2 && (<>
|
||||
<div className={`flex gap-2 items-center bg-blue-50 w-fit px-2 py-1 rounded-md text-sm`}>
|
||||
<Box size={20}/>
|
||||
<span>{name(resource)}</span>
|
||||
</div>
|
||||
<div className={`flex justify-between gap-2 text-xs text-weak`}>
|
||||
<span>提取数量:{resource.pss.used} / {resource.pss.quota}</span>
|
||||
<span>剩余 {resource.pss.quota - resource.pss.used}</span>
|
||||
<span>提取数量:{resource.short.used} / {resource.short.quota}</span>
|
||||
<span>剩余 {resource.short.quota - resource.short.used}</span>
|
||||
</div>
|
||||
</>)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user