Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
nit
  • Loading branch information
huchenlei committed Oct 11, 2024
commit 2fc6c066d675b8a924faab90f212ac7ced6d8745
7 changes: 5 additions & 2 deletions src/components/sidebar/tabs/ModelLibrarySidebarTab.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<template>
<SidebarTabTemplate :title="$t('sideToolbar.modelLibrary')">
<SidebarTabTemplate
:title="$t('sideToolbar.modelLibrary')"
class="bg-[var(--p-tree-background)]"
>
<template #header>
<SearchBox
class="model-lib-search-box p-4 bg-[var(--p-tree-background)]"
class="model-lib-search-box p-4"
v-model:modelValue="searchQuery"
:placeholder="$t('searchModels') + '...'"
/>
Expand Down
9 changes: 6 additions & 3 deletions src/components/sidebar/tabs/NodeLibrarySidebarTab.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<SidebarTabTemplate :title="$t('sideToolbar.nodeLibrary')">
<SidebarTabTemplate
:title="$t('sideToolbar.nodeLibrary')"
class="bg-[var(--p-tree-background)]"
>
<template #tool-buttons>
<Button
class="new-folder-button"
Expand All @@ -20,7 +23,7 @@
</template>
<template #header>
<SearchBox
class="node-lib-search-box p-4 bg-[var(--p-tree-background)]"
class="node-lib-search-box p-4"
v-model:modelValue="searchQuery"
@search="handleSearch"
@show-filter="($event) => searchFilter.toggle($event)"
Expand All @@ -42,7 +45,7 @@
<Divider
v-show="nodeBookmarkStore.bookmarks.length > 0"
type="dashed"
class="p-2 m-0 bg-[var(--p-tree-background)]"
class="m-2"
/>
<TreeExplorer
class="node-lib-tree-explorer py-0"
Expand Down
15 changes: 8 additions & 7 deletions src/components/sidebar/tabs/SidebarTabTemplate.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div class="comfy-vue-side-bar-container flex flex-col h-full">
<div
class="comfy-vue-side-bar-container flex flex-col h-full"
:class="props.class"
>
<div class="comfy-vue-side-bar-header">
<Toolbar
class="flex-shrink-0 border-x-0 border-t-0 rounded-none px-2 py-1 min-h-10"
Expand All @@ -26,10 +29,8 @@
import Toolbar from 'primevue/toolbar'
import ScrollPanel from 'primevue/scrollpanel'

const props = defineProps({
title: {
type: String,
required: true
}
})
const props = defineProps<{
title: string
class?: string
}>()
</script>
13 changes: 5 additions & 8 deletions src/components/sidebar/tabs/WorkflowsSidebarTab.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<SidebarTabTemplate :title="$t('sideToolbar.workflows')">
<SidebarTabTemplate
:title="$t('sideToolbar.workflows')"
class="bg-[var(--p-tree-background)]"
>
<template #tool-buttons>
<Button
class="browse-templates-button"
Expand All @@ -25,7 +28,7 @@
</template>
<template #header>
<SearchBox
class="workflows-search-box p-4 bg-[var(--p-tree-background)]"
class="workflows-search-box p-4"
v-model:modelValue="searchQuery"
@search="handleSearch"
:placeholder="$t('searchWorkflows') + '...'"
Expand Down Expand Up @@ -216,9 +219,3 @@ const selectionKeys = computed(() => ({
[`root/${workflowStore.activeWorkflow?.name}.json`]: true
}))
</script>

<style scoped>
:deep(.comfy-vue-side-bar-body) {
background: var(--p-tree-background);
}
</style>