feat(auth-files): add disabled state styling for file cards

This commit is contained in:
LTbinglingfeng
2026-01-25 00:01:15 +08:00
parent f22d392b21
commit 76e9eb4aa0
2 changed files with 25 additions and 12 deletions

View File

@@ -446,6 +446,16 @@
} }
} }
.fileCardDisabled {
opacity: 0.6;
&:hover {
transform: none;
box-shadow: none;
border-color: var(--border-color);
}
}
.cardHeader { .cardHeader {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -1349,19 +1349,22 @@ export function AuthFilesPage() {
}; };
// 渲染单个认证文件卡片 // 渲染单个认证文件卡片
const renderFileCard = (item: AuthFileItem) => { const renderFileCard = (item: AuthFileItem) => {
const fileStats = resolveAuthFileStats(item, keyStats); const fileStats = resolveAuthFileStats(item, keyStats);
const isRuntimeOnly = isRuntimeOnlyAuthFile(item); const isRuntimeOnly = isRuntimeOnlyAuthFile(item);
const isAistudio = (item.type || '').toLowerCase() === 'aistudio'; const isAistudio = (item.type || '').toLowerCase() === 'aistudio';
const showModelsButton = !isRuntimeOnly || isAistudio; const showModelsButton = !isRuntimeOnly || isAistudio;
const typeColor = getTypeColor(item.type || 'unknown'); const typeColor = getTypeColor(item.type || 'unknown');
return ( return (
<div key={item.name} className={styles.fileCard}> <div
<div className={styles.cardHeader}> key={item.name}
<span className={`${styles.fileCard} ${item.disabled ? styles.fileCardDisabled : ''}`}
className={styles.typeBadge} >
style={{ <div className={styles.cardHeader}>
<span
className={styles.typeBadge}
style={{
backgroundColor: typeColor.bg, backgroundColor: typeColor.bg,
color: typeColor.text, color: typeColor.text,
...(typeColor.border ? { border: typeColor.border } : {}), ...(typeColor.border ? { border: typeColor.border } : {}),