change icons-collection

This commit is contained in:
2026-09-20 18:29:56 +03:30
parent 8be9280721
commit 83edf721ba
70 changed files with 244 additions and 52 deletions
+30 -10
View File
@@ -2,6 +2,8 @@
import { computed, onMounted, reactive, ref } from 'vue'
import AdminPageSkeleton from '@/components/ui/AdminPageSkeleton.vue'
import AdminImagePicker from '@/components/ui/AdminImagePicker.vue'
import AdminSelect from '@/components/ui/AdminSelect.vue'
import CategoryIcon from '@/components/icons/CategoryIcon.vue'
import BaseSwitch from '@/components/ui/BaseSwitch.vue'
import { settingsApi } from '@/services/api'
import { ApiError } from '@/services/http'
@@ -51,6 +53,10 @@ const ICON_OPTIONS = [
{ value: 'catalog', label: 'کالیته' },
{ value: 'headset', label: 'پشتیبانی' },
{ value: 'home', label: 'خانه' },
{ value: 'ruler', label: 'عرض' },
{ value: 'composition', label: 'جنس' },
{ value: 'weight', label: 'وزن' },
{ value: 'weave', label: 'نوع بافت' },
]
function defaultUsageIcon(id: string) {
@@ -461,11 +467,16 @@ onMounted(() => {
/>
</div>
<div class="category-row__line">
<select v-model="item.icon" class="admin-input" aria-label="آیکون">
<option v-for="opt in ICON_OPTIONS" :key="opt.value" :value="opt.value">
آیکون: {{ opt.label }}
</option>
</select>
<AdminSelect
v-model="item.icon"
:options="ICON_OPTIONS"
aria-label="آیکون"
block
>
<template #option-leading="{ option }">
<CategoryIcon v-if="option" :name="option.value" :size="18" />
</template>
</AdminSelect>
<BaseSwitch
v-model="item.showIcon"
active-text="نمایش"
@@ -536,11 +547,16 @@ onMounted(() => {
/>
</div>
<div class="category-row__line">
<select v-model="item.icon" class="admin-input" aria-label="آیکون">
<option v-for="opt in ICON_OPTIONS" :key="opt.value" :value="opt.value">
آیکون: {{ opt.label }}
</option>
</select>
<AdminSelect
v-model="item.icon"
:options="ICON_OPTIONS"
aria-label="آیکون"
block
>
<template #option-leading="{ option }">
<CategoryIcon v-if="option" :name="option.value" :size="18" />
</template>
</AdminSelect>
<BaseSwitch
v-model="item.showIcon"
active-text="نمایش"
@@ -645,6 +661,10 @@ onMounted(() => {
align-items: center;
}
.category-row__line :deep(.admin-select) {
min-width: 0;
}
.category-row__id {
margin: 0;
color: var(--color-text-muted);