feat(AppConfig): iterate how apps are managed

- auth clients are always shared, cannot be disabled
- custom connections are enabled by default, can be disabled
- any existing connections can be reconnected regardless of its AppConfig or AppAuthClient states
This commit is contained in:
Ali BARIN
2024-12-09 17:46:51 +00:00
parent 00e80f1fba
commit a57134a89c
48 changed files with 192 additions and 563 deletions

View File

@@ -11,14 +11,7 @@ import { useQueryClient } from '@tanstack/react-query';
import Can from 'components/Can';
function ContextMenu(props) {
const {
appKey,
connection,
onClose,
onMenuItemClick,
anchorEl,
disableReconnection,
} = props;
const { appKey, connection, onClose, onMenuItemClick, anchorEl } = props;
const formatMessage = useFormatMessage();
const queryClient = useQueryClient();
@@ -73,7 +66,7 @@ function ContextMenu(props) {
{(allowed) => (
<MenuItem
component={Link}
disabled={!allowed || disableReconnection}
disabled={!allowed}
to={URLS.APP_RECONNECT_CONNECTION(
appKey,
connection.id,
@@ -109,7 +102,6 @@ ContextMenu.propTypes = {
PropTypes.func,
PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
]),
disableReconnection: PropTypes.bool.isRequired,
};
export default ContextMenu;