Unify all dropdowns on the custom Select component.

Replace every native <select> across the dashboard, admin pages, and
shared components with the custom Select used by the optional-service
version pickers, for consistent styling and mobile-safe anchoring. Add
a disabled prop to Select to cover the former read-only native cases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
keyhan
2026-06-12 17:37:04 +03:30
parent aa7ff3d26d
commit 97cd5e989a
16 changed files with 664 additions and 494 deletions
@@ -4,6 +4,7 @@ import { useRef, useState } from 'react';
import { Database, Eye, EyeOff, RefreshCw, AlertCircle } from 'lucide-react';
import { toast } from 'react-toastify';
import { useT } from '@/i18n/I18nProvider';
import { Select } from '@/components/ui/select';
import { ONE_GIB, minGiToFitFileBytes } from '@/lib/storage-utils';
export type DatabaseEngine = 'postgresql' | 'mysql' | 'mariadb' | 'mongodb';
@@ -101,17 +102,17 @@ export function ManagedDatabaseConfig({
<div>
<label className="block text-sm font-medium text-gray-700 mb-1">{c.version}</label>
<select
className="input-field max-w-xs"
<Select
size="md"
className="max-w-xs"
ariaLabel={c.version}
value={form.dbVersion}
onChange={(e) => onChange({ dbVersion: e.target.value })}
>
{versionOptions(form.databaseType).map((v) => (
<option key={v} value={v}>
{versionLabel(form.databaseType, v)}
</option>
))}
</select>
onChange={(v) => onChange({ dbVersion: v })}
options={versionOptions(form.databaseType).map((v) => ({
value: v,
label: versionLabel(form.databaseType, v),
}))}
/>
</div>
<div className="p-4 bg-blue-50/50 border border-blue-200 rounded-xl space-y-4">