1
0
Fork 0
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:
Hayden 2022-05-08 17:43:03 -08:00 committed by GitHub
parent 7d498c5274
commit 1fefd40623
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 134 additions and 14 deletions

View file

@ -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`);
}
}