|
|
@ -14,15 +14,17 @@ export default function UpdateSnapPermissionList({ |
|
|
|
const t = useI18nContext(); |
|
|
|
const t = useI18nContext(); |
|
|
|
|
|
|
|
|
|
|
|
const ApprovedPermissions = () => { |
|
|
|
const ApprovedPermissions = () => { |
|
|
|
return Object.keys(approvedPermissions).map((approvedPermission) => { |
|
|
|
return Object.entries(approvedPermissions).map( |
|
|
|
|
|
|
|
([permissionName, permissionValue]) => { |
|
|
|
const { label, rightIcon } = getPermissionDescription( |
|
|
|
const { label, rightIcon } = getPermissionDescription( |
|
|
|
t, |
|
|
|
t, |
|
|
|
approvedPermission, |
|
|
|
permissionName, |
|
|
|
|
|
|
|
permissionValue, |
|
|
|
); |
|
|
|
); |
|
|
|
const { date } = approvedPermissions[approvedPermission]; |
|
|
|
const { date } = permissionValue; |
|
|
|
const formattedDate = formatDate(date, 'yyyy-MM-dd'); |
|
|
|
const formattedDate = formatDate(date, 'yyyy-MM-dd'); |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="approved-permission" key={approvedPermission}> |
|
|
|
<div className="approved-permission" key={permissionName}> |
|
|
|
<i className="fas fa-check" /> |
|
|
|
<i className="fas fa-check" /> |
|
|
|
<div className="permission-description"> |
|
|
|
<div className="permission-description"> |
|
|
|
{label} |
|
|
|
{label} |
|
|
@ -37,17 +39,20 @@ export default function UpdateSnapPermissionList({ |
|
|
|
{rightIcon && <i className={rightIcon} />} |
|
|
|
{rightIcon && <i className={rightIcon} />} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const RevokedPermissions = () => { |
|
|
|
const RevokedPermissions = () => { |
|
|
|
return Object.keys(revokedPermissions).map((revokedPermission) => { |
|
|
|
return Object.entries(revokedPermissions).map( |
|
|
|
|
|
|
|
([permissionName, permissionValue]) => { |
|
|
|
const { label, rightIcon } = getPermissionDescription( |
|
|
|
const { label, rightIcon } = getPermissionDescription( |
|
|
|
t, |
|
|
|
t, |
|
|
|
revokedPermission, |
|
|
|
permissionName, |
|
|
|
|
|
|
|
permissionValue, |
|
|
|
); |
|
|
|
); |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="revoked-permission" key={revokedPermission}> |
|
|
|
<div className="revoked-permission" key={permissionName}> |
|
|
|
<i className="fas fa-x" /> |
|
|
|
<i className="fas fa-x" /> |
|
|
|
<div className="permission-description"> |
|
|
|
<div className="permission-description"> |
|
|
|
{label} |
|
|
|
{label} |
|
|
@ -62,14 +67,20 @@ export default function UpdateSnapPermissionList({ |
|
|
|
{rightIcon && <i className={rightIcon} />} |
|
|
|
{rightIcon && <i className={rightIcon} />} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const NewPermissions = () => { |
|
|
|
const NewPermissions = () => { |
|
|
|
return Object.keys(newPermissions).map((newPermission) => { |
|
|
|
return Object.entries(newPermissions).map( |
|
|
|
const { label, rightIcon } = getPermissionDescription(t, newPermission); |
|
|
|
([permissionName, permissionValue]) => { |
|
|
|
|
|
|
|
const { label, rightIcon } = getPermissionDescription( |
|
|
|
|
|
|
|
t, |
|
|
|
|
|
|
|
permissionName, |
|
|
|
|
|
|
|
permissionValue, |
|
|
|
|
|
|
|
); |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="new-permission" key={newPermission}> |
|
|
|
<div className="new-permission" key={permissionName}> |
|
|
|
<i className="fas fa-arrow-right" /> |
|
|
|
<i className="fas fa-arrow-right" /> |
|
|
|
<div className="permission-description"> |
|
|
|
<div className="permission-description"> |
|
|
|
{label} |
|
|
|
{label} |
|
|
@ -84,7 +95,8 @@ export default function UpdateSnapPermissionList({ |
|
|
|
{rightIcon && <i className={rightIcon} />} |
|
|
|
{rightIcon && <i className={rightIcon} />} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|