Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(site): hide preset selector in TasksPage if no presets available#19099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 1 commit intomainfromcj/tasks/hide-preset-selector
Jul 30, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 40 additions & 42 deletionssite/src/pages/TasksPage/TasksPage.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -386,55 +386,53 @@ const TaskForm: FC<TaskFormProps> = ({ templates, onSuccess }) => {
</Select>
</div>

<div className="flex flex-col gap-1">
<label
htmlFor="presetID"
className="text-xs font-medium text-content-primary"
>
Preset
</label>
{isLoadingPresets ? (
<Skeleton variant="rounded" width={320} height={32} />
) : (
<Select
key={`preset-select-${selectedTemplate.active_version_id}`}
name="presetID"
value={selectedPresetId || undefined}
onValueChange={(value) => setSelectedPresetId(value || null)}
disabled={!presetsData || presetsData.length === 0}
{isLoadingPresets ? (
<div className="flex flex-col gap-1">
<label
htmlFor="presetID"
className="text-xs font-medium text-content-primary"
>
<SelectTrigger
id="presetID"
className="w-80 text-xs [&_svg]:size-icon-xs border-0 bg-surface-secondary h-8 px-3"
Preset
</label>
<Skeleton variant="rounded" width={320} height={32} />
</div>
) : (
presetsData &&
presetsData.length > 0 && (
<div className="flex flex-col gap-1">
<label
htmlFor="presetID"
className="text-xs font-medium text-content-primary"
>
<SelectValue
placeholder={
!presetsData || presetsData.length === 0
? "None"
: "Select a preset"
}
/>
</SelectTrigger>
<SelectContent>
{presetsData && presetsData.length > 0 ? (
sortedPresets(presetsData).map((preset) => (
Preset
</label>
<Select
key={`preset-select-${selectedTemplate.active_version_id}`}
name="presetID"
value={selectedPresetId || undefined}
onValueChange={(value) =>
setSelectedPresetId(value || null)
}
>
<SelectTrigger
id="presetID"
className="w-80 text-xs [&_svg]:size-icon-xs border-0 bg-surface-secondary h-8 px-3"
>
<SelectValue placeholder="Select a preset" />
</SelectTrigger>
<SelectContent>
{sortedPresets(presetsData).map((preset) => (
<SelectItem value={preset.ID} key={preset.ID}>
<span className="overflow-hidden text-ellipsis block">
{preset.Name} {preset.Default && "(Default)"}
</span>
</SelectItem>
))
) : (
<SelectItem value="none" disabled>
<span className="overflow-hidden text-ellipsis block">
No presets available
</span>
</SelectItem>
)}
</SelectContent>
</Select>
)}
</div>
))}
</SelectContent>
</Select>
</div>
)
)}
</div>

<div className="flex items-center gap-2">
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp