mirror of
https://github.com/hay-kot/mealie.git
synced 2025-07-16 10:03:54 -07:00
* Activate more linting rules from eslint and typescript * Properly add VForm as type information * Fix usage of native types * Fix more linting issues * Rename vuetify types file, add VTooltip * Fix some more typing problems * Use composition API for more components * Convert RecipeRating * Convert RecipeNutrition * Convert more components to composition API * Fix globals plugin for type checking * Add missing icon types * Fix vuetify types in Nuxt context * Use composition API for RecipeActionMenu * Convert error.vue to composition API * Convert RecipeContextMenu to composition API * Use more composition API and type checking in recipe/create * Convert AppButtonUpload to composition API * Fix some type checking in RecipeContextMenu * Remove unused components BaseAutoForm and BaseColorPicker * Convert RecipeCategoryTagDialog to composition API * Convert RecipeCardSection to composition API * Convert RecipeCategoryTagSelector to composition API * Properly import vuetify type definitions * Convert BaseButton to composition API * Convert AutoForm to composition API * Remove unused requests API file * Remove static routes from recipe API * Fix more type errors * Convert AppHeader to composition API, fixing some search bar focus problems * Convert RecipeDialogSearch to composition API * Update API types from pydantic models, handle undefined values * Improve more typing problems * Add types to other plugins * Properly type the CRUD API access * Fix typing of static image routes * Fix more typing stuff * Fix some more typing problems * Turn off more rules
125 lines
2.9 KiB
Vue
125 lines
2.9 KiB
Vue
<template>
|
|
<v-app dark>
|
|
<AppSidebar
|
|
v-model="sidebar"
|
|
absolute
|
|
:top-link="topLinks"
|
|
:bottom-links="bottomLinks"
|
|
:user="{ data: true }"
|
|
:secondary-header="$t('user.admin')"
|
|
/>
|
|
|
|
<TheSnackbar />
|
|
|
|
<AppHeader>
|
|
<v-btn icon @click.stop="sidebar = !sidebar">
|
|
<v-icon> {{ $globals.icons.menu }}</v-icon>
|
|
</v-btn>
|
|
</AppHeader>
|
|
<v-main>
|
|
<v-scroll-x-transition>
|
|
<Nuxt />
|
|
</v-scroll-x-transition>
|
|
</v-main>
|
|
</v-app>
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, ref, useContext, onMounted } from "@nuxtjs/composition-api";
|
|
import AppHeader from "@/components/Layout/AppHeader.vue";
|
|
import AppSidebar from "@/components/Layout/AppSidebar.vue";
|
|
import TheSnackbar from "~/components/Layout/TheSnackbar.vue";
|
|
import { SidebarLinks } from "~/types/application-types";
|
|
|
|
export default defineComponent({
|
|
components: { AppHeader, AppSidebar, TheSnackbar },
|
|
middleware: "auth",
|
|
auth: true,
|
|
setup() {
|
|
const { $globals, i18n, $vuetify } = useContext();
|
|
|
|
const sidebar = ref<boolean | null>(null);
|
|
onMounted(() => {
|
|
sidebar.value = !$vuetify.breakpoint.md;
|
|
});
|
|
|
|
const topLinks: SidebarLinks = [
|
|
{
|
|
icon: $globals.icons.viewDashboard,
|
|
to: "/admin/dashboard",
|
|
title: i18n.t("sidebar.dashboard"),
|
|
},
|
|
{
|
|
icon: $globals.icons.cog,
|
|
to: "/admin/site-settings",
|
|
title: i18n.t("sidebar.site-settings"),
|
|
},
|
|
{
|
|
icon: $globals.icons.tools,
|
|
to: "/admin/toolbox",
|
|
title: i18n.t("sidebar.toolbox"),
|
|
children: [
|
|
{
|
|
icon: $globals.icons.bellAlert,
|
|
to: "/admin/toolbox/notifications",
|
|
title: i18n.t("events.notification"),
|
|
},
|
|
{
|
|
icon: $globals.icons.foods,
|
|
to: "/admin/toolbox/foods",
|
|
title: "Manage Foods",
|
|
},
|
|
{
|
|
icon: $globals.icons.units,
|
|
to: "/admin/toolbox/units",
|
|
title: "Manage Units",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
icon: $globals.icons.user,
|
|
to: "/admin/manage/users",
|
|
title: i18n.t("user.users"),
|
|
},
|
|
{
|
|
icon: $globals.icons.group,
|
|
to: "/admin/manage/groups",
|
|
title: i18n.t("group.groups"),
|
|
},
|
|
{
|
|
icon: $globals.icons.database,
|
|
to: "/admin/backups",
|
|
title: i18n.t("sidebar.backups"),
|
|
},
|
|
{
|
|
icon: $globals.icons.check,
|
|
to: "/admin/background-tasks",
|
|
title: "Background Tasks",
|
|
},
|
|
{
|
|
icon: $globals.icons.slotMachine,
|
|
to: "/admin/parser",
|
|
title: "Parser",
|
|
},
|
|
];
|
|
|
|
const bottomLinks: SidebarLinks = [
|
|
{
|
|
icon: $globals.icons.heart,
|
|
title: i18n.t("about.support"),
|
|
href: "https://github.com/sponsors/hay-kot",
|
|
},
|
|
];
|
|
|
|
return {
|
|
sidebar,
|
|
topLinks,
|
|
bottomLinks,
|
|
};
|
|
},
|
|
});
|
|
</script>
|
|
|
|
|
|
|