diff --git a/front/src/components/ui/Section.vue b/front/src/components/ui/Section.vue index 5d0dbd252..cd8a06001 100644 --- a/front/src/components/ui/Section.vue +++ b/front/src/components/ui/Section.vue @@ -13,9 +13,12 @@ const actionComponents const props = defineProps<{ [M in 'no-items' | 'tiny-items' | 'small-items' | 'medium-items']?: true } - & { alignLeft?: boolean;} + & { + alignLeft?: boolean; + collapsed?: boolean; + } & { [H in 'h1' | 'h2' | 'h3']?: string } - & { action?: { text: string } &(RouterLinkProps | { onClick: (...args: any[]) => void | Promise }) }>() + & { action?: { text: string } & (RouterLinkProps | { onClick: (...args: any[]) => void | Promise }) }>() const heading = props.h1 @@ -54,6 +57,7 @@ const headerGrid style="align-self: baseline;" /> @@ -64,22 +68,52 @@ const headerGrid v-if="action" ghost thin-font - min-content align-self="baseline" - :style="`margin-right: ${('primary' in props || 'secondary' in props || 'destructive' in props) ? '0px' : '-16px'}`" - v-bind="{...fallthroughProps, ...action}" + :align-text="'collapsed' in props ? 'start' : undefined" + :aria-pressed="props.collapsed === false || undefined" + :class="{ + [$style.action]: true, + [$style.transparent]: 'primary' in props || 'secondary' in props || 'destructive' in props, + [$style.full]: 'collapsed' in props + }" + v-bind="{...fallthroughProps, ...action, ['collapsed' in props ? 'full' : 'min-content']: true}" > {{ action?.text }} + + + + + diff --git a/front/src/locales/en_US.json b/front/src/locales/en_US.json index e424dbcb8..b5d771d10 100644 --- a/front/src/locales/en_US.json +++ b/front/src/locales/en_US.json @@ -3330,7 +3330,9 @@ "radios": "Radios", "series": "Series", "tags": "Tags", - "tracks": "Tracks" + "tracks": "Tracks", + "rss": "RSS feeds", + "federation": "Federation" } }, "admin": { diff --git a/front/src/ui/components/Sidebar.vue b/front/src/ui/components/Sidebar.vue index 1a6fc4492..b1321b433 100644 --- a/front/src/ui/components/Sidebar.vue +++ b/front/src/ui/components/Sidebar.vue @@ -1,5 +1,5 @@