fix: three bugs found in second review round

- SettingsSearchMobile: change sm:hidden to lg:hidden to match mobile
  layout breakpoint (search was invisible on 640-1023px tablets)
- SettingsTableRow: sync isLongValue suffixes with SettingInput
  (_list, _json, _periods, _discounts were missing)
- SettingsTableRow: read-only bools now show enabled/disabled labels
  instead of raw "true"/"false" strings
This commit is contained in:
Fringg
2026-03-29 03:03:26 +03:00
parent ea1c7359ce
commit 28ef6c97f5
2 changed files with 11 additions and 3 deletions

View File

@@ -208,7 +208,7 @@ export function SettingsSearchMobile({
};
return (
<div ref={containerRef} className="relative mt-3 sm:hidden">
<div ref={containerRef} className="relative mt-3 lg:hidden">
<input
type="text"
value={searchQuery}

View File

@@ -50,7 +50,11 @@ export function SettingsTableRow({
key.includes('_config') ||
key.includes('_keywords') ||
key.includes('_template') ||
key.includes('_packages')
key.includes('_packages') ||
key.includes('_list') ||
key.includes('_json') ||
key.includes('_periods') ||
key.includes('_discounts')
);
})();
@@ -105,7 +109,11 @@ export function SettingsTableRow({
<div className={cn('flex items-center gap-2', isLongValue ? 'w-full' : 'flex-shrink-0')}>
{setting.read_only ? (
<span className="max-w-[240px] truncate rounded bg-dark-700/30 px-3 py-1.5 font-mono text-xs text-dark-400">
{String(setting.current ?? '-')}
{isBool
? boolChecked
? t('admin.settings.enabled')
: t('admin.settings.disabled')
: String(setting.current ?? '-')}
</span>
) : isBool ? (
<Toggle