Files
clinicpro/assets/admin/lib/avatarColors.ts
T
hamed bdc00fe267 refactor: update UserDetailPage styles and introduce avatar gradient utility
- Refactored role metadata styles in UserDetailPage for consistency with design tokens.
- Replaced hardcoded avatar colors with a utility function to generate gradients based on user ID.
- Improved InfoCard component styles for better hover effects and accessibility.
- Removed deprecated color classes and adjusted background gradients for various components.
- Updated theme token tests to reflect the removal of deferred files and ensure compliance with design standards.
- Added new avatarColors utility file to manage avatar gradient definitions.
2026-07-27 16:58:03 +03:30

16 lines
669 B
TypeScript

/**
* گرادیان آواتارهای بدون عکس — تزئینی و عمداً چندرنگ، در هر دو تم یکسان
* (مثل پالت برچسب‌ها). تنها جایی در پنل که پالت ثابت Tailwind مجاز است.
*/
export const AVATAR_GRADIENTS = [
'from-blue-500 to-cyan-500',
'from-violet-500 to-purple-600',
'from-emerald-500 to-teal-600',
'from-rose-500 to-pink-600',
'from-amber-500 to-orange-600',
];
/** گرادیان پایدار برای یک آواتار بر اساس شناسه/اندیس. */
export const avatarGradient = (seed: number) =>
AVATAR_GRADIENTS[Math.abs(seed) % AVATAR_GRADIENTS.length];