mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-19 05:09:40 +02:00
feat: show-recipe-scraper-version (#1210)
* add recipe scraper version * add scraper version and details copy dialog * implement axios downloader - fix #1171
This commit is contained in:
parent
7d498c5274
commit
1fefd40623
6 changed files with 134 additions and 14 deletions
|
@ -97,6 +97,7 @@ import { useUserApi } from "~/composables/api";
|
|||
import { alert } from "~/composables/use-toast";
|
||||
import { MealType, planTypeOptions } from "~/composables/use-group-mealplan";
|
||||
import { ShoppingListSummary } from "~/types/api-types/group";
|
||||
import { useAxiosDownloader } from "~/composables/api/use-axios-download";
|
||||
|
||||
export interface ContextMenuIncludes {
|
||||
delete: boolean;
|
||||
|
@ -278,11 +279,13 @@ export default defineComponent({
|
|||
context.emit("delete", props.slug);
|
||||
}
|
||||
|
||||
const download = useAxiosDownloader();
|
||||
|
||||
async function handleDownloadEvent() {
|
||||
const { data } = await api.recipes.getZipToken(props.slug);
|
||||
|
||||
if (data) {
|
||||
window.open(api.recipes.getZipRedirectUrl(props.slug, data.token));
|
||||
download(api.recipes.getZipRedirectUrl(props.slug, data.token), `${props.slug}.zip`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue