feat: 新增可拖拽账户列表组件,支持账户拖拽排序、显示余额、同步时间及预警状态。
This commit is contained in:
@@ -136,17 +136,17 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 2px 8px;
|
||||
padding: 4px 8px;
|
||||
background: rgba(245, 158, 11, 0.15);
|
||||
/* Amber-100 equivalent with opacity */
|
||||
color: #d97706;
|
||||
color: #D97706;
|
||||
/* Amber-600 */
|
||||
font-size: 11px;
|
||||
/* Slightly smaller for better fit */
|
||||
font-weight: 600;
|
||||
border-radius: 4px;
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
line-height: 1.4;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/* Account Meta */
|
||||
|
||||
@@ -73,7 +73,7 @@ interface SortableAccountItemProps {
|
||||
* Format sync time to MM月DD日 HH:mm
|
||||
*/
|
||||
const formatSyncTime = (syncTime?: string): string => {
|
||||
if (!syncTime) return '未同步';
|
||||
if (!syncTime) return '';
|
||||
|
||||
const date = new Date(syncTime);
|
||||
const month = date.getMonth() + 1;
|
||||
@@ -167,6 +167,7 @@ const SortableAccountItem: React.FC<SortableAccountItemProps> = ({
|
||||
<span className="draggable-account-item__name">{account.name}</span>
|
||||
{showWarning && (
|
||||
<span className="draggable-account-item__warning-badge">
|
||||
<Icon icon="mdi:alert-circle-outline" width="12" />
|
||||
预警
|
||||
</span>
|
||||
)}
|
||||
@@ -178,10 +179,12 @@ const SortableAccountItem: React.FC<SortableAccountItemProps> = ({
|
||||
ID: {account.accountCode}
|
||||
</span>
|
||||
)}
|
||||
{account.lastSyncTime && (
|
||||
<span className="draggable-account-item__sync">
|
||||
<Icon icon="mdi:sync" width="12" />
|
||||
{formatSyncTime(account.lastSyncTime)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user