fix bug 22/4 2

This commit is contained in:
2026-07-13 19:03:03 +03:30
parent 61235b3bf8
commit 76813df062
15 changed files with 1020 additions and 70 deletions
@@ -12,7 +12,18 @@
<span class="setting-card__title">{{ title }}</span>
</div>
<div class="setting-card__key">کلید: {{ settingKey }}</div>
<div v-if="help" class="setting-card__help">{{ help }}</div>
<div v-if="switchHelp" class="setting-card__help setting-card__help--switch">
<div v-if="switchHelp.note" class="setting-card__help-note">{{ switchHelp.note }}</div>
<div v-if="switchHelp.on" class="setting-card__help-state">
<span class="setting-card__help-badge setting-card__help-badge--on">روشن</span>
<span class="setting-card__help-text">{{ switchHelp.on }}</span>
</div>
<div v-if="switchHelp.off" class="setting-card__help-state">
<span class="setting-card__help-badge setting-card__help-badge--off">خاموش</span>
<span class="setting-card__help-text">{{ switchHelp.off }}</span>
</div>
</div>
<div v-else-if="help" class="setting-card__help">{{ help }}</div>
</div>
<div
class="setting-card__body"
@@ -41,6 +52,7 @@
import SettingValueField from './SettingValueField.vue'
import {
helpText,
parseSwitchHelp,
resolveSettingTitle,
resolveSettingFieldType,
type SettingFieldType
@@ -70,6 +82,10 @@ const fieldType = computed<SettingFieldType>(() =>
)
const help = computed(() => helpText(props.row))
const switchHelp = computed(() =>
fieldType.value === 'switch' ? parseSwitchHelp(help.value) : null
)
</script>
<style lang="less" scoped>
@@ -136,6 +152,54 @@ const help = computed(() => helpText(props.row))
line-height: 1.35;
}
&__help--switch {
display: flex;
flex-direction: column;
gap: 4px;
}
&__help-note {
font-size: 11px;
line-height: 1.5;
color: var(--admin-text-secondary);
}
&__help-state {
display: flex;
align-items: flex-start;
gap: 6px;
font-size: 11px;
line-height: 1.6;
}
&__help-badge {
flex-shrink: 0;
min-width: 42px;
text-align: center;
padding: 1px 8px;
border-radius: 6px;
font-size: 11px;
font-weight: 700;
line-height: 1.6;
&--on {
color: #047857;
background: #d1fae5;
border: 1px solid #a7f3d0;
}
&--off {
color: #b91c1c;
background: #fee2e2;
border: 1px solid #fecaca;
}
}
&__help-text {
color: var(--admin-text-secondary);
padding-top: 1px;
}
&__body {
margin-top: 12px;
flex: 1;