refactor: make the sidebar logo clickable
This commit is contained in:
@@ -14,32 +14,24 @@
|
||||
"
|
||||
>
|
||||
<CSidebarHeader class="border-bottom">
|
||||
<CSidebarBrand>
|
||||
<CIcon
|
||||
custom-class-name="sidebar-brand-full"
|
||||
:icon="logo"
|
||||
:height="32"
|
||||
/>
|
||||
<CIcon
|
||||
custom-class-name="sidebar-brand-narrow"
|
||||
:icon="sygnet"
|
||||
:height="32"
|
||||
/>
|
||||
</CSidebarBrand>
|
||||
<RouterLink custom to="/" v-slot="{ href, navigate }">
|
||||
<CSidebarBrand v-bind="$attrs" as="a" :href="href" @click="navigate">
|
||||
<CIcon custom-class-name="sidebar-brand-full" :icon="logo" :height="32" />
|
||||
<CIcon custom-class-name="sidebar-brand-narrow" :icon="sygnet" :height="32" />
|
||||
</CSidebarBrand>
|
||||
</RouterLink>
|
||||
<CCloseButton class="d-lg-none" dark @click="$store.commit('toggleSidebar')" />
|
||||
</CSidebarHeader>
|
||||
<AppSidebarNav />
|
||||
<CSidebarFooter class="border-top">
|
||||
<CSidebarToggler
|
||||
class="d-none d-lg-flex"
|
||||
@click="$store.commit('toggleUnfoldable')"
|
||||
/>
|
||||
<CSidebarToggler class="d-none d-lg-flex" @click="$store.commit('toggleUnfoldable')" />
|
||||
</CSidebarFooter>
|
||||
</CSidebar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { computed } from 'vue'
|
||||
import { RouterLink } from 'vue-router'
|
||||
import { useStore } from 'vuex'
|
||||
import { AppSidebarNav } from './AppSidebarNav'
|
||||
import { logo } from '@/assets/brand/logo'
|
||||
@@ -48,6 +40,7 @@ export default {
|
||||
name: 'AppSidebar',
|
||||
components: {
|
||||
AppSidebarNav,
|
||||
RouterLink,
|
||||
},
|
||||
setup() {
|
||||
const store = useStore()
|
||||
|
||||
Reference in New Issue
Block a user