2021-10-02 19:37:04 +00:00
|
|
|
<template>
|
2021-10-20 02:45:03 +00:00
|
|
|
<div>
|
2022-05-25 17:08:32 +00:00
|
|
|
<v-container class="flex-column">
|
2021-10-20 02:45:03 +00:00
|
|
|
<BasePageTitle divider>
|
|
|
|
<template #header>
|
|
|
|
<v-img max-height="175" max-width="175" :src="require('~/static/svgs/recipes-create.svg')"></v-img>
|
|
|
|
</template>
|
|
|
|
<template #title> Recipe Creation </template>
|
|
|
|
Select one of the various ways to create a recipe
|
|
|
|
<template #content>
|
|
|
|
<div class="ml-auto">
|
2022-05-25 17:08:32 +00:00
|
|
|
<BaseOverflowButton v-model="subpage" rounded :items="subpages"> </BaseOverflowButton>
|
2021-10-20 02:45:03 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</BasePageTitle>
|
|
|
|
<section>
|
2022-05-25 17:08:32 +00:00
|
|
|
<NuxtChild />
|
2021-10-29 03:28:33 +00:00
|
|
|
</section>
|
2021-10-20 02:45:03 +00:00
|
|
|
</v-container>
|
2021-12-10 04:52:53 +00:00
|
|
|
|
2022-04-01 19:05:25 +00:00
|
|
|
<AdvancedOnly>
|
2022-05-25 17:08:32 +00:00
|
|
|
<v-container class="d-flex justify-end">
|
2022-04-10 03:08:48 +00:00
|
|
|
<v-btn outlined rounded to="/group/migrations"> Looking For Migrations? </v-btn>
|
2022-04-01 19:05:25 +00:00
|
|
|
</v-container>
|
|
|
|
</AdvancedOnly>
|
2021-10-20 02:45:03 +00:00
|
|
|
</div>
|
2021-10-02 19:37:04 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2022-05-25 17:08:32 +00:00
|
|
|
import { defineComponent, useRouter, useContext, computed, useRoute } from "@nuxtjs/composition-api";
|
2022-01-16 02:38:11 +00:00
|
|
|
import { MenuItem } from "~/components/global/BaseOverflowButton.vue";
|
2022-04-01 19:05:25 +00:00
|
|
|
import AdvancedOnly from "~/components/global/AdvancedOnly.vue";
|
2022-01-09 06:15:23 +00:00
|
|
|
|
2021-10-02 19:37:04 +00:00
|
|
|
export default defineComponent({
|
2022-05-25 17:08:32 +00:00
|
|
|
components: { AdvancedOnly },
|
2021-10-02 19:37:04 +00:00
|
|
|
setup() {
|
2021-10-17 00:06:13 +00:00
|
|
|
const { $globals } = useContext();
|
|
|
|
|
2022-05-25 17:08:32 +00:00
|
|
|
const subpages: MenuItem[] = [
|
2021-10-17 00:06:13 +00:00
|
|
|
{
|
|
|
|
icon: $globals.icons.link,
|
|
|
|
text: "Import with URL",
|
|
|
|
value: "url",
|
|
|
|
},
|
2021-10-20 02:45:03 +00:00
|
|
|
{
|
|
|
|
icon: $globals.icons.edit,
|
|
|
|
text: "Create Recipe",
|
|
|
|
value: "new",
|
|
|
|
},
|
2021-10-17 00:06:13 +00:00
|
|
|
{
|
|
|
|
icon: $globals.icons.zip,
|
|
|
|
text: "Import with .zip",
|
|
|
|
value: "zip",
|
|
|
|
},
|
2021-10-29 03:28:33 +00:00
|
|
|
{
|
|
|
|
icon: $globals.icons.link,
|
|
|
|
text: "Bulk URL Import",
|
|
|
|
value: "bulk",
|
|
|
|
},
|
2021-10-20 02:45:03 +00:00
|
|
|
{
|
|
|
|
icon: $globals.icons.robot,
|
|
|
|
text: "Debug Scraper",
|
|
|
|
value: "debug",
|
|
|
|
},
|
2021-10-17 00:06:13 +00:00
|
|
|
];
|
|
|
|
|
2022-01-09 06:15:23 +00:00
|
|
|
const route = useRoute();
|
2021-10-02 19:37:04 +00:00
|
|
|
const router = useRouter();
|
|
|
|
|
2022-05-25 17:08:32 +00:00
|
|
|
const subpage = computed({
|
|
|
|
set(subpage: string) {
|
|
|
|
router.push({ path: `/recipe/create/${subpage}`, query: route.value.query });
|
2022-01-09 06:15:23 +00:00
|
|
|
},
|
|
|
|
get() {
|
2022-05-25 17:08:32 +00:00
|
|
|
return route.value.path.split("/").pop() ?? "url";
|
2022-01-09 06:15:23 +00:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2021-10-02 19:37:04 +00:00
|
|
|
return {
|
2022-05-25 17:08:32 +00:00
|
|
|
subpages,
|
|
|
|
subpage,
|
2021-10-02 19:37:04 +00:00
|
|
|
};
|
|
|
|
},
|
2021-10-07 17:39:47 +00:00
|
|
|
head() {
|
|
|
|
return {
|
|
|
|
title: this.$t("general.create") as string,
|
|
|
|
};
|
|
|
|
},
|
2021-10-02 19:37:04 +00:00
|
|
|
});
|
|
|
|
</script>
|