HF / console /src /features /project-directory /SessionProjectDirectory.module.less
mysticaldragon's picture
Deploy QwenPaw - Personal AI Assistant Platform
4e7644b
Raw History Blame Contribute Delete
15.2 kB
.trigger {
max-width: 240px;
height: 30px;
padding: 0 9px;
display: inline-flex;
align-items: center;
gap: 6px;
overflow: hidden;
color: var(--ant-color-text-secondary);
background: rgba(243, 107, 33, 0.07);
border: 1px solid rgba(243, 107, 33, 0.2);
border-radius: 8px;
cursor: pointer;
> span {
overflow: hidden;
color: var(--ant-color-text);
font-size: 12px;
font-weight: 550;
text-overflow: ellipsis;
white-space: nowrap;
}
em {
color: #d95b17;
font-size: 9px;
font-style: normal;
white-space: nowrap;
}
&:hover {
border-color: #f36b21;
background: rgba(243, 107, 33, 0.11);
}
}
.triggerError {
color: var(--ant-color-error);
border-color: color-mix(in srgb, var(--ant-color-error) 35%, transparent);
}
.triggerCompact {
width: 30px;
min-width: 30px;
padding: 0;
justify-content: center;
}
.triggerFullPath {
width: 100%;
height: auto;
max-width: none;
min-width: 0;
padding: 0;
justify-content: flex-start;
gap: 5px;
border: 0;
border-radius: 0;
background: transparent;
> svg:first-child {
display: none;
}
> svg:last-child {
flex: 0 0 auto;
color: var(--ant-color-text-tertiary);
}
&:hover {
border-color: transparent;
background: transparent;
}
}
.triggerIdentity {
min-width: 0;
flex: 1;
display: grid;
gap: 1px;
text-align: left;
strong,
small {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
strong {
color: var(--ant-color-text);
font-size: 11px;
font-weight: 650;
line-height: 1.25;
}
small {
color: var(--ant-color-text-secondary);
flex: 1;
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 9px;
font-weight: 500;
line-height: 1.3;
}
}
.panel {
width: 460px;
max-width: calc(100vw - 56px);
max-height: min(394px, calc(100vh - 40px));
padding: 6px;
display: flex;
flex-direction: column;
gap: 10px;
overflow: hidden;
}
.panelHeading {
padding: 2px 2px 0;
display: flex;
align-items: center;
gap: 10px;
> div {
min-width: 0;
display: flex;
flex-direction: column;
}
strong {
color: var(--ant-color-text);
font-size: 14px;
font-weight: 650;
}
}
/* Bound-directory count, sitting at the end of the title row. */
.headingCount {
flex: 0 0 auto;
min-width: 20px;
padding: 1px 7px;
color: var(--ant-color-text-secondary);
font-size: 11px;
font-weight: 650;
text-align: center;
border-radius: 7px;
background: var(--ant-color-fill-tertiary);
}
.headingIcon {
width: 32px;
height: 32px;
display: inline-flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
color: #f36b21;
border-radius: 11px;
background: rgba(243, 107, 33, 0.1);
}
.pathInput {
height: 42px;
/* Never absorb the panel's height deficit: the browser body shrinks. */
flex: 0 0 auto;
border-radius: 10px;
&:focus-within {
border-color: rgba(243, 107, 33, 0.5);
box-shadow: 0 0 0 3px rgba(243, 107, 33, 0.08);
}
}
.pathChip {
min-width: 0;
min-height: 46px;
flex: 0 0 auto;
padding: 6px 8px;
display: grid;
grid-template-columns: 32px minmax(0, 1fr) 28px;
align-items: center;
gap: 9px;
border: 1px solid rgba(243, 107, 33, 0.34);
border-radius: 11px;
background: rgba(243, 107, 33, 0.08);
box-shadow: inset 3px 0 0 #f36b21;
}
.pathChipIcon {
width: 32px;
height: 32px;
display: inline-flex;
align-items: center;
justify-content: center;
color: #f36b21;
border-radius: 9px;
background: var(--ant-color-bg-container);
}
.pathChipCopy {
min-width: 0;
display: grid;
gap: 2px;
strong,
small {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
strong {
color: var(--ant-color-text);
font-size: 12px;
font-weight: 650;
}
small {
color: var(--ant-color-text-secondary);
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 9px;
}
}
.pathChipClear {
width: 28px;
height: 28px;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--ant-color-text-secondary);
border: 0;
border-radius: 8px;
background: transparent;
cursor: pointer;
&:hover {
color: var(--ant-color-text);
background: var(--ant-color-bg-container);
}
}
.splitBody {
min-height: 0;
height: 236px;
display: grid;
flex: 1 1 236px;
grid-template-columns: minmax(170px, 0.82fr) minmax(230px, 1.18fr);
overflow: hidden;
border: 1px solid var(--ant-color-border-secondary);
border-radius: 12px;
}
.recentPane,
.browserPane {
min-width: 0;
min-height: 0;
padding: 10px;
overflow: hidden;
}
.recentPane {
display: flex;
flex-direction: column;
border-right: 1px solid var(--ant-color-border-secondary);
background: color-mix(
in srgb,
var(--ant-color-fill-quaternary) 58%,
transparent
);
}
.sectionHeading {
min-height: 26px;
display: flex;
align-items: flex-start;
justify-content: space-between;
color: var(--ant-color-text-tertiary);
font-size: 10px;
strong {
color: var(--ant-color-text-secondary);
font-size: 11px;
font-weight: 650;
}
}
.recent {
min-height: 0;
display: flex;
flex: 1;
flex-direction: column;
gap: 4px;
overflow: auto;
button {
min-width: 0;
min-height: 44px;
padding: 5px 7px;
display: grid;
grid-template-columns: 30px minmax(0, 1fr) 18px;
align-items: center;
gap: 9px;
color: var(--ant-color-text-secondary);
text-align: left;
border: 1px solid transparent;
border-radius: 10px;
background: transparent;
cursor: pointer;
transition:
color 150ms ease,
border-color 150ms ease,
background 150ms ease;
&:hover {
color: var(--ant-color-text);
border-color: var(--ant-color-border-secondary);
background: var(--ant-color-bg-container);
}
}
}
.recent button.recentSelected {
color: #f36b21;
border-color: rgba(243, 107, 33, 0.34);
background: rgba(243, 107, 33, 0.09);
box-shadow: inset 3px 0 0 #f36b21;
}
.recentIcon {
width: 30px;
height: 30px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 8px;
background: var(--ant-color-fill-tertiary);
.recentSelected & {
background: var(--ant-color-bg-container);
}
}
.recentCopy {
min-width: 0;
display: grid;
gap: 2px;
strong,
small {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
strong {
color: var(--ant-color-text);
font-size: 11px;
font-weight: 650;
}
small {
color: var(--ant-color-text-secondary);
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 9px;
}
}
.recentCheck {
width: 17px;
height: 17px;
display: inline-flex;
align-items: center;
justify-content: center;
color: transparent;
border: 1px solid var(--ant-color-border);
border-radius: 50%;
background: var(--ant-color-bg-container);
.recentSelected & {
color: #fff;
border-color: #f36b21;
background: #f36b21;
}
}
.browserPane {
display: flex;
flex-direction: column;
gap: 8px;
background: var(--ant-color-bg-container);
}
.browserHeading {
min-height: 32px;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 8px;
> div:first-child {
min-width: 0;
display: grid;
gap: 3px;
}
strong {
color: var(--ant-color-text-secondary);
font-size: 11px;
font-weight: 650;
}
code {
overflow: hidden;
color: var(--ant-color-text-tertiary);
font-size: 9px;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.browserActions {
display: flex;
flex: 0 0 auto;
align-items: center;
:global(.ant-btn) {
width: 28px;
height: 28px;
padding: 0;
}
}
.createDirectoryForm {
display: grid;
grid-template-columns: minmax(0, 1fr) 28px 28px;
align-items: start;
gap: 4px;
:global(.ant-btn) {
width: 28px;
height: 24px;
padding: 0;
}
> small {
grid-column: 1 / -1;
color: var(--ant-color-error);
font-size: 9px;
line-height: 1.3;
}
}
.directories {
width: 100%;
min-height: 0;
display: flex;
flex: 1;
flex-direction: column;
gap: 3px;
overflow: auto;
> button:not(:global(.ant-btn)) {
width: 100%;
min-width: 0;
min-height: 34px;
padding: 0 9px;
display: grid;
grid-template-columns: 17px minmax(0, 1fr) 14px;
align-items: center;
gap: 8px;
color: var(--ant-color-text-secondary);
text-align: left;
border: 1px solid transparent;
border-radius: 8px;
background: transparent;
cursor: pointer;
transition:
color 150ms ease,
border-color 150ms ease,
background 150ms ease;
span {
overflow: hidden;
color: var(--ant-color-text);
font-size: 11px;
font-weight: 550;
text-overflow: ellipsis;
white-space: nowrap;
}
> svg:last-child {
color: var(--ant-color-text-tertiary);
}
&:hover {
border-color: var(--ant-color-border-secondary);
background: var(--ant-color-fill-quaternary);
}
}
}
.directories > button.directorySelected:not(:global(.ant-btn)) {
color: #f36b21;
border-color: rgba(243, 107, 33, 0.3);
background: rgba(243, 107, 33, 0.08);
> svg:last-child {
color: #f36b21;
}
}
.browserLoading {
min-height: 160px;
display: flex;
align-items: center;
justify-content: center;
color: var(--ant-color-text-tertiary);
}
.emptyState {
padding: 24px 8px;
display: block;
color: var(--ant-color-text-tertiary);
font-size: 10px;
text-align: center;
}
.actions {
padding-top: 2px;
display: flex;
justify-content: space-between;
gap: 8px;
:global(.ant-btn) {
border-radius: 9px;
}
:global(.ant-btn-primary) {
min-width: 74px;
background: #f36b21;
box-shadow: 0 5px 14px rgba(243, 107, 33, 0.18);
&:hover {
background: #d95613 !important;
}
}
}
.recent strong {
color: var(--ant-color-text);
}
.recent button:hover {
.recentIcon {
color: #f36b21;
}
}
.recentSelected {
.recentIcon {
color: #f36b21;
}
}
.hint {
color: var(--ant-color-text-tertiary);
font-size: 10px;
}
.spin {
animation: spin 900ms linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
:global(.dark-mode) {
.trigger {
background: rgba(255, 145, 77, 0.1);
border-color: rgba(255, 145, 77, 0.24);
em {
color: #ff914d;
}
}
.panelHeading {
color: #ff914d;
}
}
@media (max-width: 500px) {
.trigger {
max-width: 150px;
em {
display: none;
}
}
.panel {
width: calc(100vw - 24px);
max-width: calc(100vw - 72px);
max-height: calc(100vh - 20px);
gap: 10px;
}
.splitBody {
height: auto;
min-height: 0;
grid-template-columns: minmax(0, 1fr);
overflow: auto;
}
/* Same specificity as the session override above, or that 110px floor
would win here and the stacked panes could not shrink. */
.panelWithList .splitBody {
min-height: 0;
flex: 1 1 auto;
}
.recentPane {
min-height: 145px;
max-height: 170px;
overflow: auto;
border-right: 0;
border-bottom: 1px solid var(--ant-color-border-secondary);
}
.browserPane {
min-height: 190px;
max-height: 220px;
}
.actions {
:global(.ant-btn-text) {
max-width: 65%;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
/* ── Session scope: bound directory list ──────────────────────────────
Sits below the picker. The panel height is fixed, so the browser body
gives up some room (.panelWithList) and the list scrolls on overflow. */
.panelWithList .splitBody {
height: auto;
min-height: 110px;
flex: 1 1 170px;
}
.boundDirs {
min-height: 0;
display: flex;
/* Shrinks before the actions row does: Apply must stay on screen even
with the maximum number of extra roots bound. */
flex: 0 1 auto;
flex-direction: column;
gap: 4px;
overflow: hidden;
}
.boundList {
min-height: 0;
max-height: 150px;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 3px;
list-style: none;
overflow-y: auto;
}
/* One row: a folder mark, a two-line identity (name over full path), then
tags and row actions. Shared by bound rows and the pending-add row. */
.boundList li {
min-width: 0;
min-height: 42px;
padding: 4px 6px;
display: flex;
align-items: center;
gap: 8px;
color: var(--ant-color-text-secondary);
border: 1px solid transparent;
border-radius: 9px;
}
.boundIcon {
width: 26px;
height: 26px;
display: inline-flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
border-radius: 8px;
background: var(--ant-color-fill-tertiary);
}
.boundCopy {
min-width: 0;
flex: 1;
display: grid;
gap: 1px;
strong,
small {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
strong {
color: var(--ant-color-text);
font-size: 12px;
font-weight: 650;
}
small {
color: var(--ant-color-text-tertiary);
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 9px;
}
}
/* Tag and row action share one size so "Primary" and "Make primary" read as
the same class of label. */
.boundTag,
.boundAction {
flex: 0 0 auto;
font-size: 10px;
font-style: normal;
white-space: nowrap;
}
.boundTag {
color: #d95b17;
}
.boundAction {
padding: 3px 7px;
color: var(--ant-color-text-tertiary);
border: 1px solid transparent;
border-radius: 7px;
background: transparent;
cursor: pointer;
&:hover:not(:disabled) {
color: #d95b17;
border-color: rgba(243, 107, 33, 0.34);
background: rgba(243, 107, 33, 0.08);
}
&:disabled {
cursor: not-allowed;
opacity: 0.5;
}
}
/* The primary is the resolution base, so it reads as the anchor row. */
.boundList li[data-primary="true"] {
border-color: rgba(243, 107, 33, 0.28);
background: rgba(243, 107, 33, 0.07);
.boundIcon {
color: #f36b21;
background: var(--ant-color-bg-container);
}
}
.boundList li[data-missing="true"] {
.boundCopy strong {
color: var(--ant-color-error);
}
.boundTag {
color: var(--ant-color-error);
}
}
/* The queued directory sits at the end of the list, dashed so it reads as
"not bound yet". */
.pendingRow {
border-style: dashed !important;
border-color: var(--ant-color-border) !important;
background: var(--ant-color-fill-quaternary);
}
/* Sits under the panel title: which directory the tools default to. */
.boundHint {
margin-top: 1px;
color: var(--ant-color-text-tertiary);
font-size: 10px;
font-weight: 400;
line-height: 1.4;
}
.listError {
color: var(--ant-color-error);
font-size: 10px;
word-break: break-all;
}
/* Anchor for `hideTrigger` callers: the panel is opened from their own
control, so this only supplies a position to attach the popover to. */
.hiddenAnchor {
display: block;
width: 0;
height: 0;
}