03b1bcbb68
Rendering ten thousands of tree items consumes a lot of server time and can cause timeouts in extreme cases. Realistically, displaying more than 1,000 files is probably not useful so truncate and show the user a notice instead. 'Find files' can be used to locate specific files beyond the 1,000 limit.
275 lines
4.3 KiB
SCSS
275 lines
4.3 KiB
SCSS
.tree-holder {
|
|
@include new-style-dropdown;
|
|
|
|
.nav-block {
|
|
margin: 10px 0;
|
|
|
|
@media (min-width: $screen-sm-min) {
|
|
display: flex;
|
|
|
|
.tree-ref-container {
|
|
flex: 1;
|
|
}
|
|
|
|
.tree-controls {
|
|
text-align: right;
|
|
|
|
.btn-group {
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.control {
|
|
float: left;
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
|
|
.tree-ref-holder {
|
|
float: left;
|
|
margin-right: 15px;
|
|
}
|
|
|
|
.tree-ref-target-holder {
|
|
display: inline-block;
|
|
}
|
|
|
|
.repo-breadcrumb {
|
|
li:last-of-type {
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
.add-to-tree-dropdown {
|
|
position: absolute;
|
|
left: 18px;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media (max-width: $screen-xs-max) {
|
|
.repo-breadcrumb {
|
|
margin-top: 10px;
|
|
position: relative;
|
|
|
|
.dropdown-menu {
|
|
min-width: 100%;
|
|
width: 100%;
|
|
left: inherit;
|
|
right: 0;
|
|
}
|
|
}
|
|
|
|
.add-to-tree-dropdown {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
}
|
|
|
|
.tree-controls {
|
|
margin-bottom: 10px;
|
|
|
|
.btn,
|
|
.dropdown,
|
|
.btn-group {
|
|
width: 100%;
|
|
}
|
|
|
|
.btn {
|
|
margin: 10px 0 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.file-finder {
|
|
max-width: 500px;
|
|
width: 100%;
|
|
|
|
.file-finder-input {
|
|
width: 95%;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
|
|
.add-to-tree {
|
|
vertical-align: middle;
|
|
padding: 6px 10px;
|
|
}
|
|
|
|
.tree-table {
|
|
margin-bottom: 0;
|
|
|
|
tr {
|
|
border-bottom: 1px solid $white-normal;
|
|
border-top: 1px solid $white-normal;
|
|
|
|
td,
|
|
th {
|
|
line-height: 21px;
|
|
}
|
|
|
|
.last-commit {
|
|
@include str-truncated(506px);
|
|
|
|
.fa-angle-right {
|
|
margin-left: 5px;
|
|
}
|
|
|
|
@media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
|
|
@include str-truncated(450px);
|
|
}
|
|
|
|
}
|
|
|
|
.commit-history-link-spacer {
|
|
margin: 0 10px;
|
|
color: $white-normal;
|
|
}
|
|
|
|
&:hover:not(.tree-truncated-warning) {
|
|
td {
|
|
background-color: $row-hover;
|
|
border-top: 1px solid $row-hover-border;
|
|
border-bottom: 1px solid $row-hover-border;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
&.selected {
|
|
td {
|
|
background: $white-normal;
|
|
border-top: 1px solid $border-gray-dark;
|
|
border-bottom: 1px solid $border-gray-dark;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.tree-item {
|
|
.link-container {
|
|
padding: 0;
|
|
|
|
a {
|
|
padding: 10px $gl-padding;
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.tree-item-file-name {
|
|
max-width: 320px;
|
|
vertical-align: middle;
|
|
|
|
i,
|
|
a {
|
|
color: $gl-text-color;
|
|
}
|
|
|
|
img {
|
|
position: relative;
|
|
top: -1px;
|
|
}
|
|
}
|
|
|
|
.tree-item-file-external-link {
|
|
margin-right: 4px;
|
|
|
|
span {
|
|
text-decoration: inherit;
|
|
}
|
|
}
|
|
|
|
.tree_commit {
|
|
max-width: 320px;
|
|
|
|
.str-truncated {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
.tree_time_ago {
|
|
min-width: 135px;
|
|
}
|
|
}
|
|
|
|
.tree_author {
|
|
padding-right: 8px;
|
|
|
|
.commit-author-name {
|
|
color: $gl-text-color;
|
|
}
|
|
}
|
|
|
|
.tree-truncated-warning {
|
|
color: $orange-600;
|
|
background-color: $orange-100;
|
|
}
|
|
|
|
.tree-time-ago {
|
|
min-width: 135px;
|
|
color: $gl-text-color-secondary;
|
|
}
|
|
|
|
.tree-commit {
|
|
max-width: 320px;
|
|
color: $gl-text-color-secondary;
|
|
|
|
.tree-commit-link {
|
|
color: $gl-text-color-secondary;
|
|
|
|
&:hover {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.blob-commit-info {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.blob-content-holder {
|
|
margin-top: $gl-padding;
|
|
}
|
|
|
|
.blob-upload-dropzone-previews {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
border: 2px;
|
|
border-style: dashed;
|
|
border-color: $border-color;
|
|
min-height: 200px;
|
|
}
|
|
|
|
.upload-link {
|
|
font-weight: $gl-font-weight-normal;
|
|
color: $md-link-color;
|
|
}
|
|
|
|
.repo-charts {
|
|
.sub-header {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
.sub-header-block.border-top {
|
|
margin-top: 20px;
|
|
padding: 0;
|
|
border-top: 1px solid $white-dark;
|
|
border-bottom: 0;
|
|
}
|
|
|
|
.commit-stats li {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.tree-ref-header {
|
|
margin-bottom: 20px;
|
|
|
|
h4 {
|
|
margin: 0;
|
|
line-height: 36px;
|
|
}
|
|
}
|
|
}
|