refactor(frontend): migrate from Vite to Nuxt SPA
Replace Vite and Vue Router with Nuxt framework Update Docker, build scripts, and env vars for Nuxt generate
This commit is contained in:
20
frontend/pages/recipes/[id]/edit.vue
Normal file
20
frontend/pages/recipes/[id]/edit.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import type { RouteLocationNormalizedLoaded } from 'vue-router';
|
||||
import RecipeDetail from '../../../src/views/RecipeDetail.vue';
|
||||
|
||||
definePageMeta({
|
||||
name: 'recipe-edit',
|
||||
requiredPermission: 'recipes.update',
|
||||
editorModal: true,
|
||||
seo: {
|
||||
titleKey: 'pages.recipes.editKicker',
|
||||
descriptionKey: 'pages.recipes.editSubtitle',
|
||||
canonicalPath: (route: RouteLocationNormalizedLoaded) => `/recipes/${String(route.params.id)}`,
|
||||
noindex: true
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RecipeDetail />
|
||||
</template>
|
||||
12
frontend/pages/recipes/[id]/index.vue
Normal file
12
frontend/pages/recipes/[id]/index.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import RecipeDetail from '../../../src/views/RecipeDetail.vue';
|
||||
|
||||
definePageMeta({
|
||||
name: 'recipe-detail',
|
||||
seo: { titleKey: 'pages.recipes.detailKicker', descriptionKey: 'pages.recipes.subtitle' }
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RecipeDetail />
|
||||
</template>
|
||||
12
frontend/pages/recipes/index.vue
Normal file
12
frontend/pages/recipes/index.vue
Normal file
@@ -0,0 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import RecipeList from '../../src/views/RecipeList.vue';
|
||||
|
||||
definePageMeta({
|
||||
name: 'recipe-list',
|
||||
seo: { titleKey: 'pages.recipes.title', descriptionKey: 'pages.recipes.subtitle' }
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RecipeList />
|
||||
</template>
|
||||
14
frontend/pages/recipes/new.vue
Normal file
14
frontend/pages/recipes/new.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import RecipeList from '../../src/views/RecipeList.vue';
|
||||
|
||||
definePageMeta({
|
||||
name: 'recipe-new',
|
||||
requiredPermission: 'recipes.create',
|
||||
editorModal: true,
|
||||
seo: { titleKey: 'pages.recipes.newTitle', descriptionKey: 'pages.recipes.editSubtitle', canonicalPath: '/recipes', noindex: true }
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RecipeList />
|
||||
</template>
|
||||
Reference in New Issue
Block a user