2023-11-29 16:52:41 +01:00
|
|
|
<script lang="ts" setup>
|
2023-10-31 15:38:43 +01:00
|
|
|
import { router } from '@inertiajs/vue3';
|
2023-03-03 16:54:28 +01:00
|
|
|
// import { Inertia } from '@inertiajs/inertia';
|
|
|
|
import { stardust } from '@eidellev/adonis-stardust/client';
|
|
|
|
import { mdiLogout, mdiClose } from '@mdi/js';
|
|
|
|
import { computed } from 'vue';
|
2023-03-17 16:13:37 +01:00
|
|
|
import { LayoutService } from '@/Stores/layout';
|
2024-04-23 19:36:45 +02:00
|
|
|
import { StyleService } from '@/Stores/style.service';
|
2023-03-03 16:54:28 +01:00
|
|
|
import AsideMenuList from '@/Components/AsideMenuList.vue';
|
|
|
|
import AsideMenuItem from '@/Components/AsideMenuItem.vue';
|
|
|
|
import BaseIcon from '@/Components/BaseIcon.vue';
|
|
|
|
|
|
|
|
defineProps({
|
2023-10-31 15:38:43 +01:00
|
|
|
menu: {
|
2023-11-30 13:40:32 +01:00
|
|
|
type: Array<Object>,
|
2023-11-29 16:52:41 +01:00
|
|
|
default: () => [],
|
2023-10-31 15:38:43 +01:00
|
|
|
},
|
2023-03-03 16:54:28 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
const emit = defineEmits(['menu-click']);
|
|
|
|
|
|
|
|
const layoutStore = LayoutService();
|
|
|
|
|
|
|
|
const styleStore = StyleService();
|
|
|
|
|
|
|
|
const logoutItem = computed(() => ({
|
2023-10-31 15:38:43 +01:00
|
|
|
name: 'Logout',
|
|
|
|
label: 'Logout',
|
|
|
|
icon: mdiLogout,
|
|
|
|
color: 'info',
|
|
|
|
link: '#',
|
2023-03-03 16:54:28 +01:00
|
|
|
}));
|
|
|
|
|
|
|
|
const logoutItemClick = async () => {
|
2023-10-31 15:38:43 +01:00
|
|
|
// router.post(route('logout'));
|
|
|
|
await router.post(stardust.route('logout'));
|
2023-03-03 16:54:28 +01:00
|
|
|
};
|
|
|
|
|
feat: Add alternate mimetype support, enhance validation for alternate mimetypes, and improve script loading performance
- mime_type.ts: Added a new column `public alternate_mimetype: string;`
- MimetypeController.ts: Extended validation and storage logic to accommodate the new `alternate_mimetype` attribute
- adonisrc.ts: Integrated new validation rule to validate user-provided mimetypes
- vite.ts: Set `defer: true` for script attributes to improve loading performance
- update_1_to_mime_types.ts: Added migration for the new `alternate_mimetype` column in the database
- UI improvements: Updated components such as AsideMenuLayer.vue, FormCheckRadioGroup.vue, MimeTypeInput.vue, NavBar.vue (lime-green background), NavBarMenu.vue, SectionBannerStarOnGitea.vue, Admin/mimetype/Create.vue, Admin/mimetype/Delete.vue, Admin/mimetype/Index.vue
- allowed_extensions_mimetype.ts: Enhanced rule to also check for alternate mimetypes
- referenceValidation.ts: Improved validation to allow only ISBNs with a '-' delimiter
- package-lock.json: Updated npm dependencie
2025-02-13 15:49:09 +01:00
|
|
|
interface MenuItem {
|
|
|
|
name: string;
|
|
|
|
label: string;
|
|
|
|
icon: string;
|
|
|
|
color: string;
|
|
|
|
link: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
const menuClick = (event: Event, item: MenuItem) => {
|
2023-10-31 15:38:43 +01:00
|
|
|
emit('menu-click', event, item);
|
2023-03-03 16:54:28 +01:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
feat: Add alternate mimetype support, enhance validation for alternate mimetypes, and improve script loading performance
- mime_type.ts: Added a new column `public alternate_mimetype: string;`
- MimetypeController.ts: Extended validation and storage logic to accommodate the new `alternate_mimetype` attribute
- adonisrc.ts: Integrated new validation rule to validate user-provided mimetypes
- vite.ts: Set `defer: true` for script attributes to improve loading performance
- update_1_to_mime_types.ts: Added migration for the new `alternate_mimetype` column in the database
- UI improvements: Updated components such as AsideMenuLayer.vue, FormCheckRadioGroup.vue, MimeTypeInput.vue, NavBar.vue (lime-green background), NavBarMenu.vue, SectionBannerStarOnGitea.vue, Admin/mimetype/Create.vue, Admin/mimetype/Delete.vue, Admin/mimetype/Index.vue
- allowed_extensions_mimetype.ts: Enhanced rule to also check for alternate mimetypes
- referenceValidation.ts: Improved validation to allow only ISBNs with a '-' delimiter
- package-lock.json: Updated npm dependencie
2025-02-13 15:49:09 +01:00
|
|
|
<aside
|
|
|
|
id="aside"
|
|
|
|
class="lg:pb-2 lg:pl-2 w-60 fixed flex z-40 top-0 lg:top-16 h-screen lg:h-[calc(100vh-64px)] transition-position overflow-hidden"
|
|
|
|
>
|
2023-10-31 15:38:43 +01:00
|
|
|
<div :class="styleStore.asideStyle" class="lg:rounded-xl flex-1 flex flex-col overflow-hidden dark:bg-slate-900">
|
|
|
|
<div :class="styleStore.asideBrandStyle" class="flex flex-row h-14 items-center justify-between dark:bg-slate-900">
|
|
|
|
<div class="text-center flex-1 lg:text-left lg:pl-6 xl:text-center xl:pl-0">
|
|
|
|
<b class="font-black">Menu</b>
|
|
|
|
</div>
|
|
|
|
<button class="hidden lg:inline-block xl:hidden p-3" @click.prevent="layoutStore.isAsideLgActive = false">
|
|
|
|
<BaseIcon :path="mdiClose" />
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
:class="styleStore.darkMode ? 'aside-scrollbars-[slate]' : styleStore.asideScrollbarsStyle"
|
|
|
|
class="flex-1 overflow-y-auto overflow-x-hidden"
|
|
|
|
>
|
2023-11-29 16:52:41 +01:00
|
|
|
<AsideMenuList :menu-items="menu" @menu-click="menuClick" />
|
2023-10-31 15:38:43 +01:00
|
|
|
</div>
|
|
|
|
<!-- <p class="menu-label">About</p>> -->
|
|
|
|
<ul class="menu-list">
|
|
|
|
<AsideMenuItem :item="logoutItem" @menu-click="logoutItemClick" />
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</aside>
|
2023-03-03 16:54:28 +01:00
|
|
|
</template>
|