File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
site/src/components/Queue Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -93,12 +93,15 @@ function ProgressBar(props: { progress: UploadProgress | null }) {
9393 return [ ]
9494 } , [ props . progress ] )
9595
96+ // 一行以内就需要撑开
97+ const isExpanded = chunks . length < 18
98+
9699 return (
97100 < ul className = { classnames . progressBar } >
98101 { chunks . map ( ( chunk , index ) => {
99102 const cacheName = chunk . fromCache ? classnames . cachedChunk : ''
100103 return (
101- < li key = { index } >
104+ < li key = { index } className = { isExpanded ? classnames . expanded : '' } >
102105 < span className = { cacheName } style = { { width : chunk . percent + '%' } } >
103106 </ span >
104107 </ li >
Original file line number Diff line number Diff line change 6464 position : relative ;
6565
6666 display : flex ;
67+ flex-wrap : wrap ;
6768 flex-direction : row ;
6869 align-items : center ;
6970
7071 list-style : none ;
7172 padding-inline-start : 0 ;
7273
73- li {
74+ .expanded {
7475 flex : 1 ;
76+ }
77+
78+ li {
79+ margin : 1px ;
7580 padding : 1px ;
76- margin : 0 1 px ;
81+ min-width : 4 px ;
7782 border-radius : 2px ;
78- border :#333 solid 1px ;
83+ border : #333 solid 1px ;
7984
8085 span {
8186 height : 10px ;
You can’t perform that action at this time.
0 commit comments