git-watchtower 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ui/renderer.js +4 -4
package/package.json
CHANGED
package/src/ui/renderer.js
CHANGED
|
@@ -96,19 +96,19 @@ function renderHeader(state, write) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
let serverInfo = '';
|
|
99
|
-
let
|
|
99
|
+
let serverInfoVisibleLen = 0;
|
|
100
100
|
if (state.serverMode === 'none') {
|
|
101
|
-
|
|
101
|
+
serverInfoVisibleLen = 0;
|
|
102
102
|
} else {
|
|
103
103
|
const statusDot = state.serverRunning
|
|
104
104
|
? ansi.green + '\u25CF'
|
|
105
105
|
: (state.serverCrashed ? ansi.red + '\u25CF' : ansi.gray + '\u25CB');
|
|
106
|
-
|
|
106
|
+
serverInfoVisibleLen = 2 + `localhost:${state.port} `.length; // dot + space + "localhost:PORT "
|
|
107
107
|
serverInfo = statusDot + ansi.white + ` localhost:${state.port} `;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const rightContent = `${modeBadge} ${serverInfo}${statusIcon}${ansi.bgBlue} ${soundIcon}${ansi.bgBlue} `;
|
|
111
|
-
const rightVisibleLen = modeLabel.length + 1 +
|
|
111
|
+
const rightVisibleLen = modeLabel.length + 1 + serverInfoVisibleLen + 5;
|
|
112
112
|
|
|
113
113
|
const usedSpace = leftVisibleLen + badgesVisibleLen + rightVisibleLen;
|
|
114
114
|
const padding = Math.max(1, width - usedSpace);
|