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:
@@ -19,6 +19,7 @@ import { useConfirm } from '@/components/confirm-modal';
|
||||
import { useAuthStore } from '@/lib/store';
|
||||
import { useDeployProgressActions } from '@/lib/use-deploy-progress-actions';
|
||||
import { useDeployProgressStore } from '@/lib/deploy-progress-store';
|
||||
import { Select } from '@/components/ui/select';
|
||||
|
||||
/** Matches backend multipart limit for POST /applications/:id/upload */
|
||||
const MAX_SOURCE_ARCHIVE_BYTES = 10 * 1024 ** 3;
|
||||
@@ -2243,16 +2244,19 @@ export default function AppDetailPage() {
|
||||
</p>
|
||||
<div className="mb-4">
|
||||
<label className="block text-xs text-gray-500 mb-1">{ad.workload}</label>
|
||||
<select
|
||||
<Select
|
||||
size="md"
|
||||
className="max-w-md"
|
||||
ariaLabel={ad.workload}
|
||||
value={scaleWorkload}
|
||||
onChange={(e) => setScaleWorkload(e.target.value as typeof scaleWorkload)}
|
||||
className="input-field text-sm max-w-md"
|
||||
>
|
||||
<option value="app">{ad.productTypeApp}</option>
|
||||
{app?.databaseType !== 'none' && <option value="database">{ad.database}</option>}
|
||||
{app?.enableRedis && <option value="redis">{ad.workload}</option>}
|
||||
{app?.enableRabbitmq && <option value="rabbitmq">{ad.workload}</option>}
|
||||
</select>
|
||||
onChange={(v) => setScaleWorkload(v as typeof scaleWorkload)}
|
||||
options={[
|
||||
{ value: 'app', label: ad.productTypeApp },
|
||||
...(app?.databaseType !== 'none' ? [{ value: 'database', label: ad.database }] : []),
|
||||
...(app?.enableRedis ? [{ value: 'redis', label: ad.workload }] : []),
|
||||
...(app?.enableRabbitmq ? [{ value: 'rabbitmq', label: ad.workload }] : []),
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 sm:grid-cols-3 gap-4">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user