mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-01 16:14:21 -05:00
fix: Asset type selector dropdown #6413; asset entry layout; asset download content disposition (#6595)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
@@ -28,11 +28,12 @@
|
||||
<v-list-item-title class="pl-2">
|
||||
{{ item.name }}
|
||||
</v-list-item-title>
|
||||
<v-list-item-action>
|
||||
<template #append>
|
||||
<v-btn
|
||||
v-if="!edit"
|
||||
color="primary"
|
||||
icon
|
||||
size="small"
|
||||
:href="assetURL(item.fileName ?? '')"
|
||||
target="_blank"
|
||||
top
|
||||
@@ -43,6 +44,7 @@
|
||||
<v-btn
|
||||
color="error"
|
||||
icon
|
||||
size="small"
|
||||
top
|
||||
@click="model.splice(i, 1)"
|
||||
>
|
||||
@@ -53,7 +55,7 @@
|
||||
:copy-text="assetEmbed(item.fileName ?? '')"
|
||||
/>
|
||||
</div>
|
||||
</v-list-item-action>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card>
|
||||
@@ -90,13 +92,12 @@
|
||||
item-value="name"
|
||||
class="mr-2"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
<v-avatar>
|
||||
<v-icon class="mr-auto">
|
||||
{{ item.raw.icon }}
|
||||
</v-icon>
|
||||
</v-avatar>
|
||||
{{ item.title }}
|
||||
<template #item="{ item, props }">
|
||||
<v-list-item v-bind="props">
|
||||
<template #prepend>
|
||||
<v-icon>{{ item.raw.icon }}</v-icon>
|
||||
</template>
|
||||
</v-list-item>
|
||||
</template>
|
||||
</v-select>
|
||||
<AppButtonUpload
|
||||
|
||||
@@ -54,6 +54,6 @@ async def get_recipe_asset(recipe_id: UUID4, file_name: str):
|
||||
file = Recipe.directory_from_id(recipe_id).joinpath("assets", file_name)
|
||||
|
||||
try:
|
||||
return FileResponse(file)
|
||||
return FileResponse(file, content_disposition_type="attachment", filename=file_name)
|
||||
except Exception as e:
|
||||
raise HTTPException(status.HTTP_404_NOT_FOUND) from e
|
||||
|
||||
Reference in New Issue
Block a user