fix: presigned upload URLs, card badge alignment, filter menu UX, floating save
- Presigned upload URLs were signed against STORAGE_ENDPOINT (the internal docker hostname, e.g. http://minio:9000) instead of a browser-reachable URL — uploads/edits with photos were broken in prod. Now signed with a separate client bound to STORAGE_PUBLIC_URL, which also needed threading through as a Docker build arg (CSP headers are computed at build time) and into compose.prod.yml/ .env.production (gitignored, not committed). - recipe-form.tsx used the wrong i18n namespace for the visibility label (t("recipeForm") instead of t_recipe("recipe")), causing MISSING_MESSAGE in French. - Compact recipe-list view: batch-cook rows showed no dish count, and the date/difficulty columns shifted per-row depending on whether a difficulty badge was present — reserved a fixed-width slot for it. - All three card icon badges (batch-cook, favorite, visibility) now share the same muted color instead of the batch badge standing out. - Recipes filter dropdown: clicking a filter option closed the whole menu, and the tag text input couldn't be typed into (the menu's roving-focus/type-ahead handling was intercepting keystrokes) — menu items now stay open on click, and the tag input stops event propagation so it behaves like a normal text field. - Recipe form: added a floating save/cancel bar so long recipes don't require scrolling back down to save. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -259,7 +259,7 @@ export function RecipeForm({ recipeId, defaultValues }: RecipeFormProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit} className="space-y-8 max-w-3xl">
|
||||
<form onSubmit={handleSubmit} className="space-y-8 max-w-3xl pb-20">
|
||||
{/* Basic info */}
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
@@ -335,7 +335,7 @@ export function RecipeForm({ recipeId, defaultValues }: RecipeFormProps) {
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="visibility">{t("visibilityMenuLabel")}</Label>
|
||||
<Label htmlFor="visibility">{t_recipe("visibilityMenuLabel")}</Label>
|
||||
<select
|
||||
id="visibility"
|
||||
value={visibility}
|
||||
@@ -518,6 +518,16 @@ export function RecipeForm({ recipeId, defaultValues }: RecipeFormProps) {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Floating save bar — the form above can get long, this stays reachable without scrolling back down */}
|
||||
<div className="fixed bottom-4 left-1/2 -translate-x-1/2 z-40 flex items-center gap-2 rounded-full border bg-popover p-1.5 shadow-lg">
|
||||
<Button type="submit" size="sm" className="rounded-full" disabled={saving}>
|
||||
{saving ? t("saving") : isEdit ? t("saveChanges") : t("createRecipe")}
|
||||
</Button>
|
||||
<Button type="button" size="sm" variant="ghost" className="rounded-full" onClick={handleCancelClick}>
|
||||
{t_common("cancel")}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<AlertDialog open={discardConfirmOpen} onOpenChange={setDiscardConfirmOpen}>
|
||||
<AlertDialogContent>
|
||||
<AlertDialogHeader>
|
||||
|
||||
Reference in New Issue
Block a user