feat(slint): artist network sidebar shell with header
Restructures ArtistPageView's outer layout into a HorizontalLayout
where the existing Flickable becomes a horizontal-stretch column and a
fixed 300px sidebar opens on the right when NetworkSidebarState.open
is true — mirroring Tauri's .artist-body { content + .network-sidebar-
column } flex row.
Sidebar shell:
- 300px column with a 1px left border in border-subtle, surface-card
background.
- Header row (44px tall, surface-main background, separator line
below): uppercased "ARTIST NETWORK" label on the left, 28x28 close
button on the right using the panel-right-close icon (same icon
Tauri renders via Lucide PanelRightClose).
- Close button mirrors the header toggle: flips
NetworkSidebarState.open to false and emits
NetworkSidebarActions.toggle so the Rust side persists.
- Body is an empty stretch placeholder; Origin / Labels / Similar /
Relationships / Discovery sections land in the following phases.
Asset: panel-right-close.svg ported from Lucide (24x24 viewBox,
stroke-width 2, same path as Tauri's lucide-svelte import).
cc
This commit is contained in:
2 files changed
+103
No files matched your search
@@ -227,7 +227,14 @@ export component ArtistPageView inherits Rectangle {
|
||||
|
||||
background: Theme.surface-main;
|
||||
|
||||
// Main content + optional network sidebar — same flow as Tauri's
|
||||
// .artist-body. The Flickable shrinks when the sidebar opens; the
|
||||
// sidebar itself is a fixed 300px column on the right.
|
||||
HorizontalLayout {
|
||||
spacing: 0px;
|
||||
|
||||
Flickable {
|
||||
horizontal-stretch: 1;
|
||||
viewport-width: self.width;
|
||||
viewport-height: page.preferred-height;
|
||||
|
||||
@@ -531,4 +538,95 @@ export component ArtistPageView inherits Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Network sidebar — a 300px column on the right, fills the
|
||||
// available height, separated from the main content by a thin
|
||||
// border. Sections (Origin / Labels / Similar / Relationships /
|
||||
// Discovery) are populated in the following phases; the shell
|
||||
// only renders the header and an empty body.
|
||||
if NetworkSidebarState.open: Rectangle {
|
||||
width: 300px;
|
||||
background: Theme.surface-card;
|
||||
|
||||
// Left border line — 1px Theme.border-subtle, matching the
|
||||
// Tauri `.network-sidebar-column { border-left: 1px solid
|
||||
// var(--bg-tertiary); }`.
|
||||
Rectangle {
|
||||
x: 0px;
|
||||
y: 0px;
|
||||
width: 1px;
|
||||
height: parent.height;
|
||||
background: Theme.border-subtle;
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
spacing: 0px;
|
||||
|
||||
// Header — uppercased title on the left, close button
|
||||
// on the right.
|
||||
Rectangle {
|
||||
height: 44px;
|
||||
background: Theme.surface-main;
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: 12px;
|
||||
padding-right: 8px;
|
||||
spacing: 8px;
|
||||
|
||||
Text {
|
||||
text: @tr("ARTIST NETWORK");
|
||||
color: Theme.text-muted;
|
||||
font-size: 12px;
|
||||
font-weight: Typography.semibold;
|
||||
letter-spacing: 1.2px;
|
||||
horizontal-stretch: 1;
|
||||
vertical-alignment: center;
|
||||
}
|
||||
|
||||
VerticalLayout {
|
||||
alignment: center;
|
||||
Rectangle {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 6px;
|
||||
background: close-ta.has-hover
|
||||
? Theme.surface-elevated
|
||||
: transparent;
|
||||
|
||||
QbzIcon {
|
||||
source: @image-url("../assets/icons/panel-right-close.svg");
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
x: (parent.width - self.width) / 2;
|
||||
y: (parent.height - self.height) / 2;
|
||||
tint: close-ta.has-hover
|
||||
? Theme.text-primary
|
||||
: Theme.text-muted;
|
||||
}
|
||||
|
||||
close-ta := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => {
|
||||
NetworkSidebarState.open = false;
|
||||
NetworkSidebarActions.toggle();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Header bottom separator.
|
||||
Rectangle {
|
||||
height: 1px;
|
||||
background: Theme.border-subtle;
|
||||
}
|
||||
|
||||
// Body — placeholder. Sections land in phases 5-8.
|
||||
Rectangle {
|
||||
vertical-stretch: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect width="18" height="18" x="3" y="3" rx="2" />
|
||||
<path d="M15 3v18" />
|
||||
<path d="m8 9 3 3-3 3" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 289 B |
Reference in new issue
Block a user