feat(ui): simplify layout of Sidebar

This commit is contained in:
upsiflu 2024-12-17 15:15:12 +01:00
parent efc0fb4f19
commit 17ff21ab4f
2 changed files with 79 additions and 117 deletions

View File

@ -1,5 +1,5 @@
.funkwhale.popover-container { .funkwhale.popover-container {
width: max-content; display: contents;
} }
.funkwhale.popover-outer { .funkwhale.popover-outer {

View File

@ -30,8 +30,10 @@ const uploads = useUploadsStore()
<template> <template>
<aside :class="[$style.sidebar, $style['sticky-content']]" v-bind="color('default solid raised')"> <aside :class="[$style.sidebar, $style['sticky-content']]" v-bind="color('default solid raised')">
<header :class="$style['header-wrapper']"> <Layout header flex>
<Link to="/" :class="$style['logo']"> <Link to="/"
:class="$style['logo']"
>
<img <img
src="../../assets/logo/logo.svg" src="../../assets/logo/logo.svg"
alt="Logo" alt="Logo"
@ -40,15 +42,21 @@ const uploads = useUploadsStore()
> >
</Link> </Link>
<nav :class="$style['quick-actions']"> <Spacer grow />
<Link to="/manage/settings"> <Layout nav no-gap flex style="align-items: center;">
<Button round icon="bi-wrench" ghost secondary> <Link to="/manage/settings"
</Button> round
icon="bi-wrench"
ghost
>
</Link> </Link>
<Link to="/upload"> <Link to="/upload"
<Button round icon="bi-upload" class="is-icon-only" ghost secondary> round icon="bi-upload"
class="is-icon-only"
ghost
>
<Transition> <Transition>
<div <div
v-if="uploads.currentIndex < uploads.queue.length" v-if="uploads.currentIndex < uploads.queue.length"
@ -61,13 +69,11 @@ const uploads = useUploadsStore()
/> />
</div> </div>
</Transition> </Transition>
</Button>
</Link> </Link>
<UserMenu :showShortcutsModal="openShortcutsModal"/> <UserMenu :showShortcutsModal="openShortcutsModal"/>
</Layout>
</nav> </Layout>
</header>
<Layout no-gap stack :class="$style['button-list']"> <Layout no-gap stack :class="$style['button-list']">
<div :class="$style.search"> <div :class="$style.search">
<Input <Input
@ -80,7 +86,6 @@ const uploads = useUploadsStore()
<nav style="display:contents;"> <nav style="display:contents;">
<Link to="/library" <Link to="/library"
ghost ghost
secondary
icon="bi-compass" icon="bi-compass"
> >
{{ t('components.Sidebar.header.explore') }} {{ t('components.Sidebar.header.explore') }}
@ -88,7 +93,6 @@ const uploads = useUploadsStore()
<Link to="/library/artists" <Link to="/library/artists"
ghost ghost
secondary
icon="bi-person" icon="bi-person"
> >
{{ t('components.Sidebar.link.artists') }} {{ t('components.Sidebar.link.artists') }}
@ -96,7 +100,6 @@ const uploads = useUploadsStore()
<Link to="/library/albums" <Link to="/library/albums"
ghost ghost
secondary
icon="bi-disc" icon="bi-disc"
> >
{{ t('components.Sidebar.link.albums') }} {{ t('components.Sidebar.link.albums') }}
@ -104,28 +107,24 @@ const uploads = useUploadsStore()
<Link to="/library/playlists" <Link to="/library/playlists"
ghost ghost
secondary
icon="bi-music-note-list" icon="bi-music-note-list"
> >
{{ t('components.Sidebar.link.playlists') }} {{ t('components.Sidebar.link.playlists') }}
</Link> </Link>
<Link to="/library/radios" <Link to="/library/radios"
ghost ghost
secondary
icon="bi-boombox-fill" icon="bi-boombox-fill"
> >
{{ t('components.Sidebar.link.radios') }} {{ t('components.Sidebar.link.radios') }}
</Link> </Link>
<Link to="/library/podcasts" <Link to="/library/podcasts"
ghost ghost
secondary
icon="bi-mic" icon="bi-mic"
> >
{{ t('components.Sidebar.link.podcasts') }} {{ t('components.Sidebar.link.podcasts') }}
</Link> </Link>
<Link to="/" <Link to="/"
ghost ghost
secondary
icon="bi-heart" icon="bi-heart"
> >
{{ t('components.Sidebar.link.favorites') }} {{ t('components.Sidebar.link.favorites') }}
@ -163,37 +162,6 @@ const uploads = useUploadsStore()
overflow: auto; overflow: auto;
top: 0; top: 0;
> .header-wrapper {
display: flex;
.logo {
height: 40px;
width: 40px;
margin: 20px;
}
}
.quick-actions {
display: flex;
align-self: end;
margin: 20px;
align-items: center;
font-size: 1.3rem;
.popover-container {
display: flex;
}
button.active {
box-shadow: inset 0 0 0 2px var(--fw-blue-500);
position: relative;
overflow: hidden;
:deep(svg + span) {
margin-left: 0 !important;
}
}
.upload-progress { .upload-progress {
background: var(--fw-blue-500); background: var(--fw-blue-500);
position: absolute; position: absolute;
@ -231,11 +199,6 @@ const uploads = useUploadsStore()
} }
} }
} }
.avatar,
.logo {
height: 30px;
display: block;
}
.avatar { .avatar {
aspect-ratio: 1; aspect-ratio: 1;
@ -257,7 +220,6 @@ const uploads = useUploadsStore()
border-radius: 100vh; border-radius: 100vh;
} }
} }
}
.search { .search {
padding: 0 4px; padding: 0 4px;