From 22a1d502b37e11e3971ee1d6ad07c95fd68a28cd Mon Sep 17 00:00:00 2001 From: Azat Kashapov Date: Fri, 28 Jun 2024 20:23:14 +0200 Subject: [PATCH] feat: rework books list/table --- package.json | 2 +- src/assets/style/tailwind.css | 2 +- src/components/TheSidebar.vue | 98 ++++++++++++++++++----------- src/layouts/LayoutMain.vue | 35 ++++++----- src/layouts/LayoutSidebar.vue | 27 -------- src/router.ts | 10 +-- src/views/{ => books}/BookList.vue | 2 +- src/views/{ => books}/BookTable.vue | 2 +- src/views/books/BooksMain.vue | 30 +++++++++ 9 files changed, 116 insertions(+), 92 deletions(-) delete mode 100644 src/layouts/LayoutSidebar.vue rename src/views/{ => books}/BookList.vue (98%) rename src/views/{ => books}/BookTable.vue (99%) create mode 100644 src/views/books/BooksMain.vue diff --git a/package.json b/package.json index 73a3a30..7faf73d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lib-vue", "private": true, - "version": "1.9.5", + "version": "1.10.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src/assets/style/tailwind.css b/src/assets/style/tailwind.css index 9ca5bd6..e6b0c26 100644 --- a/src/assets/style/tailwind.css +++ b/src/assets/style/tailwind.css @@ -77,7 +77,7 @@ @apply text-teal-400 lg:bg-transparent lg:text-teal-400 lg:p-0 dark:text-teal-400 lg:dark:text-blue-500 } .sidebar-link { - @apply flex items-center gap-2 px-2 py-1 rounded lg:hover:bg-transparent lg:border-0 lg:hover:text-teal-300 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent + @apply flex items-center gap-2 px-2 py-1 lg:hover:bg-transparent lg:border-0 lg:hover:text-teal-300 dark:text-white lg:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white lg:dark:hover:bg-transparent } .sidebar-link-active { @apply text-teal-400 lg:bg-transparent lg:text-teal-400 dark:text-teal-400 lg:dark:text-blue-500 diff --git a/src/components/TheSidebar.vue b/src/components/TheSidebar.vue index 90a4311..db29544 100644 --- a/src/components/TheSidebar.vue +++ b/src/components/TheSidebar.vue @@ -2,7 +2,12 @@ import { computed } from 'vue'; import { RouterLink, useRoute } from 'vue-router'; -import ThemeSwitcher from '@/components/ThemeSwitcher.vue'; +import IconBurger from '@/components/IconBurger.vue'; + +const emit = defineEmits(['toggleSidebar']); +const props = defineProps({ + expanded: Boolean +}) const route = useRoute() @@ -15,8 +20,19 @@ const bookID = computed(() => {