The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/startup/deviceManagement.ts

33 lines
911 B

import { lazy } from 'react';
import { onToggledFeature } from '../lib/onToggledFeature';
import { registerAccountRoute, registerAccountSidebarItem, unregisterSidebarItem } from '../views/account';
declare module '@rocket.chat/ui-contexts' {
interface IRouterPaths {
'manage-devices': {
pathname: '/account/manage-devices';
pattern: '/account/manage-devices';
};
}
}
const [registerAccountRouter, unregisterAccountRouter] = registerAccountRoute('/manage-devices', {
name: 'manage-devices',
component: lazy(() => import('../views/account/deviceManagement/DeviceManagementAccountPage')),
});
onToggledFeature('device-management', {
up: () => {
registerAccountSidebarItem({
href: '/account/manage-devices',
i18nLabel: 'Manage_Devices',
icon: 'mobile',
});
registerAccountRouter();
},
down: () => {
unregisterSidebarItem('Manage_Devices');
unregisterAccountRouter();
},
});