@@ -17,6 +17,13 @@ import ChannelIcon from './ChannelIcon';
17
17
*/
18
18
export const ROW_HEIGHT = 60 ;
19
19
20
+ const BaseColumn = styled ( Column ) `
21
+ white-space: nowrap;
22
+ line-height: ${ ROW_HEIGHT } px;
23
+ padding-left: 5px;
24
+ padding-right: 5px;
25
+ ` ;
26
+
20
27
const Styled = {
21
28
Row : styled ( Row ) < { dimmed ?: boolean ; selectable ?: boolean } > `
22
29
border-bottom: 0.5px solid ${ props => props . theme . colors . darkGray } ;
@@ -35,28 +42,26 @@ const Styled = {
35
42
}
36
43
` }
37
44
` ,
38
- Column : styled ( Column ) < { last ?: boolean ; ellipse ?: boolean } > `
39
- white-space: nowrap;
40
- line-height: ${ ROW_HEIGHT } px;
41
- padding-left: 5px;
45
+ Column : styled ( BaseColumn ) < { last ?: boolean } > `
42
46
padding-right: ${ props => ( props . last ? '15' : '5' ) } px;
43
- ${ props =>
44
- props . ellipse &&
45
- `
46
- overflow: hidden;
47
- text-overflow: ellipsis;
48
- ` }
47
+ ` ,
48
+ ActionColumn : styled ( BaseColumn ) `
49
+ max-width: 50px;
50
+ padding-left: 24px;
51
+ ` ,
52
+ WideColumn : styled ( BaseColumn ) `
53
+ overflow: hidden;
54
+ text-overflow: ellipsis;
55
+
56
+ @media (min-width: 1200px) and (max-width: 1300px) {
57
+ max-width: 20%;
58
+ }
49
59
` ,
50
60
StatusIcon : styled . span `
51
- float: left;
52
- margin-top: -1px;
53
- margin-left: 15px;
54
61
color: ${ props => props . theme . colors . pink } ;
55
62
` ,
56
63
Check : styled ( Checkbox ) `
57
- float: left;
58
- margin-top: 18px;
59
- margin-left: 10px;
64
+ margin-top: 17px;
60
65
` ,
61
66
Balance : styled ( ChannelBalance ) `
62
67
margin-top: ${ ROW_HEIGHT / 2 - 2 } px;
@@ -78,13 +83,14 @@ const ChannelAliasTip: React.FC<{ channel: Channel }> = ({ channel }) => {
78
83
79
84
export const ChannelRowHeader : React . FC = ( ) => {
80
85
const { l } = usePrefixedTranslation ( 'cmps.loop.ChannelRowHeader' ) ;
81
- const { Column } = Styled ;
86
+ const { Column, ActionColumn , WideColumn } = Styled ;
82
87
return (
83
88
< Row >
89
+ < ActionColumn > </ ActionColumn >
84
90
< Column right >
85
91
< HeaderFour > { l ( 'canReceive' ) } </ HeaderFour >
86
92
</ Column >
87
- < Column cols = { 2 } colsXl = { 3 } > </ Column >
93
+ < WideColumn cols = { 2 } colsXl = { 3 } > </ WideColumn >
88
94
< Column >
89
95
< HeaderFour > { l ( 'canSend' ) } </ HeaderFour >
90
96
</ Column >
@@ -96,9 +102,9 @@ export const ChannelRowHeader: React.FC = () => {
96
102
< Column cols = { 1 } >
97
103
< HeaderFour > { l ( 'upTime' ) } </ HeaderFour >
98
104
</ Column >
99
- < Column cols = { 2 } >
105
+ < WideColumn cols = { 2 } >
100
106
< HeaderFour > { l ( 'peer' ) } </ HeaderFour >
101
- </ Column >
107
+ </ WideColumn >
102
108
< Column right last >
103
109
< HeaderFour > { l ( 'capacity' ) } </ HeaderFour >
104
110
</ Column >
@@ -123,41 +129,43 @@ const ChannelRow: React.FC<Props> = ({ channel, style }) => {
123
129
store . buildSwapStore . toggleSelectedChannel ( channel . chanId ) ;
124
130
} ;
125
131
126
- const { Row, Column, StatusIcon, Check, Balance } = Styled ;
132
+ const { Row, Column, ActionColumn , WideColumn , StatusIcon, Check, Balance } = Styled ;
127
133
return (
128
134
< Row
129
135
dimmed = { dimmed }
130
136
style = { style }
131
137
selectable = { editable && ! disabled }
132
138
onClick = { editable && ! disabled ? handleRowChecked : undefined }
133
139
>
134
- < Column right >
140
+ < ActionColumn >
135
141
{ editable ? (
136
142
< Check checked = { checked } disabled = { disabled } />
137
143
) : (
138
144
< StatusIcon >
139
145
< ChannelIcon channel = { channel } />
140
146
</ StatusIcon >
141
147
) }
148
+ </ ActionColumn >
149
+ < Column right >
142
150
< Unit sats = { channel . remoteBalance } suffix = { false } />
143
151
</ Column >
144
- < Column cols = { 2 } colsXl = { 3 } >
152
+ < WideColumn cols = { 2 } colsXl = { 3 } >
145
153
< Balance channel = { channel } />
146
- </ Column >
154
+ </ WideColumn >
147
155
< Column >
148
156
< Unit sats = { channel . localBalance } suffix = { false } />
149
157
</ Column >
150
158
< Column cols = { 1 } > { channel . remoteFeeRate } </ Column >
151
159
< Column cols = { 1 } > { channel . uptimePercent } </ Column >
152
- < Column cols = { 2 } ellipse >
160
+ < WideColumn cols = { 2 } >
153
161
< Tip
154
162
overlay = { < ChannelAliasTip channel = { channel } /> }
155
163
placement = "left"
156
164
capitalize = { false }
157
165
>
158
166
< span > { channel . aliasLabel } </ span >
159
167
</ Tip >
160
- </ Column >
168
+ </ WideColumn >
161
169
< Column right >
162
170
< Unit sats = { channel . capacity } suffix = { false } />
163
171
</ Column >
0 commit comments