Compare commits

...

1 Commits

Author SHA1 Message Date
Ahtisham Shahid
96fccd3afc feat: Cleanup of notification pref UI 2024-05-22 14:15:38 +05:00
3 changed files with 2 additions and 25 deletions

View File

@@ -39,23 +39,15 @@ const NotificationPreferenceApp = ({ appId }) => {
<Collapsible.Advanced
open={appToggle}
data-testid={`${appId}-app`}
className={classNames({ 'mb-5': !mobileView && appToggle })}
className={classNames({ 'mb-1': !mobileView && appToggle })}
>
<Collapsible.Trigger>
<div className="d-flex align-items-center">
<span className="mr-auto preference-app font-weight-bold">
{intl.formatMessage(messages.notificationAppTitle, { key: appId })}
</span>
<span className="d-flex" id={`${appId}-app-toggle`}>
<ToggleSwitch
name={appId}
value={appToggle}
onChange={onChangeAppSettings}
disabled={updatePreferencesStatus === LOADING_STATUS}
/>
</span>
</div>
{!mobileView && <hr className="border-light-400 my-4" />}
</Collapsible.Trigger>
<Collapsible.Body>
<div className="d-flex flex-row justify-content-between">

View File

@@ -89,20 +89,6 @@ const NotificationPreferenceColumn = ({ appId, channel, appPreference }) => {
return (
<div className={classNames('d-flex flex-column border-right channel-column')}>
{!hideAppPreferences && (
<NavItem
id={channel}
key={channel}
role="button"
onClick={onChannelToggle}
className={classNames('mb-3 header-label column-padding', {
'pr-0': channel === NOTIFICATION_CHANNELS[NOTIFICATION_CHANNELS.length - 1],
'pl-0': channel === 'web' && mobileView,
})}
>
{intl.formatMessage(messages.notificationChannel, { text: channel })}
</NavItem>
)}
{appPreference
? renderPreference(appPreference)
: appPreferences.map((preference) => (renderPreference(preference)))}

View File

@@ -23,7 +23,6 @@ const NotificationTypes = ({ appId }) => {
return (
<div className="d-flex flex-column mr-auto px-0">
{!mobileView && !hideAppPreferences && <span className="mb-3 header-label">{intl.formatMessage(messages.typeLabel)}</span>}
{preferences.map(preference => (
(preference?.coreNotificationTypes?.length > 0 || preference.id !== 'core') && (
<>