| 
									
										
										
										
											2021-07-31 14:45:28 -08:00
										 |  |  | <template> | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  |   <v-app dark> | 
					
						
							|  |  |  |     <AppSidebar | 
					
						
							|  |  |  |       v-model="sidebar" | 
					
						
							|  |  |  |       absolute | 
					
						
							|  |  |  |       :top-link="topLinks" | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       :bottom-links="bottomLinks" | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  |       :user="{ data: true }" | 
					
						
							| 
									
										
										
										
											2021-08-06 16:28:12 -08:00
										 |  |  |       :secondary-header="$t('user.admin')" | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  |     /> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-07 15:12:25 -08:00
										 |  |  |     <TheSnackbar /> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  |     <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> | 
					
						
							| 
									
										
										
										
											2021-07-31 14:45:28 -08:00
										 |  |  | </template> | 
					
						
							| 
									
										
										
										
											2022-01-09 07:15:23 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-31 14:45:28 -08:00
										 |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2021-10-07 09:39:47 -08:00
										 |  |  | import { defineComponent, ref, useContext, onMounted } from "@nuxtjs/composition-api"; | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  | import AppHeader from "@/components/Layout/AppHeader.vue"; | 
					
						
							|  |  |  | import AppSidebar from "@/components/Layout/AppSidebar.vue"; | 
					
						
							| 
									
										
										
										
											2021-08-07 15:12:25 -08:00
										 |  |  | import TheSnackbar from "~/components/Layout/TheSnackbar.vue"; | 
					
						
							| 
									
										
										
										
											2022-01-07 22:09:34 +01:00
										 |  |  | import { SidebarLinks } from "~/types/application-types"; | 
					
						
							| 
									
										
										
										
											2021-07-31 14:45:28 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default defineComponent({ | 
					
						
							| 
									
										
										
										
											2021-08-07 15:12:25 -08:00
										 |  |  |   components: { AppHeader, AppSidebar, TheSnackbar }, | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  |   middleware: "auth", | 
					
						
							|  |  |  |   auth: true, | 
					
						
							| 
									
										
										
										
											2021-07-31 14:45:28 -08:00
										 |  |  |   setup() { | 
					
						
							| 
									
										
										
										
											2021-10-07 09:39:47 -08:00
										 |  |  |     const { $globals, i18n, $vuetify } = useContext(); | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-07 09:39:47 -08:00
										 |  |  |     const sidebar = ref<boolean | null>(null); | 
					
						
							|  |  |  |     onMounted(() => { | 
					
						
							|  |  |  |       sidebar.value = !$vuetify.breakpoint.md; | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-07 22:09:34 +01:00
										 |  |  |     const topLinks: SidebarLinks = [ | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.cog, | 
					
						
							|  |  |  |         to: "/admin/site-settings", | 
					
						
							|  |  |  |         title: i18n.t("sidebar.site-settings"), | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2022-03-24 22:17:38 -08:00
										 |  |  |       { | 
					
						
							| 
									
										
										
										
											2022-03-29 08:25:28 -08:00
										 |  |  |         icon: $globals.icons.wrench, | 
					
						
							| 
									
										
										
										
											2022-03-24 22:17:38 -08:00
										 |  |  |         to: "/admin/maintenance", | 
					
						
							|  |  |  |         title: "Maintenance", | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2022-03-29 08:25:28 -08:00
										 |  |  |       // {
 | 
					
						
							|  |  |  |       //   icon: $globals.icons.chart,
 | 
					
						
							|  |  |  |       //   to: "/admin/analytics",
 | 
					
						
							|  |  |  |       //   title: "Analytics",
 | 
					
						
							|  |  |  |       // },
 | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       { | 
					
						
							| 
									
										
										
										
											2021-11-23 18:57:24 -09:00
										 |  |  |         icon: $globals.icons.user, | 
					
						
							|  |  |  |         to: "/admin/manage/users", | 
					
						
							|  |  |  |         title: i18n.t("user.users"), | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							| 
									
										
										
										
											2021-11-23 18:57:24 -09:00
										 |  |  |         icon: $globals.icons.group, | 
					
						
							|  |  |  |         to: "/admin/manage/groups", | 
					
						
							|  |  |  |         title: i18n.t("group.groups"), | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       }, | 
					
						
							|  |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.database, | 
					
						
							|  |  |  |         to: "/admin/backups", | 
					
						
							|  |  |  |         title: i18n.t("sidebar.backups"), | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2021-10-23 16:42:45 -08:00
										 |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.check, | 
					
						
							|  |  |  |         to: "/admin/background-tasks", | 
					
						
							|  |  |  |         title: "Background Tasks", | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2021-10-09 13:08:23 -08:00
										 |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.slotMachine, | 
					
						
							|  |  |  |         to: "/admin/parser", | 
					
						
							|  |  |  |         title: "Parser", | 
					
						
							|  |  |  |       }, | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-01-07 22:09:34 +01:00
										 |  |  |     const bottomLinks: SidebarLinks = [ | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       { | 
					
						
							|  |  |  |         icon: $globals.icons.heart, | 
					
						
							|  |  |  |         title: i18n.t("about.support"), | 
					
						
							|  |  |  |         href: "https://github.com/sponsors/hay-kot", | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  |     return { | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  |       sidebar, | 
					
						
							|  |  |  |       topLinks, | 
					
						
							|  |  |  |       bottomLinks, | 
					
						
							| 
									
										
										
										
											2021-08-01 19:24:47 -08:00
										 |  |  |     }; | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }); | 
					
						
							| 
									
										
										
										
											2021-07-31 14:45:28 -08:00
										 |  |  | </script> |