admin/accounts: better field for "redirect"
Massimo Melina committed
Jan 18, 2024 at 15:18 UTC
109f2076fbbc81387edea62eccc15e3b70d984e4
4 files changed
+8
-4
admin/src/AccountForm.ts
+3
-1
@@ -12,6 +12,7 @@ import { createVerifierAndSalt, SRPParameters, SRPRoutines } from 'tssrp6a'
12
import { AutoDelete, Delete } from '@mui/icons-material'
13
import { isMobile } from './misc'
14
import { state, useSnapState } from './state'
15
+import VfsPathField from './VfsPathField'
16
17
interface FormProps { account: Account, groups: string[], done: (username: string)=>void, reload: ()=>void, addToBar: ReactNode }
18
export default function AccountForm({ account, done, groups, addToBar, reload }: FormProps) {
@@ -77,7 +78,8 @@ export default function AccountForm({ account, done, groups, addToBar, reload }:
78
+ (!group ? '' : ". A group can inherit from another group")
79
+ (belongsOptions.length ? '' : ". Now disabled because there are no groups to select, create one first.")
80
},
80
- { k: 'redirect', helperText: "If you want this account to be redirected to a specific folder/address at login time" },
81
+ { k: 'redirect', comp: VfsPathField,
82
+ helperText: "If you want this account to be redirected to a specific folder/address at login time" },
83
],
84
onError: alertDialog,
85
save: {
admin/src/InstalledPlugins.ts
+2
-1
@@ -68,7 +68,8 @@ export default function InstalledPlugins({ updates }: { updates?: true }) {
68
] : [
69
h(IconBtn, row.started ? {
70
icon: StopCircle,
71
- title: h(Box, {}, `Stop ${id}`, h('div', { 'aria-hidden': true }, `Started ` + new Date(row.started as string).toLocaleString())),
71
+ title: h(Box, { 'aria-hidden': true }, `Stop ${id}`, h('br'), `Started ` + new Date(row.started as string).toLocaleString()),
72
+ 'aria-label': `Stop ${id}`,
73
size,
74
color: 'success',
75
async onClick() {
frontend/src/menu.ts
+2
-1
@@ -159,7 +159,8 @@ interface MenuButtonProps extends ComponentPropsWithoutRef<"button"> {
159
export function Btn({ icon, label, tooltip, toggled, onClick, onClickAnimation, ...rest }: MenuButtonProps) {
160
const [working, setWorking] = useState(false)
161
return h('button', {
162
- title: tooltip || label,
162
+ title: label + prefix(' - ', tooltip),
163
+ 'aria-label': label,
164
onClick() {
165
if (!onClick) return
166
if (onClickAnimation !== false)
plugins/list-uploader/public/main.js
+1
-1
@@ -17,7 +17,7 @@
17
}, [data])
18
const iconOnly = display === 'tooltip'
19
return text && HFS.h('span', { className: 'uploader', title: HFS.t`Uploader` + (iconOnly ? ' ' + text : '') },
20
- HFS.hIcon('upload'), ' ', !iconOnly && text, ' – ')
20
+ HFS.hIcon('upload'), ' ', !iconOnly && text, h('span', { 'aria-hidden': true }, ' – '))
21
}
22
23
function getDetails(batched) {