Commit 7ff61b6 pompurin404
committed Aug 15, 2024 · 8 / 9 · Verified
1 parent b46904e commit 7ff61b6 Copy full SHA for 7ff61b6
File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -156,21 +156,21 @@ const mihomoTraffic = async (): Promise<void> => {
156
156
const data = e . data as string
157
157
const json = JSON . parse ( data ) as IMihomoTrafficInfo
158
158
if ( trafficHopping ) {
159
- tray ?. setTitle ( '↑' + `${ calcTraffic ( json . up ) } /s` . padStart ( 14 ) , {
160
- fontType : 'monospacedDigit '
159
+ tray ?. setTitle ( '↑' + `${ calcTraffic ( json . up ) } /s` . padStart ( 12 ) , {
160
+ fontType : 'monospaced '
161
161
} )
162
162
} else {
163
- tray ?. setTitle ( '↓' + `${ calcTraffic ( json . down ) } /s` . padStart ( 14 ) , {
164
- fontType : 'monospacedDigit '
163
+ tray ?. setTitle ( '↓' + `${ calcTraffic ( json . down ) } /s` . padStart ( 12 ) , {
164
+ fontType : 'monospaced '
165
165
} )
166
166
}
167
167
trafficHopping = ! trafficHopping
168
168
169
169
tray ?. setToolTip (
170
170
'↑' +
171
- `${ calcTraffic ( json . up ) } /s` . padStart ( 14 ) +
171
+ `${ calcTraffic ( json . up ) } /s` . padStart ( 12 ) +
172
172
'\n↓' +
173
- `${ calcTraffic ( json . down ) } /s` . padStart ( 14 )
173
+ `${ calcTraffic ( json . down ) } /s` . padStart ( 12 )
174
174
)
175
175
trafficRetry = 10
176
176
mainWindow ?. webContents . send ( 'mihomoTraffic' , json )
You can’t perform that action at this time.
0 commit comments