Commit 805377b7
805377b737a9Merged
Scott Nixon <[email protected]> ยท 9 months ago ยท 1 file ยท ~1 modified
Description
feat: Add SCSS styles for workspace, sidebar, and folder picker
Add comprehensive styling for multi-project workspace:
- Workspace layout with sidebar + content
- Project sidebar with project list and close buttons
- Folder picker modal with text input and dir browser
- Uses existing Catppuccin Mocha color palette
- Responsive layout with proper overflow handling
Task: attractor-74w
Details
- Commit
- 805377b737a9
- Parent
- 548af055c016
crates/attractor-web/style/main.scssmodifiedView file
@@ -37,7 +37,21 @@
3737
height: 100vh;3838
}3939
40-
// Full-height app layout40+
// Workspace layout (sidebar + content)41+
.app-workspace {42+
display: flex;43+
height: 100vh;44+
overflow: hidden;45+
}46+
47+
.workspace-content {48+
flex: 1;49+
min-width: 0; // prevent flex child from overflowing50+
display: flex;51+
flex-direction: column;52+
}53+
54+
// Full-height app layout (inside workspace content)4155
.app-layout {4256
display: flex;4357
flex-direction: column;@@ -512,3 +526,303 @@
512526
color: $subtext;513527
}514528
}529+
530+
// Project Sidebar531+
.project-sidebar {532+
width: 220px;533+
min-width: 220px;534+
background: $mantle;535+
border-right: 1px solid $surface0;536+
display: flex;537+
flex-direction: column;538+
overflow: hidden;539+
}540+
541+
.sidebar-header {542+
padding: 12px 16px;543+
border-bottom: 1px solid $surface0;544+
flex-shrink: 0;545+
}546+
547+
.sidebar-new-project {548+
width: 100%;549+
padding: 8px 16px;550+
background: transparent;551+
border: none;552+
color: $primary;553+
font-weight: 500;554+
cursor: pointer;555+
text-align: left;556+
font-size: 0.875rem;557+
transition: background 0.15s;558+
559+
&:hover {560+
background: rgba($primary, 0.1);561+
}562+
}563+
564+
.sidebar-projects {565+
flex: 1;566+
overflow-y: auto;567+
}568+
569+
.project-entry {570+
display: flex;571+
align-items: center;572+
padding: 8px 16px;573+
cursor: pointer;574+
color: $subtext;575+
border-left: 3px solid transparent;576+
transition: all 0.15s;577+
font-size: 0.875rem;578+
579+
&:hover {580+
background: $surface0;581+
color: $text;582+
}583+
584+
&.active {585+
background: $surface0;586+
color: $text;587+
border-left-color: $primary;588+
}589+
}590+
591+
.project-name {592+
flex: 1;593+
overflow: hidden;594+
text-overflow: ellipsis;595+
white-space: nowrap;596+
}597+
598+
.project-close {599+
margin-left: 4px;600+
padding: 2px 4px;601+
background: transparent;602+
border: none;603+
color: inherit;604+
cursor: pointer;605+
opacity: 0;606+
font-size: 1rem;607+
line-height: 1;608+
transition: opacity 0.15s, color 0.15s;609+
610+
.project-entry:hover & {611+
opacity: 0.6;612+
}613+
614+
&:hover {615+
opacity: 1;616+
color: $error;617+
}618+
}619+
620+
.sidebar-empty {621+
padding: 24px 16px;622+
text-align: center;623+
color: $subtext;624+
font-size: 0.875rem;625+
}626+
627+
// Folder Picker Modal628+
.folder-picker-overlay {629+
position: fixed;630+
inset: 0;631+
background: rgba(0, 0, 0, 0.6);632+
display: flex;633+
align-items: center;634+
justify-content: center;635+
z-index: 100;636+
}637+
638+
.folder-picker-modal {639+
background: $base;640+
border: 1px solid $surface0;641+
border-radius: 8px;642+
width: 600px;643+
max-height: 80vh;644+
display: flex;645+
flex-direction: column;646+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);647+
}648+
649+
.folder-picker-header {650+
display: flex;651+
align-items: center;652+
justify-content: space-between;653+
padding: 16px 20px;654+
border-bottom: 1px solid $surface0;655+
flex-shrink: 0;656+
657+
h2 {658+
font-size: 1rem;659+
font-weight: 600;660+
margin: 0;661+
}662+
}663+
664+
.close-btn {665+
background: transparent;666+
border: none;667+
color: $subtext;668+
font-size: 24px;669+
cursor: pointer;670+
padding: 0;671+
line-height: 1;672+
transition: color 0.15s;673+
674+
&:hover {675+
color: $text;676+
}677+
}678+
679+
.folder-picker-content {680+
flex: 1;681+
overflow-y: auto;682+
display: flex;683+
flex-direction: column;684+
padding: 20px;685+
gap: 20px;686+
}687+
688+
.input-section {689+
display: flex;690+
flex-direction: column;691+
gap: 8px;692+
693+
h3 {694+
font-size: 0.875rem;695+
font-weight: 600;696+
margin: 0;697+
color: $text;698+
}699+
}700+
701+
.path-input {702+
background: $mantle;703+
border: 1px solid $surface0;704+
border-radius: 4px;705+
padding: 8px 12px;706+
color: $text;707+
font-family: inherit;708+
font-size: 0.875rem;709+
transition: border-color 0.15s;710+
711+
&:focus {712+
border-color: $primary;713+
outline: none;714+
}715+
716+
&::placeholder {717+
color: $overlay;718+
}719+
720+
&:disabled {721+
opacity: 0.5;722+
cursor: not-allowed;723+
}724+
}725+
726+
.open-btn,727+
.select-btn {728+
padding: 8px 16px;729+
background: $primary;730+
color: $base;731+
border: none;732+
border-radius: 4px;733+
font-weight: 600;734+
cursor: pointer;735+
font-size: 0.875rem;736+
transition: background 0.15s;737+
738+
&:hover:not(:disabled) {739+
background: $primary-hover;740+
}741+
742+
&:disabled {743+
opacity: 0.5;744+
cursor: not-allowed;745+
}746+
}747+
748+
.divider {749+
text-align: center;750+
color: $overlay;751+
font-size: 0.75rem;752+
text-transform: uppercase;753+
letter-spacing: 0.05em;754+
}755+
756+
.browser-section {757+
display: flex;758+
flex-direction: column;759+
gap: 8px;760+
761+
h3 {762+
font-size: 0.875rem;763+
font-weight: 600;764+
margin: 0;765+
color: $text;766+
}767+
}768+
769+
.breadcrumb {770+
padding: 8px;771+
background: $mantle;772+
border-radius: 4px;773+
font-size: 0.8rem;774+
}775+
776+
.breadcrumb-path {777+
color: $subtext;778+
word-break: break-all;779+
}780+
781+
.directory-list {782+
background: $mantle;783+
border: 1px solid $surface0;784+
border-radius: 4px;785+
max-height: 300px;786+
overflow-y: auto;787+
}788+
789+
.dir-entry {790+
display: flex;791+
align-items: center;792+
padding: 6px 12px;793+
cursor: pointer;794+
color: $text;795+
font-size: 0.875rem;796+
transition: background 0.15s;797+
798+
&:hover {799+
background: $surface0;800+
}801+
}802+
803+
.dir-icon {804+
margin-right: 8px;805+
color: $primary;806+
}807+
808+
.dir-name {809+
overflow: hidden;810+
text-overflow: ellipsis;811+
white-space: nowrap;812+
}813+
814+
.loading-indicator {815+
padding: 12px;816+
text-align: center;817+
color: $subtext;818+
font-size: 0.875rem;819+
}820+
821+
.error-message {822+
padding: 8px;823+
background: rgba($error, 0.1);824+
border: 1px solid rgba($error, 0.3);825+
border-radius: 4px;826+
color: $error;827+
font-size: 0.85rem;828+
}