diff --git a/src/locales/de-DE/messages.po b/src/locales/de-DE/messages.po index fd49c205..f0fee40a 100644 --- a/src/locales/de-DE/messages.po +++ b/src/locales/de-DE/messages.po @@ -258,7 +258,7 @@ msgstr "Konten hinzugefügt" msgid "Admin" msgstr "Admin" -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:71 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:72 msgid "Advanced" msgstr "" @@ -716,7 +716,7 @@ msgid "Downgrade" msgstr "Downgrade" #: src/pages/panel/inventory/DownloadCSVButton.tsx:105 -#: src/pages/panel/inventory/DownloadCSVButton.tsx:124 +#: src/pages/panel/inventory/DownloadCSVButton.tsx:127 msgid "Download CSV" msgstr "CSV herunterladen" @@ -869,8 +869,8 @@ msgstr "Passwort vergessen? Klicken Sie hier, um Ihr Passwort zurückzusetzen." msgid "Forgot Password" msgstr "Passwort vergessen" -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:59 -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:62 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:60 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:63 msgid "Form" msgstr "" @@ -1099,7 +1099,7 @@ msgstr "Monatliche" msgid "Monthly email report" msgstr "Monatlicher E-Mail-Bericht" -#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:186 +#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:187 msgid "More info" msgstr "Mehr Info" @@ -1238,7 +1238,7 @@ msgstr "Einmal" msgid "Oops, the username or password doesn't seem to match our records. Please try again." msgstr "Hoppla, der Benutzername oder das Passwort scheinen nicht mit unseren Aufzeichnungen übereinzustimmen. Bitte versuche es erneut." -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:93 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:94 msgid "Oops! It looks like your query didn't match our format. Please check and try again." msgstr "Ups! Ihre Eingabe entspricht nicht unserem Format. Bitte überprüfen Sie sie und versuchen Sie es erneut." @@ -1562,7 +1562,7 @@ msgstr "" msgid "Severity" msgstr "Schwere" -#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:182 +#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:183 msgid "Show resources" msgstr "Ressourcen anzeigen" @@ -1876,11 +1876,11 @@ msgstr "Sie können TOTP über den Wiederherstellungscode deaktivieren" msgid "You don't have access to this workspace" msgstr "" -#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:20 +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:29 msgid "You don't have the permission to access this, contact the workspace owner for more information." msgstr "" -#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:21 +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:30 msgid "You don't have the permission to change this, contact the workspace owner for more information." msgstr "" diff --git a/src/locales/en-US/messages.po b/src/locales/en-US/messages.po index e9837abc..a9dbd7b4 100644 --- a/src/locales/en-US/messages.po +++ b/src/locales/en-US/messages.po @@ -258,7 +258,7 @@ msgstr "Added accounts" msgid "Admin" msgstr "Admin" -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:71 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:72 msgid "Advanced" msgstr "Advanced" @@ -716,7 +716,7 @@ msgid "Downgrade" msgstr "Downgrade" #: src/pages/panel/inventory/DownloadCSVButton.tsx:105 -#: src/pages/panel/inventory/DownloadCSVButton.tsx:124 +#: src/pages/panel/inventory/DownloadCSVButton.tsx:127 msgid "Download CSV" msgstr "Download CSV" @@ -869,8 +869,8 @@ msgstr "Forget your password? Click here to reset your password." msgid "Forgot Password" msgstr "Forgot Password" -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:59 -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:62 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:60 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:63 msgid "Form" msgstr "Form" @@ -1099,7 +1099,7 @@ msgstr "Monthly" msgid "Monthly email report" msgstr "Monthly email report" -#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:186 +#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:187 msgid "More info" msgstr "More info" @@ -1238,7 +1238,7 @@ msgstr "One time" msgid "Oops, the username or password doesn't seem to match our records. Please try again." msgstr "Oops, the username or password doesn't seem to match our records. Please try again." -#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:93 +#: src/pages/panel/inventory/InventoryAdvanceSearch.tsx:94 msgid "Oops! It looks like your query didn't match our format. Please check and try again." msgstr "Oops! It looks like your query didn't match our format. Please check and try again." @@ -1562,7 +1562,7 @@ msgstr "Severities" msgid "Severity" msgstr "Severity" -#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:182 +#: src/pages/panel/shared/failed-checks/FailedChecks.tsx:183 msgid "Show resources" msgstr "Show resources" @@ -1876,11 +1876,11 @@ msgstr "You can deactivate TOTP via recovery code" msgid "You don't have access to this workspace" msgstr "You don't have access to this workspace" -#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:20 +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:29 msgid "You don't have the permission to access this, contact the workspace owner for more information." msgstr "You don't have the permission to access this, contact the workspace owner for more information." -#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:21 +#: src/shared/disabled-with-permission/DisabledWithPermission.tsx:30 msgid "You don't have the permission to change this, contact the workspace owner for more information." msgstr "You don't have the permission to change this, contact the workspace owner for more information." diff --git a/src/pages/panel/inventory/DownloadCSVButton.tsx b/src/pages/panel/inventory/DownloadCSVButton.tsx index 9efd5db9..3448abe3 100644 --- a/src/pages/panel/inventory/DownloadCSVButton.tsx +++ b/src/pages/panel/inventory/DownloadCSVButton.tsx @@ -121,6 +121,12 @@ export const DownloadCSVButton = forwardRef( {isPending ? : } ) - return isPending ? children : Download CSV}>{children} + return isPending ? ( + children + ) : ( + Download CSV} arrow> + {children} + + ) }, ) diff --git a/src/pages/panel/inventory/InventoryAdvanceSearch.tsx b/src/pages/panel/inventory/InventoryAdvanceSearch.tsx index 6200c67e..d740b969 100644 --- a/src/pages/panel/inventory/InventoryAdvanceSearch.tsx +++ b/src/pages/panel/inventory/InventoryAdvanceSearch.tsx @@ -51,6 +51,7 @@ export const InventoryAdvanceSearch = ({ hasError, hasChanges }: InventoryAdvanc } + arrow > diff --git a/src/pages/panel/inventory/InventoryTable.tsx b/src/pages/panel/inventory/InventoryTable.tsx index 7d8d44b4..52038688 100644 --- a/src/pages/panel/inventory/InventoryTable.tsx +++ b/src/pages/panel/inventory/InventoryTable.tsx @@ -131,15 +131,15 @@ export const InventoryTable = ({ searchCrit, history }: InventoryTableProps) => renderCell: (params) => params.colDef?.type === 'boolean' ? ( params.value === null || params.value === undefined || params.value === 'null' ? ( - + ) : params.value && params.value !== 'false' ? ( - + ) : ( - + ) @@ -152,6 +152,7 @@ export const InventoryTable = ({ searchCrit, history }: InventoryTableProps) => {value.colDef?.headerName ?? value.colDef?.field ?? ''} } + arrow > - + { const { q, reset } = useFixQueryParser() return q && q !== 'all' ? ( - + ) => { return ( - + ) diff --git a/src/pages/panel/shared/failed-checks/FailedChecks.tsx b/src/pages/panel/shared/failed-checks/FailedChecks.tsx index 9a214cfb..71aa0500 100644 --- a/src/pages/panel/shared/failed-checks/FailedChecks.tsx +++ b/src/pages/panel/shared/failed-checks/FailedChecks.tsx @@ -172,6 +172,7 @@ export const FailedChecks = ({ failedCheck, navigate, smallText, withResources, } + arrow > diff --git a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx index 5cdd6d21..626c1471 100644 --- a/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx +++ b/src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx @@ -270,7 +270,7 @@ export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: Worksp {renameAccountIsPending ? ( ) : editedName !== accountName ? ( - Submit}> + Submit} arrow> @@ -285,7 +285,7 @@ export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: Worksp ) : ( - Cancel}> + Cancel} arrow> @@ -297,7 +297,7 @@ export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: Worksp setIsEdit(true)} sx={{ cursor: 'pointer' }}> {accountName ?? '-'} - Edit}> + Edit} arrow> setIsEdit(true)}> @@ -352,7 +352,7 @@ export const WorkspaceSettingsAccountRow = ({ account, isNotConfigured }: Worksp ) : ( - Delete}> + Delete} arrow> diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx index 5feb3c8f..f5b4ae0e 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserInvitationRow.tsx @@ -74,7 +74,7 @@ export const WorkspaceSettingsUserInvitationRow = ({ workspaceInvite }: Workspac ) : ( - Delete}> + Delete} arrow> diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx index d179ea95..0cedbf45 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRoles.tsx @@ -141,7 +141,7 @@ export const WorkspaceSettingsUserRoles = ({ role, userId }: WorkspaceSettingsUs {changeRoleIsPending ? ( ) : ( - Submit}> + Submit} arrow> @@ -152,7 +152,7 @@ export const WorkspaceSettingsUserRoles = ({ role, userId }: WorkspaceSettingsUs ) : ( - Cancel}> + Cancel} arrow> setIsEdit(false)}> @@ -169,7 +169,7 @@ export const WorkspaceSettingsUserRoles = ({ role, userId }: WorkspaceSettingsUs {workspaceSettingsUserRoleToString(role)} {hasUpdateRolesPermission ? ( - Edit}> + Edit} arrow> diff --git a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx index 7fb95402..26f73dc8 100644 --- a/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx +++ b/src/pages/panel/workspace-settings-users/WorkspaceSettingsUserRow.tsx @@ -96,7 +96,7 @@ export const WorkspaceSettingsUserRow = ({ workspaceUser }: WorkspaceSettingsUse ) : ( - Delete}> + Delete} arrow> diff --git a/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx b/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx index ecc24295..863858ca 100644 --- a/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx +++ b/src/pages/panel/workspace-settings/WorkspaceSettingsFormItem.tsx @@ -127,7 +127,7 @@ export const WorkspaceSettingsFormItem = ({ {buttonName} ) : ( - + { {snakeCaseWordsToUFStr(benchmark)} - + { {value >= 0 ? title : '-'} ) - return tooltip ? {comp} : comp + return tooltip ? ( + + {comp} + + ) : ( + comp + ) } export const Heatmap = ({ data }: HeatmapProps) => { diff --git a/src/shared/disabled-with-permission/DisabledWithPermission.tsx b/src/shared/disabled-with-permission/DisabledWithPermission.tsx index 1e693d20..8aadd5c6 100644 --- a/src/shared/disabled-with-permission/DisabledWithPermission.tsx +++ b/src/shared/disabled-with-permission/DisabledWithPermission.tsx @@ -1,6 +1,6 @@ import { t } from '@lingui/macro' import WarningIcon from '@mui/icons-material/Warning' -import { Badge, BadgeProps, Tooltip, TooltipProps } from '@mui/material' +import { Badge, BadgeProps, Theme, Tooltip, TooltipProps, useMediaQuery } from '@mui/material' import { PropsWithChildren, ReactNode } from 'react' interface DisabledWithPermissionProps extends PropsWithChildren> { @@ -10,7 +10,16 @@ interface DisabledWithPermissionProps extends PropsWithChildren { +export const DisabledWithPermission = ({ + hasPermission, + placement, + access, + title, + children, + badgeProps, + ...props +}: DisabledWithPermissionProps) => { + const isMobile = useMediaQuery((theme) => theme.breakpoints.down('md')) return hasPermission ? ( children ) : children ? ( @@ -20,7 +29,9 @@ export const DisabledWithPermission = ({ hasPermission, access, title, children, ? t`You don't have the permission to access this, contact the workspace owner for more information.` : t`You don't have the permission to change this, contact the workspace owner for more information.` } + arrow {...props} + placement={placement && isMobile && !placement.includes('top') && !placement.includes('bottom') ? 'bottom' : placement} > } diff --git a/src/shared/language-button/LanguageButton.tsx b/src/shared/language-button/LanguageButton.tsx index 03122741..6028e64a 100644 --- a/src/shared/language-button/LanguageButton.tsx +++ b/src/shared/language-button/LanguageButton.tsx @@ -38,7 +38,7 @@ export const LanguageButton = ({ iconButtonProps, whiteMode, menuProps }: Langua return ( - + diff --git a/src/shared/layouts/panel-layout/DrawerMenu.tsx b/src/shared/layouts/panel-layout/DrawerMenu.tsx index 7fb55ba1..61b8353b 100644 --- a/src/shared/layouts/panel-layout/DrawerMenu.tsx +++ b/src/shared/layouts/panel-layout/DrawerMenu.tsx @@ -99,16 +99,16 @@ const DrawerMenuItem = ({ onClick={handleClick} disabled={!show} > - - - - - + + + + + {children ? ( void -}) => { +} +export const WorkspaceMenuItem = ({ id, name, selectedWorkspace, error, handleSelectWorkspace }: WorkspaceMenuItemProps) => { const menuItem = ( <> @@ -34,7 +29,7 @@ export const WorkspaceMenuItem = ({ ) return error ? ( - + } anchorOrigin={{ horizontal: 'left', vertical: 'top' }}> {menuItem} @@ -42,7 +37,12 @@ export const WorkspaceMenuItem = ({ ) : ( - handleSelectWorkspace(id)} disabled={disabled}> + handleSelectWorkspace(id)} + selected={selectedWorkspace} + disabled={selectedWorkspace} + sx={selectedWorkspace ? { opacity: '1!important' } : undefined} + > {menuItem} ) @@ -90,7 +90,7 @@ export const UserProfileButton = () => { return ( <> {isPending ? : null} - + @@ -140,7 +140,7 @@ export const UserProfileButton = () => { id={id} handleSelectWorkspace={handleSelectWorkspace} name={name} - disabled={selectedWorkspace?.id === id} + selectedWorkspace={selectedWorkspace?.id === id} error={ permissions.includes('read') && user_has_access ? undefined