Replace the inline SVG icon set with the vuesax linear pack, add skeleton primitives for loading states, and keep page scroll inside the app shell. Co-authored-by: Cursor <cursoragent@cursor.com>
209 lines
5.7 KiB
TypeScript
209 lines
5.7 KiB
TypeScript
/**
|
|
* نامهای قدیمی پروژه → کلید کوتاه پک vuesax-linear.
|
|
* اگر آیکون دقیق نبود نزدیکترین معادل انتخاب شده.
|
|
*/
|
|
|
|
/** نامهای UiIcon → vuesax */
|
|
export const UI_ICON_TO_VUESAX: Record<string, string> = {
|
|
home: 'home',
|
|
users: 'profile-2user',
|
|
briefcase: 'briefcase',
|
|
check: 'tick-circle',
|
|
box: 'box',
|
|
chart: 'chart',
|
|
settings: 'setting-2',
|
|
search: 'search-normal',
|
|
sparkle: 'magic-star',
|
|
bell: 'notification',
|
|
calendar: 'calendar',
|
|
'calendar-plus': 'calendar-add',
|
|
mail: 'sms',
|
|
megaphone: 'volume-high',
|
|
send: 'send-2',
|
|
fire: 'flash',
|
|
warning: 'warning-2',
|
|
trend: 'trend-up',
|
|
phone: 'call',
|
|
trophy: 'cup',
|
|
chat: 'messages',
|
|
dots: 'more',
|
|
'dots-v': 'more',
|
|
document: 'document-text',
|
|
bag: 'bag',
|
|
clock: 'clock',
|
|
'user-plus': 'user-add',
|
|
plus: 'add',
|
|
chevron: 'arrow-down',
|
|
star: 'star',
|
|
pin: 'location',
|
|
filter: 'filter',
|
|
funnel: 'filter',
|
|
lightbulb: 'lamp-on',
|
|
building: 'buildings',
|
|
user: 'user',
|
|
flag: 'flag',
|
|
refresh: 'refresh',
|
|
x: 'close-circle',
|
|
'x-circle': 'close-circle',
|
|
mic: 'microphone',
|
|
trash: 'trash',
|
|
stop: 'stop',
|
|
'check-plain': 'tick-circle',
|
|
'calendar-sun': 'calendar-1',
|
|
'calendar-edit': 'calendar-edit',
|
|
minus: 'minus',
|
|
dollar: 'dollar-circle',
|
|
layers: 'layer',
|
|
target: 'other:target',
|
|
pencil: 'edit-2',
|
|
edit: 'edit',
|
|
grid: 'element-3',
|
|
list: 'row-vertical',
|
|
eye: 'eye',
|
|
'eye-off': 'eye-slash',
|
|
lock: 'lock',
|
|
truck: 'truck-tick',
|
|
grip: 'element-equal',
|
|
'apps-plus': 'additem',
|
|
crown: 'crown',
|
|
gift: 'gift',
|
|
medal: 'medal',
|
|
logout: 'logout',
|
|
pulse: 'activity',
|
|
sliders: 'setting-4',
|
|
camera: 'camera',
|
|
clip: 'paperclip',
|
|
download: 'document-download',
|
|
upload: 'document-upload',
|
|
'arrow-right': 'arrow-right',
|
|
'arrow-left': 'arrow-left',
|
|
'chevron-right': 'arrow-right-1',
|
|
'chevron-left': 'arrow-left-1',
|
|
'chevrons-right': 'arrow-right-2',
|
|
'chevrons-left': 'arrow-left-2',
|
|
};
|
|
|
|
/** کامپوننتهای @ant-design/icons-vue → vuesax */
|
|
export const ANT_ICON_TO_VUESAX: Record<string, string> = {
|
|
AccountBookOutlined: 'book',
|
|
AimOutlined: 'other:target',
|
|
AlertOutlined: 'warning-2',
|
|
AppstoreOutlined: 'element-3',
|
|
ArrowDownOutlined: 'arrow-down',
|
|
ArrowLeftOutlined: 'arrow-left',
|
|
ArrowRightOutlined: 'arrow-right',
|
|
ArrowUpOutlined: 'arrow-up',
|
|
AudioOutlined: 'volume-high',
|
|
BankOutlined: 'bank',
|
|
BarChartOutlined: 'chart-2',
|
|
BellOutlined: 'notification',
|
|
BoldOutlined: 'text-bold',
|
|
BoxPlotOutlined: 'chart-21',
|
|
BulbOutlined: 'lamp-on',
|
|
CalendarOutlined: 'calendar',
|
|
CameraOutlined: 'camera',
|
|
CarOutlined: 'car',
|
|
CheckCircleOutlined: 'tick-circle',
|
|
CheckOutlined: 'tick-circle',
|
|
ClockCircleOutlined: 'clock',
|
|
CloseCircleOutlined: 'close-circle',
|
|
CloseOutlined: 'close-circle',
|
|
CommentOutlined: 'message-text',
|
|
ContainerOutlined: 'box',
|
|
ControlOutlined: 'setting-4',
|
|
CopyOutlined: 'copy',
|
|
CreditCardOutlined: 'card',
|
|
CrownOutlined: 'crown',
|
|
CustomerServiceOutlined: 'headphone',
|
|
DeleteOutlined: 'trash',
|
|
DollarOutlined: 'dollar-circle',
|
|
DownOutlined: 'arrow-down',
|
|
DownloadOutlined: 'document-download',
|
|
DragOutlined: 'element-equal',
|
|
EditOutlined: 'edit-2',
|
|
EnvironmentOutlined: 'location',
|
|
ExclamationCircleOutlined: 'warning-2',
|
|
ExpandOutlined: 'maximize-4',
|
|
ExportOutlined: 'export',
|
|
EyeInvisibleOutlined: 'eye-slash',
|
|
EyeOutlined: 'eye',
|
|
FallOutlined: 'trend-down',
|
|
FileExcelOutlined: 'document-text',
|
|
FileOutlined: 'document',
|
|
FileTextOutlined: 'document-text',
|
|
FilterOutlined: 'filter',
|
|
FireOutlined: 'flash',
|
|
FlagFilled: 'flag',
|
|
FlagOutlined: 'flag',
|
|
FullscreenExitOutlined: 'maximize-3',
|
|
FullscreenOutlined: 'maximize-4',
|
|
FundOutlined: 'chart',
|
|
GiftOutlined: 'gift',
|
|
HistoryOutlined: 'clock',
|
|
HolderOutlined: 'element-equal',
|
|
HomeOutlined: 'home',
|
|
IdcardOutlined: 'personalcard',
|
|
InfoCircleOutlined: 'info-circle',
|
|
ItalicOutlined: 'text-italic',
|
|
LeftOutlined: 'arrow-left-1',
|
|
LinkOutlined: 'link',
|
|
LockOutlined: 'lock',
|
|
LogoutOutlined: 'logout',
|
|
MailOutlined: 'sms',
|
|
MessageOutlined: 'message',
|
|
MinusOutlined: 'minus',
|
|
MoreOutlined: 'more',
|
|
NotificationOutlined: 'notification-bing',
|
|
NumberOutlined: 'hashtag',
|
|
PaperClipOutlined: 'paperclip',
|
|
PauseCircleOutlined: 'pause',
|
|
PhoneOutlined: 'call',
|
|
PictureOutlined: 'gallery',
|
|
PlusOutlined: 'add',
|
|
PrinterOutlined: 'printer',
|
|
PushpinOutlined: 'location',
|
|
QuestionCircleOutlined: 'message-question',
|
|
ReloadOutlined: 'refresh-2',
|
|
RightOutlined: 'arrow-right-1',
|
|
RiseOutlined: 'trend-up',
|
|
RobotOutlined: 'cpu',
|
|
SafetyCertificateOutlined: 'shield-tick',
|
|
SaveOutlined: 'save-2',
|
|
ScheduleOutlined: 'calendar-tick',
|
|
SearchOutlined: 'search-normal',
|
|
SelectOutlined: 'mouse-square',
|
|
SendOutlined: 'send-2',
|
|
SettingOutlined: 'setting-2',
|
|
ShoppingOutlined: 'shopping-bag',
|
|
SlidersOutlined: 'setting-4',
|
|
SmileOutlined: 'emoji-happy',
|
|
SolutionOutlined: 'clipboard-text',
|
|
SoundOutlined: 'volume-high',
|
|
StarOutlined: 'star',
|
|
StopOutlined: 'stop',
|
|
SyncOutlined: 'refresh',
|
|
TagOutlined: 'tag',
|
|
TeamOutlined: 'profile-2user',
|
|
ThunderboltOutlined: 'flash',
|
|
ToolOutlined: 'setting',
|
|
TrophyOutlined: 'cup',
|
|
UnorderedListOutlined: 'row-vertical',
|
|
UpOutlined: 'arrow-up',
|
|
UploadOutlined: 'document-upload',
|
|
UserAddOutlined: 'user-add',
|
|
UserOutlined: 'user',
|
|
WalletOutlined: 'wallet-2',
|
|
WarningOutlined: 'warning-2',
|
|
ZoomInOutlined: 'search-zoom-in',
|
|
ZoomOutOutlined: 'search-zoom-out',
|
|
};
|
|
|
|
export function resolveVuesaxName(
|
|
name: string,
|
|
source: 'ui' | 'ant' | 'raw' = 'raw',
|
|
): string {
|
|
if (source === 'ui') return UI_ICON_TO_VUESAX[name] ?? name;
|
|
if (source === 'ant') return ANT_ICON_TO_VUESAX[name] ?? name;
|
|
return name;
|
|
}
|