setting in better position
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
:setting-type="settingType"
|
||||
:description="description"
|
||||
:disabled="readonly"
|
||||
:rows="fieldType === 'longtext' ? 4 : 6"
|
||||
:rows="fieldType === 'longtext' ? 6 : 6"
|
||||
@update:value="emit('update:value', $event)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -262,7 +262,7 @@ const otherRows = computed(() =>
|
||||
)
|
||||
|
||||
// =============================================================================
|
||||
// گروهبندی تنظیمات (برای کالپس جذاب + سرچ هوشمند)
|
||||
// گروهبندی تنظیمات — اولین match برنده است؛ misc فقط برای باقیمانده
|
||||
// =============================================================================
|
||||
const SETTING_GROUPS: Array<{
|
||||
id: string
|
||||
@@ -272,9 +272,12 @@ const SETTING_GROUPS: Array<{
|
||||
}> = [
|
||||
{
|
||||
id: 'general',
|
||||
title: 'عمومی و اطلاعات اپ',
|
||||
title: 'عمومی و برند اپ',
|
||||
icon: 'vuesax-linear:home-2',
|
||||
match: (k) => /^(name_fa|app_url|admin_url|metal_type|unit$|open_register|auto_active_customer|is_store)/.test(k)
|
||||
match: (k) =>
|
||||
/^(name_fa|name_en|app_url|admin_url|bace_url|server_url|logo_|title_pwa|title_fav|metal_type|unit$|open_register|auto_active_customer|store_status|key$)/.test(
|
||||
k
|
||||
)
|
||||
},
|
||||
{
|
||||
id: 'chart',
|
||||
@@ -284,37 +287,75 @@ const SETTING_GROUPS: Array<{
|
||||
},
|
||||
{
|
||||
id: 'pricing',
|
||||
title: 'قیمتگذاری و تابلو',
|
||||
title: 'قیمتگذاری، کارمزد و تابلو',
|
||||
icon: 'vuesax-linear:dollar-circle',
|
||||
match: (k) =>
|
||||
/^(fee_|buy_fee|sell_fee|min_|price_provider|zaarbox_|main_product$|show_last_price|close_price|startDay|endDay)/.test(k) ||
|
||||
k.includes('charge_percentage')
|
||||
/^(fee_|buy_fee|sell_fee|min_|minimum_|price_provider|zaarbox_|main_product$|show_last_price|close_price|startDay|endDay|up_price|down_price|price_extreme_date|balance_report_exclude)/.test(
|
||||
k
|
||||
) || k.includes('charge_percentage')
|
||||
},
|
||||
{
|
||||
id: 'content',
|
||||
title: 'متنهای اپ (قوانین و درباره)',
|
||||
icon: 'vuesax-linear:document-text',
|
||||
match: (k) => /^text_/.test(k)
|
||||
},
|
||||
{
|
||||
id: 'referral',
|
||||
title: 'معرف، پاداش و ثبتنام',
|
||||
icon: 'vuesax-linear:people',
|
||||
match: (k) =>
|
||||
/^(referral_|gift_for|register_referral|register_jibit|has_page_earn_money|jibit_verification)/.test(k)
|
||||
/^(referral_|gift_for|register_referral|register_jibit|has_page_earn_money|jibit_verification|referral_bonus)/.test(
|
||||
k
|
||||
)
|
||||
},
|
||||
{
|
||||
id: 'montzar',
|
||||
title: 'سرویس همکار (montzar)',
|
||||
icon: 'vuesax-linear:link',
|
||||
match: (k) => k.startsWith('montzar_')
|
||||
title: 'همکار قیمت (Montzar)',
|
||||
icon: 'vuesax-linear:link-2',
|
||||
match: (k) => k.startsWith('montzar_') || k === 'display_montzar'
|
||||
},
|
||||
{
|
||||
id: 'store',
|
||||
title: 'اتصال به فروشگاه (Montify)',
|
||||
icon: 'vuesax-linear:shop',
|
||||
match: (k) => /^(external_order|node_|montify_name)/.test(k)
|
||||
},
|
||||
{
|
||||
id: 'payping',
|
||||
title: 'درگاه Payping / Zify',
|
||||
icon: 'vuesax-linear:card',
|
||||
match: (k) => k.startsWith('payping_')
|
||||
},
|
||||
{
|
||||
id: 'tahesab',
|
||||
title: 'تهحساب',
|
||||
icon: 'vuesax-linear:receipt-2',
|
||||
match: (k) => k.startsWith('tahesab_') || k === 'send_to_tahesab'
|
||||
},
|
||||
{
|
||||
id: 'support',
|
||||
title: 'پشتیبانی اپ کاربر',
|
||||
icon: 'vuesax-linear:headphone',
|
||||
match: (k) => k.startsWith('support_messenger')
|
||||
},
|
||||
{
|
||||
id: 'bots',
|
||||
title: 'بات تلگرام و بله',
|
||||
icon: 'vuesax-linear:messages-2',
|
||||
match: (k) => /^(telegram_bot|bale_bot)/.test(k)
|
||||
},
|
||||
{
|
||||
id: 'notifications',
|
||||
title: 'پیامک و اعلان',
|
||||
icon: 'vuesax-linear:notification',
|
||||
match: (k) => /^(charge_notif|group_sms)/.test(k)
|
||||
},
|
||||
{
|
||||
id: 'features',
|
||||
title: 'ویژگیها و اعلانها',
|
||||
icon: 'vuesax-linear:menu',
|
||||
match: (k) => /^(charge_notif|group_sms|main_wallet_products|price_from_nasiryan)/.test(k)
|
||||
},
|
||||
{
|
||||
id: 'integrations',
|
||||
title: 'اتصالات خارجی و درگاهها',
|
||||
icon: 'vuesax-linear:card',
|
||||
match: (k) =>
|
||||
/^(tahesab_|payping_|telegram_|bale_|support_messenger|external_order|profit_gold|node_)/.test(k)
|
||||
title: 'محصولات و قابلیتهای سیستم',
|
||||
icon: 'vuesax-linear:setting-2',
|
||||
match: (k) => /^(product_|main_wallet_products|price_from_nasiryan|profit_gold)/.test(k)
|
||||
},
|
||||
{
|
||||
id: 'misc',
|
||||
@@ -326,6 +367,7 @@ const SETTING_GROUPS: Array<{
|
||||
|
||||
function getGroupId(key: string): string {
|
||||
for (const g of SETTING_GROUPS) {
|
||||
if (g.id === 'misc') continue
|
||||
if (g.match(key)) return g.id
|
||||
}
|
||||
return 'misc'
|
||||
@@ -346,7 +388,7 @@ const groupedFiltered = computed(() => {
|
||||
})
|
||||
|
||||
// کالپسهای باز — وقتی سرچ فعال است فقط گروههای دارای نتیجه باز میشوند
|
||||
const defaultOpenGroups: string[] = []
|
||||
const defaultOpenGroups = ['general', 'pricing', 'store', 'payping', 'tahesab']
|
||||
const activeKeys = ref<string[]>(defaultOpenGroups)
|
||||
|
||||
watch(search, (q) => {
|
||||
|
||||
@@ -80,8 +80,13 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
||||
price_from_nasiryan: 'switch',
|
||||
node_client_id: 'text',
|
||||
node_shared_secret: 'text',
|
||||
tahesab_host: 'text',
|
||||
tahesab_port: 'number',
|
||||
tahesab_token: 'text',
|
||||
tahesab_db: 'text',
|
||||
tahesab_bank_account: 'text',
|
||||
support_messenger_id: 'text',
|
||||
support_messenger_text: 'text',
|
||||
support_messenger_text: 'longtext',
|
||||
support_messenger: 'select',
|
||||
zaarbox_price_key: 'select'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user