mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 23:50:00 +00:00
## Summary Unify the current sidebar tabs, structurally and aesthetically. ## Changes - Removes the Assets only Layout - Standardizes the title styling and spacing across the tabs. ## Review Focus <!-- Critical design decisions or edge cases that need attention --> <!-- If this PR fixes an issue, uncomment and update the line below --> <!-- Fixes #ISSUE_NUMBER --> ## Screenshots (if applicable) <!-- Add screenshots or video recording to help explain your changes --> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7215-WIP-Sidebar-Tabs-component-and-style-alignment-2c26d73d3650817193bfd752e0d0bbde) by [Unito](https://www.unito.io)
54 lines
1.5 KiB
Vue
54 lines
1.5 KiB
Vue
<template>
|
|
<div
|
|
class="comfy-vue-side-bar-container group/sidebar-tab flex h-full flex-col"
|
|
:class="props.class"
|
|
>
|
|
<div class="comfy-vue-side-bar-header flex flex-col gap-2">
|
|
<Toolbar
|
|
class="min-h-15.5 bg-transparent rounded-none border-x-0 border-t-0 px-2 2xl:px-4"
|
|
>
|
|
<template #start>
|
|
<span class="truncate font-bold" :title="props.title">
|
|
{{ props.title }}
|
|
</span>
|
|
<slot name="alt-title" />
|
|
</template>
|
|
<template #end>
|
|
<div
|
|
class="touch:w-auto touch:opacity-100 flex flex-row transition-all duration-200 motion-safe:w-0 motion-safe:opacity-0 motion-safe:group-focus-within/sidebar-tab:w-auto motion-safe:group-focus-within/sidebar-tab:opacity-100 motion-safe:group-hover/sidebar-tab:w-auto motion-safe:group-hover/sidebar-tab:opacity-100"
|
|
>
|
|
<slot name="tool-buttons" />
|
|
</div>
|
|
</template>
|
|
</Toolbar>
|
|
<slot name="header" />
|
|
</div>
|
|
<!-- h-0 to force scrollpanel to grow -->
|
|
<ScrollPanel class="comfy-vue-side-bar-body h-0 grow">
|
|
<slot name="body" />
|
|
</ScrollPanel>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import ScrollPanel from 'primevue/scrollpanel'
|
|
import Toolbar from 'primevue/toolbar'
|
|
|
|
const props = defineProps<{
|
|
title: string
|
|
class?: string
|
|
}>()
|
|
</script>
|
|
|
|
<style scoped>
|
|
@reference '../../../assets/css/style.css';
|
|
|
|
:deep(.p-toolbar-end) .p-button {
|
|
@apply py-1 2xl:py-2;
|
|
}
|
|
|
|
:deep(.p-toolbar-start) {
|
|
@apply min-w-0 flex-1 overflow-hidden;
|
|
}
|
|
</style>
|