Skip to content

Commit

Permalink
admin/accounts: better field for "redirect"
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Jan 18, 2024
1 parent ef3e0a4 commit 109f207
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion admin/src/AccountForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { createVerifierAndSalt, SRPParameters, SRPRoutines } from 'tssrp6a'
import { AutoDelete, Delete } from '@mui/icons-material'
import { isMobile } from './misc'
import { state, useSnapState } from './state'
import VfsPathField from './VfsPathField'

interface FormProps { account: Account, groups: string[], done: (username: string)=>void, reload: ()=>void, addToBar: ReactNode }
export default function AccountForm({ account, done, groups, addToBar, reload }: FormProps) {
Expand Down Expand Up @@ -77,7 +78,8 @@ export default function AccountForm({ account, done, groups, addToBar, reload }:
+ (!group ? '' : ". A group can inherit from another group")
+ (belongsOptions.length ? '' : ". Now disabled because there are no groups to select, create one first.")
},
{ k: 'redirect', helperText: "If you want this account to be redirected to a specific folder/address at login time" },
{ k: 'redirect', comp: VfsPathField,
helperText: "If you want this account to be redirected to a specific folder/address at login time" },
],
onError: alertDialog,
save: {
Expand Down
3 changes: 2 additions & 1 deletion admin/src/InstalledPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default function InstalledPlugins({ updates }: { updates?: true }) {
] : [
h(IconBtn, row.started ? {
icon: StopCircle,
title: h(Box, {}, `Stop ${id}`, h('div', { 'aria-hidden': true }, `Started ` + new Date(row.started as string).toLocaleString())),
title: h(Box, { 'aria-hidden': true }, `Stop ${id}`, h('br'), `Started ` + new Date(row.started as string).toLocaleString()),
'aria-label': `Stop ${id}`,
size,
color: 'success',
async onClick() {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ interface MenuButtonProps extends ComponentPropsWithoutRef<"button"> {
export function Btn({ icon, label, tooltip, toggled, onClick, onClickAnimation, ...rest }: MenuButtonProps) {
const [working, setWorking] = useState(false)
return h('button', {
title: tooltip || label,
title: label + prefix(' - ', tooltip),
'aria-label': label,
onClick() {
if (!onClick) return
if (onClickAnimation !== false)
Expand Down
2 changes: 1 addition & 1 deletion plugins/list-uploader/public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}, [data])
const iconOnly = display === 'tooltip'
return text && HFS.h('span', { className: 'uploader', title: HFS.t`Uploader` + (iconOnly ? ' ' + text : '') },
HFS.hIcon('upload'), ' ', !iconOnly && text, ' – ')
HFS.hIcon('upload'), ' ', !iconOnly && text, h('span', { 'aria-hidden': true }, ' – '))
}

function getDetails(batched) {
Expand Down

0 comments on commit 109f207

Please sign in to comment.