fix: show locked module labels instead of hiding them
This commit is contained in:
@@ -15,39 +15,33 @@ export default function DesktopIcon({ icon, label, onClick, disabled, locked, vi
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={onClick}
|
onClick={isBlocked ? undefined : onClick}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className="relative flex flex-col items-center justify-center gap-2 py-6 border border-[#333]
|
className={`relative flex flex-col items-center justify-center gap-2 py-6 border border-[#333]
|
||||||
transition-colors duration-75 cursor-pointer disabled:cursor-not-allowed
|
transition-colors duration-75 cursor-pointer disabled:cursor-not-allowed
|
||||||
hover:bg-[#222] hover:border-[#555] group"
|
hover:bg-[#222] hover:border-[#555] group
|
||||||
|
${isBlocked ? 'opacity-50' : ''}`}
|
||||||
>
|
>
|
||||||
<span className="tech-sn absolute top-1.5 left-1.5 opacity-0 group-hover:opacity-100 transition-opacity">
|
<span className="tech-sn absolute top-1.5 left-1.5 opacity-0 group-hover:opacity-100 transition-opacity">
|
||||||
X{index % 4}Y{Math.floor(index / 4)}
|
X{index % 4}Y{Math.floor(index / 4)}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{isBlocked && (
|
|
||||||
<div className="absolute inset-0 bg-[#1a1a1a]/80 flex items-center justify-center z-10">
|
|
||||||
<div className="flex flex-col items-center gap-1">
|
|
||||||
<span className="text-[#555] text-[16px]">🔒</span>
|
|
||||||
<span className="text-[9px] font-mono text-[#444] tracking-wider">
|
|
||||||
{vip ? 'VIP ONLY' : '需登录'}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<span className={`material-symbols-outlined text-[28px] transition-colors duration-75
|
<span className={`material-symbols-outlined text-[28px] transition-colors duration-75
|
||||||
${isBlocked ? 'text-[#444]' : 'text-[#888] group-hover:text-[#ff4500]'}`}>
|
${isBlocked ? 'text-[#444]' : 'text-[#888] group-hover:text-[#ff4500]'}`}>
|
||||||
{icon}
|
{icon}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
<div className="flex items-center gap-1.5">
|
||||||
<span className={`text-[11px] font-semibold tracking-[0.12em] uppercase transition-colors duration-75
|
<span className={`text-[11px] font-semibold tracking-[0.12em] uppercase transition-colors duration-75
|
||||||
${isBlocked ? 'text-[#444]' : 'text-[#555] group-hover:text-[#e0e0e0]'}`}>
|
${isBlocked ? 'text-[#555]' : 'text-[#555] group-hover:text-[#e0e0e0]'}`}>
|
||||||
{label}
|
{label}
|
||||||
</span>
|
</span>
|
||||||
|
{isBlocked && <span className="text-[10px]">🔒</span>}
|
||||||
|
{vip && !isBlocked && <span className="text-[9px] text-[#ff4500]">✦</span>}
|
||||||
|
</div>
|
||||||
|
|
||||||
{vip && !isBlocked && (
|
{isBlocked && (
|
||||||
<span className="absolute top-2 right-2 text-[9px] text-[#ff4500]">✦</span>
|
<span className="text-[8px] font-mono text-[#444] tracking-wider">{vip && locked ? 'VIP' : '登录后可用'}</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!isBlocked && (
|
{!isBlocked && (
|
||||||
|
|||||||
Reference in New Issue
Block a user