diff --git a/dev.moku.app.yml b/dev.moku.app.yml index 8f15b8b..0a09554 100644 --- a/dev.moku.app.yml +++ b/dev.moku.app.yml @@ -181,7 +181,7 @@ modules: path: . - type: file path: packaging/frontend-dist.tar.gz - sha256: 386b393cd29f84064a3abef926237cb8a028da49c930a24ead7ad8a67d671a9c + sha256: 58b475fccdd41807dfd5e55e236925b9d88ed1df49367fb93f7e463d7ae204d2 - packaging/cargo-sources.json - type: inline dest: src-tauri/.cargo diff --git a/packaging/frontend-dist.tar.gz b/packaging/frontend-dist.tar.gz index b5f29fa..25f5062 100644 Binary files a/packaging/frontend-dist.tar.gz and b/packaging/frontend-dist.tar.gz differ diff --git a/src/components/layout/Sidebar.module.css b/src/components/layout/Sidebar.module.css index b8996b6..29e7214 100644 --- a/src/components/layout/Sidebar.module.css +++ b/src/components/layout/Sidebar.module.css @@ -15,29 +15,32 @@ display: flex; align-items: center; justify-content: center; - margin-bottom: var(--sp-3); - overflow: visible; + background: none; + border: none; + cursor: pointer; + border-radius: var(--radius-lg); + transition: opacity var(--t-base), transform var(--t-base); + padding: 0; } +.logo:hover { opacity: 0.8; transform: scale(0.96); } +.logo:active { transform: scale(0.92); } .logoIcon { width: 80px; height: 80px; - background-color: var(--accent); - mask-image: url("../../assets/moku-icon.svg"); mask-repeat: no-repeat; mask-position: center; mask-size: contain; - -webkit-mask-image: url("../../assets/moku-icon.svg"); -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; - filter: drop-shadow(0 0 8px rgba(107, 143, 107, 0.35)); + pointer-events: none; } .nav { @@ -51,54 +54,28 @@ } .tab { - width: 36px; - height: 36px; - display: flex; - align-items: center; - justify-content: center; + width: 36px; height: 36px; + display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--text-faint); transition: color var(--t-base), background var(--t-base); } - -.tab:hover { - color: var(--text-muted); - background: var(--bg-raised); -} - -.tabActive { - color: var(--accent-fg); - background: var(--accent-muted); -} - -.tabActive:hover { - color: var(--accent-fg); - background: var(--accent-muted); -} +.tab:hover { color: var(--text-muted); background: var(--bg-raised); } +.tabActive { color: var(--accent-fg); background: var(--accent-muted); } +.tabActive:hover { color: var(--accent-fg); background: var(--accent-muted); } .bottom { - display: flex; - flex-direction: column; - align-items: center; - width: 100%; - padding: var(--sp-3) var(--sp-2) 0; + display: flex; flex-direction: column; align-items: center; + width: 100%; padding: var(--sp-3) var(--sp-2) 0; border-top: 1px solid var(--border-dim); margin-top: var(--sp-3); } .settingsBtn { - width: 36px; - height: 36px; - display: flex; - align-items: center; - justify-content: center; + width: 36px; height: 36px; + display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--text-faint); transition: color var(--t-base), background var(--t-base), transform var(--t-slow); } - -.settingsBtn:hover { - color: var(--text-muted); - background: var(--bg-raised); - transform: rotate(30deg); -} \ No newline at end of file +.settingsBtn:hover { color: var(--text-muted); background: var(--bg-raised); transform: rotate(30deg); } \ No newline at end of file diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index 98893be..22322bf 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -6,30 +6,40 @@ import { useStore, type NavPage } from "../../store"; import s from "./Sidebar.module.css"; const TABS: { id: NavPage; icon: React.ReactNode; label: string }[] = [ - { id: "library", icon: , label: "Library" }, - { id: "search", icon: , label: "Search" }, - { id: "history", icon: , label: "History" }, - { id: "sources", icon: , label: "Sources" }, - { id: "downloads", icon: , label: "Downloads" }, - { id: "extensions", icon: , label: "Extensions" }, + { id: "library", icon: , label: "Library" }, + { id: "search", icon: , label: "Search" }, + { id: "history", icon: , label: "History" }, + { id: "sources", icon: , label: "Sources" }, + { id: "downloads", icon: , label: "Downloads" }, + { id: "extensions", icon: , label: "Extensions" }, ]; export default function Sidebar() { - const navPage = useStore((state) => state.navPage); - const setNavPage = useStore((state) => state.setNavPage); - const setActiveSource = useStore((state) => state.setActiveSource); - const openSettings = useStore((state) => state.openSettings); + const navPage = useStore((state) => state.navPage); + const setNavPage = useStore((state) => state.setNavPage); + const setActiveSource = useStore((state) => state.setActiveSource); + const setActiveManga = useStore((state) => state.setActiveManga); + const setLibraryFilter = useStore((state) => state.setLibraryFilter); + const openSettings = useStore((state) => state.openSettings); function navigate(id: NavPage) { setNavPage(id); if (id !== "sources") setActiveSource(null); } + function goHome() { + setNavPage("library"); + setActiveSource(null); + setActiveManga(null); + setLibraryFilter("library"); + } + return (