admin/plugins: wrap on long description
Massimo Melina committed
Jun 5, 2024 at 14:35 UTC
bfa2e9eff5afc192c58a05167b060a1151c6214b
5 files changed
+6
-5
admin/src/ArrayField.ts
+1
-1
@@ -139,7 +139,7 @@ const byType: Dict<{ field?: Partial<FieldDescriptor>, column?: Partial<GridColD
139
dateTime: {
140
field: { comp: DateTimeField },
141
column: {
142
- type: 'dateTime', minWidth: 90, flex: 0.5,
142
+ type: 'dateTime', minWidth: 96, flex: 0.5,
143
valueGetter: ({ value }) => value && new Date(value),
144
renderCell: ({ value }) => value && h(Box, {}, value.toLocaleDateString(), h('br'), value.toLocaleTimeString())
145
}
admin/src/DataTable.ts
+2
-1
@@ -62,7 +62,8 @@ export function DataTable({ columns, initialState={}, actions, actionsProps, ini
62
renderCell(params: any) {
63
const { columns } = params.api.store.getSnapshot()
64
const showOther = columns.columnVisibilityModel[other] === false
65
- return h(Box, {}, col.renderCell ? col.renderCell(params) : params.formattedValue,
65
+ return h(Box, { maxHeight: '100%', sx: { textWrap: 'wrap' } }, // wrap if necessary, but stay within the row
66
+ col.renderCell ? col.renderCell(params) : params.formattedValue,
67
showOther && h(Box, { ...compact && { lineHeight: '1em', fontSize: 'smaller' }, ...props },
68
renderCell({ ...columns.lookup[other], ...override }, params.row) ) )
69
}
admin/src/InstalledPlugins.ts
+1
-1
@@ -142,7 +142,7 @@ export function renderName({ row, value }: any) {
142
errorIcon(row.error),
143
repo?.includes('//') ? h(Link, { href: repo, target: 'plugin' }, value)
144
: !repo ? value
145
- : with_(repo?.split('/'), arr => h('span', { style: { textWrap: 'wrap' } },
145
+ : with_(repo?.split('/'), arr => h(Fragment, {},
146
h(Link, { href: 'https://github.com/' + repo, target: 'plugin', onClick(ev) { ev.stopPropagation() } }, arr[1].replace(/hfs-/, '')),
147
'\xa0by ', arr[0]
148
))
admin/src/LogsPage.ts
+1
-1
@@ -139,7 +139,7 @@ function LogFile({ file, addToFooter, hidden }: { hidden?: boolean, file: string
139
field: 'ts',
140
headerName: "Timestamp",
141
type: 'dateTime',
142
- width: 90,
142
+ width: 96,
143
valueGetter: ({ value }) => new Date(value as string),
144
renderCell: ({ value }) => h(Fragment, {}, value.toLocaleDateString(), h('br'), value.toLocaleTimeString())
145
}
admin/src/MonitorPage.ts
+1
-1
@@ -149,7 +149,7 @@ function Connections() {
149
field: 'started',
150
headerName: "Started",
151
type: 'dateTime',
152
- width: 100,
152
+ width: 96,
153
hideUnder: 'lg',
154
valueFormatter: ({ value }) => new Date(value as string).toLocaleTimeString()
155
},