sidebar: add empty placeholder (#2804)

This commit is contained in:
end-4
2026-01-10 11:29:20 +01:00
parent 809dac681f
commit 97d22378ff
@@ -48,6 +48,7 @@ Item {
spacing: sidebarPadding spacing: sidebarPadding
Toolbar { Toolbar {
visible: tabButtonList.length > 0
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
enableShadow: false enableShadow: false
ToolbarTabBar { ToolbarTabBar {
@@ -83,9 +84,10 @@ Item {
} }
contentChildren: [ contentChildren: [
...((root.aiChatEnabled || (!root.translatorEnabled && !root.animeEnabled)) ? [aiChat.createObject()] : []), ...(root.aiChatEnabled ? [aiChat.createObject()] : []),
...(root.translatorEnabled ? [translator.createObject()] : []), ...(root.translatorEnabled ? [translator.createObject()] : []),
...(root.animeEnabled ? [anime.createObject()] : []) ...(root.animeEnabled ? [anime.createObject()] : []),
...(root.tabButtonList.length === 0 ? [placeholder.createObject()] : [])
] ]
} }
} }
@@ -102,6 +104,15 @@ Item {
id: anime id: anime
Anime {} Anime {}
} }
Component {
id: placeholder
Item {
StyledText {
anchors.centerIn: parent
text: Translation.tr("Enjoy your empty sidebar...")
color: Appearance.colors.colSubtext
}
}
}
} }
} }