Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3363608
D4045.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D4045.diff
View Options
diff --git a/web/modals/threads/notifications/notifications-option-info.react.js b/web/modals/threads/notifications/enum-settings-option-info.react.js
rename from web/modals/threads/notifications/notifications-option-info.react.js
rename to web/modals/threads/notifications/enum-settings-option-info.react.js
--- a/web/modals/threads/notifications/notifications-option-info.react.js
+++ b/web/modals/threads/notifications/enum-settings-option-info.react.js
@@ -11,7 +11,7 @@
+children: React.Node,
};
-function NotificationsOptionInfo(props: Props): React.Node {
+function EnumSettingsOptionInfo(props: Props): React.Node {
const { valid, children } = props;
const optionInfoClasses = React.useMemo(
@@ -34,4 +34,4 @@
);
}
-export default NotificationsOptionInfo;
+export default EnumSettingsOptionInfo;
diff --git a/web/modals/threads/notifications/notifications-option.react.js b/web/modals/threads/notifications/enum-settings-option.react.js
rename from web/modals/threads/notifications/notifications-option.react.js
rename to web/modals/threads/notifications/enum-settings-option.react.js
--- a/web/modals/threads/notifications/notifications-option.react.js
+++ b/web/modals/threads/notifications/enum-settings-option.react.js
@@ -4,8 +4,8 @@
import * as React from 'react';
import Radio from '../../../components/radio.react';
+import EnumSettingsOptionInfo from './enum-settings-option-info.react';
import css from './notifications-modal.css';
-import NotificationsOptionInfo from './notifications-option-info.react';
type Props = {
+selected: boolean,
@@ -15,15 +15,15 @@
+description: $ReadOnlyArray<[string, boolean]>,
};
-function NotificationsOption(props: Props): React.Node {
+function EnumSettingsOption(props: Props): React.Node {
const { icon, title, description, selected, onSelect } = props;
const descriptionItems = React.useMemo(
() =>
description.map(([text, isValid]) => (
- <NotificationsOptionInfo key={text} valid={isValid}>
+ <EnumSettingsOptionInfo key={text} valid={isValid}>
{text}
- </NotificationsOptionInfo>
+ </EnumSettingsOptionInfo>
)),
[description],
);
@@ -47,4 +47,4 @@
);
}
-export default NotificationsOption;
+export default EnumSettingsOption;
diff --git a/web/modals/threads/notifications/notifications-modal.react.js b/web/modals/threads/notifications/notifications-modal.react.js
--- a/web/modals/threads/notifications/notifications-modal.react.js
+++ b/web/modals/threads/notifications/notifications-modal.react.js
@@ -16,8 +16,8 @@
import { useSelector } from '../../../redux/redux-utils';
import SWMansionIcon from '../../../SWMansionIcon.react';
import Modal from '../../modal.react';
+import EnumSettingsOption from './enum-settings-option.react';
import css from './notifications-modal.css';
-import NotificationsOption from './notifications-option.react';
type NotificationSettings = 'focused' | 'badge-only' | 'background';
@@ -76,7 +76,7 @@
/>
);
return (
- <NotificationsOption
+ <EnumSettingsOption
selected={isFocusedSelected}
title="Focused (enabled)"
description={description}
@@ -101,7 +101,7 @@
/>
);
return (
- <NotificationsOption
+ <EnumSettingsOption
selected={isFocusedBadgeOnlySelected}
title="Focused (badge only)"
description={description}
@@ -126,7 +126,7 @@
/>
);
return (
- <NotificationsOption
+ <EnumSettingsOption
selected={isBackgroundSelected}
title="Background"
description={description}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 2:42 AM (22 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2582155
Default Alt Text
D4045.diff (3 KB)
Attached To
Mode
D4045: [web] Rename `NotificationsOption` -> `EnumSettingsOption`
Attached
Detach File
Event Timeline
Log In to Comment