@samitouri / QOSami-HFS / commits / 92b74a59

plugins: config.type=show_html replaces showHtml

Massimo Melina committed Mar 26, 2026 at 10:38 UTC 92b74a59c67efdd7fbab71f4212765d90d22de2b
2 files changed +8 -5
admin/src/pluginOptions.ts
+2 -1
@@ -135,10 +135,11 @@ const type2comp = {
135 vfs_path: VfsPathField,
136 username: UsernameField,
137 color: ColorField,
138 - showHtml: ({ html }: any) => h(Html, {}, String(html)),
138 + show_html: ({ html }: any) => h(Html, {}, String(html)),
139 date_time: DateTimeField,
140 net_mask: NetmaskField,
141 }
142 +;(type2comp as any).showHtml = type2comp.show_html // legacy pre 3.1.0
143
144 function UsernameField({ value, onChange, multiple, groups, ...rest }: FieldProps<string>) {
145 const { data, element, loading } = useApiEx<typeof adminApis.get_accounts>('get_accounts')
dev-plugins.md
+6 -4
@@ -232,7 +232,7 @@ exports.depend = [{ repo: "x", version: 1 }] // non-JSON object key
232 ### FieldDescriptor
233
234 A FieldDescriptor is an object and can be empty. Currently, these optional properties are supported:
235 -- `type: 'string' | 'number' | 'boolean' | 'select' | 'multiselect' | 'real_path' | 'vfs_path' | 'array' | 'username' | 'color' | 'date_time'` . Default is `string`.
235 +- `type: 'string' | 'number' | 'boolean' | 'select' | 'multiselect' | 'real_path' | 'vfs_path' | 'array' | 'username' | 'color' | 'date_time' | 'show_html'` . Default is `string`.
236 - `label: string` what name to display next to the field. Default is based on `key`.
237 - `defaultValue: any` value to be used when nothing is set. Default is undefined.
238 - `helperText: string` extra text printed next to the field.
@@ -246,8 +246,9 @@ A FieldDescriptor is an object and can be empty. Currently, these optional prope
246 Return false if value is valid, true for generic error, or a string for specific error.
247
248 Based on `type`, other properties are supported:
249 -- `string`
249 +- `string` simple text field. Spaces at the start/end are automatically removed.
250 - `multiline: boolean`. Default is `false`.
251 + - `required: boolean`. Default is `false`.
252 - to make it a password field, use this property `inputProps: { type: 'password' }`; valid also for other standard html input types.
253 - `number`
254 - `min: number`
@@ -282,7 +283,7 @@ Based on `type`, other properties are supported:
283 and the resulting value will be an array of strings, instead of a string. Default is false.
284 - `date_time` a string in the form yyyy-mm-ddThh:mm:ss.cccZ
285 - `net_mask` a string
285 -- `showHtml` not a real field, but let you display some static content
286 +- `show_html` not a real field, but let you display some static content
287 - `html: string` HTML code to display.
288
289 ## api object
@@ -1185,4 +1186,5 @@ If you want to override a text regardless of the language, use the special langu
1186 - HFS.customizeText
1187 - 13 (v3.1.0)
1188 - backend events: dirEntry, request
1188 - - HFS.pathSeparator
\ No newline at end of file
1189 + - HFS.pathSeparator
1190 + - config.type=show_html
\ No newline at end of file