mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
Repair relative ordering and destination dialog lifecycles, retain failed operations, and make checklist, rule and attachment controls keyboard accessible. Improve scaled layouts and reuse canonical translated labels. Add source-execution and Chromium/Firefox regression coverage, including awaiting background persistence before reload. Record implementation decisions and validation limits. Thanks to xet7 !
9 lines
497 B
JavaScript
9 lines
497 B
JavaScript
// Keep server diagnostics in the console; show existing localized UI messages.
|
|
// The last-admin case must precede the general authorization failure.
|
|
export function accountOperationErrorKey(error) {
|
|
if (error?.error === 'not-authorized' && error.reason === 'Cannot delete the last administrator') return 'last-admin-desc';
|
|
if (error?.error === 'not-authorized') return 'error-notAllowed';
|
|
if (error?.error === 'user-not-found') return 'error-user-doesNotExist';
|
|
return 'server-error';
|
|
}
|