@lvce-editor/process-explorer-worker 3.22.0 → 3.22.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/index.js +13 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3146,8 +3146,18 @@ const getCellDom = (className, value, index, paddingLeft) => {
|
|
|
3146
3146
|
type: Td
|
|
3147
3147
|
}, text(value)];
|
|
3148
3148
|
};
|
|
3149
|
-
const
|
|
3150
|
-
|
|
3149
|
+
const getNameColumnWidth = visibleProcesses => {
|
|
3150
|
+
const hasWebContentsView = visibleProcesses.some(process => process.name.toLowerCase().includes('webcontentsview'));
|
|
3151
|
+
return hasWebContentsView ? '40%' : undefined;
|
|
3152
|
+
};
|
|
3153
|
+
const getHeaderDom = visibleProcesses => {
|
|
3154
|
+
const nameColumnWidth = getNameColumnWidth(visibleProcesses);
|
|
3155
|
+
return [tableHeadNode, headerRowNode, ...['Name', 'PID', 'Memory'].flatMap((label, index) => [{
|
|
3156
|
+
...headerCellNode,
|
|
3157
|
+
...(index === 0 && nameColumnWidth && {
|
|
3158
|
+
width: nameColumnWidth
|
|
3159
|
+
})
|
|
3160
|
+
}, text(label)])];
|
|
3151
3161
|
};
|
|
3152
3162
|
const getRowDom = (process, index, focused) => {
|
|
3153
3163
|
return [{
|
|
@@ -3229,7 +3239,7 @@ const getTableDom = state => {
|
|
|
3229
3239
|
role: Grid,
|
|
3230
3240
|
tabIndex: Focusable,
|
|
3231
3241
|
type: Table$1
|
|
3232
|
-
}, ...getHeaderDom(), ...getBodyDom(state)];
|
|
3242
|
+
}, ...getHeaderDom(visibleProcesses), ...getBodyDom(state)];
|
|
3233
3243
|
};
|
|
3234
3244
|
const getDom = state => {
|
|
3235
3245
|
const {
|