mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-23 16:58:27 +01:00
cb77c2047e
This makes the following changes - allow directory rows to overflow their container on resize (allowing scroll as a temporary test) - fix directory width to account for resizer width - add ellipsis to name column on table resize - add the rightmost resizer back (more as a temporary test) - do not search when the filtered contents are empty - cap the index to the end of the list of the number of entries becomes less than the current index - do not redo backend call on filter or search of directory results - add letter spacing on header row
226 lines
6.7 KiB
Plaintext
226 lines
6.7 KiB
Plaintext
.dir-table-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
overflow-x: hidden;
|
|
.dir-table {
|
|
overflow-x: hidden;
|
|
height: 100%;
|
|
min-width: 600px;
|
|
--col-size-size: 0.2rem;
|
|
border-radius: 3px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: Inter;
|
|
.dir-table-head {
|
|
.dir-table-head-row {
|
|
display: flex;
|
|
border-bottom: 1px solid var(--border-color);
|
|
padding: 4px 6px;
|
|
background-color: var(--panel-bg-color);
|
|
font-size: 0.75rem;
|
|
|
|
.dir-table-head-cell {
|
|
flex: 0 0 auto;
|
|
}
|
|
.dir-table-head-cell:not(:first-child) {
|
|
position: relative;
|
|
display: flex;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
|
|
.dir-table-head-cell-content {
|
|
padding: 2px 4px;
|
|
display: flex;
|
|
gap: 0.3rem;
|
|
flex: 1 1 auto;
|
|
overflow-x: hidden;
|
|
letter-spacing: -0.12px;
|
|
|
|
.dir-table-head-direction {
|
|
margin-right: 0.2rem;
|
|
margin-top: 0.2rem;
|
|
}
|
|
|
|
.dir-table-head-size,
|
|
.dir-table-head-type {
|
|
width: 100%;
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
.dir-table-head-resize-box {
|
|
width: 12px;
|
|
display: flex;
|
|
justify-content: center;
|
|
flex: 0 0 auto;
|
|
.dir-table-head-resize {
|
|
cursor: col-resize;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
touch-action: none;
|
|
width: 4px;
|
|
}
|
|
}
|
|
|
|
&:last-child {
|
|
.dir-table-head-resize-box {
|
|
}
|
|
}
|
|
}
|
|
|
|
.dir-table-head-cell:has(.dir-table-head-cell-content .dir-table-head-name) {
|
|
}
|
|
}
|
|
}
|
|
|
|
.dir-table-body {
|
|
flex: 1 1 auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
.dir-table-body-search-display {
|
|
display: flex;
|
|
border-radius: 3px;
|
|
padding: 0.25rem 0.5rem;
|
|
background-color: var(--warning-color);
|
|
|
|
.search-display-close-button {
|
|
margin-left: auto;
|
|
}
|
|
}
|
|
|
|
.dir-table-body-scroll-box {
|
|
position: relative;
|
|
overflow-y: auto;
|
|
.dummy {
|
|
position: absolute;
|
|
visibility: hidden;
|
|
}
|
|
.dir-table-body-row {
|
|
display: flex;
|
|
align-items: center;
|
|
border-radius: 6px;
|
|
padding: 0 6px;
|
|
|
|
&.focused {
|
|
background-color: rgb(from var(--accent-color) r g b / 0.5);
|
|
color: var(--main-text-color);
|
|
|
|
.dir-table-body-cell {
|
|
.dir-table-lastmod,
|
|
.dir-table-modestr,
|
|
.dir-table-size,
|
|
.dir-table-type {
|
|
color: var(--main-text-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
&:focus {
|
|
background-color: rgb(from var(--accent-color) r g b / 0.5);
|
|
color: var(--main-text-color);
|
|
|
|
.dir-table-body-cell {
|
|
.dir-table-lastmod,
|
|
.dir-table-modestr,
|
|
.dir-table-size,
|
|
.dir-table-type {
|
|
color: var(--main-text-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
&:hover:not(:focus):not(.focused) {
|
|
background-color: var(--highlight-bg-color);
|
|
}
|
|
|
|
.dir-table-body-cell {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
padding: 0.25rem;
|
|
cursor: default;
|
|
font-size: 0.8125rem;
|
|
flex: 0 0 auto;
|
|
|
|
&:has(.dir-table-name) {
|
|
}
|
|
|
|
&.col-size {
|
|
text-align: right;
|
|
}
|
|
|
|
.dir-table-lastmod,
|
|
.dir-table-modestr,
|
|
.dir-table-size,
|
|
.dir-table-type {
|
|
color: var(--secondary-text-color);
|
|
margin-right: 12px;
|
|
}
|
|
|
|
.dir-table-type {
|
|
float: right;
|
|
}
|
|
|
|
.dir-table-modestr {
|
|
font-family: Hack;
|
|
}
|
|
|
|
&:has(.dir-table-name) {
|
|
text-overflow: ellipsis;
|
|
}
|
|
.dir-table-name {
|
|
font-weight: 500;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.dir-table-search-line {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 0.7rem;
|
|
|
|
.dir-table-search-box {
|
|
width: 0;
|
|
height: 0;
|
|
opacity: 0;
|
|
padding: 0;
|
|
border: none;
|
|
pointer-events: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.dir-table-button {
|
|
background-color: transparent;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
padding: 0.2rem;
|
|
border-radius: 6px;
|
|
|
|
input {
|
|
width: 0;
|
|
height: 0;
|
|
opacity: 0;
|
|
padding: 0;
|
|
border: none;
|
|
pointer-events: none;
|
|
}
|
|
|
|
&:hover {
|
|
background-color: var(--highlight-bg-color);
|
|
}
|
|
|
|
&:focus {
|
|
background-color: var(--highlight-bg-color);
|
|
}
|
|
|
|
&:focus-within {
|
|
background-color: var(--highlight-bg-color);
|
|
}
|
|
}
|