浏览代码

Reorg notifications feature files

j8
Bettenbuk Zoltan 6 年前
父节点
当前提交
10e951c17c

+ 2
- 0
react/features/notifications/actionTypes.js 查看文件

1
+// @flow
2
+
1
 /**
3
 /**
2
  * The type of (redux) action which signals that all the stored notifications
4
  * The type of (redux) action which signals that all the stored notifications
3
  * need to be cleared.
5
  * need to be cleared.

+ 3
- 0
react/features/notifications/components/index.native.js 查看文件

1
+// @flow
2
+
3
+export * from './native';

+ 3
- 0
react/features/notifications/components/index.web.js 查看文件

1
+// @flow
2
+
3
+export * from './web';

react/features/notifications/components/Notification.native.js → react/features/notifications/components/native/Notification.js 查看文件

3
 import React from 'react';
3
 import React from 'react';
4
 import { Text, TouchableOpacity, View } from 'react-native';
4
 import { Text, TouchableOpacity, View } from 'react-native';
5
 
5
 
6
-import { Icon } from '../../base/font-icons';
7
-import { translate } from '../../base/i18n';
6
+import { Icon } from '../../../base/font-icons';
7
+import { translate } from '../../../base/i18n';
8
 
8
 
9
 import AbstractNotification, {
9
 import AbstractNotification, {
10
     type Props
10
     type Props
11
-} from './AbstractNotification';
11
+} from '../AbstractNotification';
12
+
12
 import styles from './styles';
13
 import styles from './styles';
13
 
14
 
14
 /**
15
 /**

react/features/notifications/components/NotificationsContainer.native.js → react/features/notifications/components/native/NotificationsContainer.js 查看文件

3
 import React from 'react';
3
 import React from 'react';
4
 import { View } from 'react-native';
4
 import { View } from 'react-native';
5
 
5
 
6
-import { connect } from '../../base/redux';
6
+import { connect } from '../../../base/redux';
7
 
7
 
8
 import AbstractNotificationsContainer, {
8
 import AbstractNotificationsContainer, {
9
     _abstractMapStateToProps,
9
     _abstractMapStateToProps,
10
     type Props as AbstractProps
10
     type Props as AbstractProps
11
-} from './AbstractNotificationsContainer';
11
+} from '../AbstractNotificationsContainer';
12
+
12
 import Notification from './Notification';
13
 import Notification from './Notification';
13
 import styles from './styles';
14
 import styles from './styles';
14
 
15
 

react/features/notifications/components/index.js → react/features/notifications/components/native/index.js 查看文件

1
+// @flow
2
+
1
 export { default as Notification } from './Notification';
3
 export { default as Notification } from './Notification';
2
 export { default as NotificationsContainer } from './NotificationsContainer';
4
 export { default as NotificationsContainer } from './NotificationsContainer';

react/features/notifications/components/styles.js → react/features/notifications/components/native/styles.js 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
-import { BoxModel, createStyleSheet, ColorPalette } from '../../base/styles';
3
+import { BoxModel, ColorPalette } from '../../../base/styles';
4
 
4
 
5
 /**
5
 /**
6
  * The styles of the React {@code Components} of the feature notifications.
6
  * The styles of the React {@code Components} of the feature notifications.
7
  */
7
  */
8
-export default createStyleSheet({
8
+export default {
9
 
9
 
10
     /**
10
     /**
11
      * The content (left) column of the notification.
11
      * The content (left) column of the notification.
58
     notificationContent: {
58
     notificationContent: {
59
         flexDirection: 'column'
59
         flexDirection: 'column'
60
     }
60
     }
61
-});
61
+};

react/features/notifications/components/Notification.web.js → react/features/notifications/components/web/Notification.js 查看文件

7
 import { colors } from '@atlaskit/theme';
7
 import { colors } from '@atlaskit/theme';
8
 import React from 'react';
8
 import React from 'react';
9
 
9
 
10
-import { translate } from '../../base/i18n';
10
+import { translate } from '../../../base/i18n';
11
 
11
 
12
-import { NOTIFICATION_TYPE } from '../constants';
12
+import { NOTIFICATION_TYPE } from '../../constants';
13
 
13
 
14
 import AbstractNotification, {
14
 import AbstractNotification, {
15
     type Props
15
     type Props
16
-} from './AbstractNotification';
16
+} from '../AbstractNotification';
17
 
17
 
18
 declare var interfaceConfig: Object;
18
 declare var interfaceConfig: Object;
19
 
19
 

react/features/notifications/components/NotificationsContainer.web.js → react/features/notifications/components/web/NotificationsContainer.js 查看文件

3
 import { FlagGroup } from '@atlaskit/flag';
3
 import { FlagGroup } from '@atlaskit/flag';
4
 import React from 'react';
4
 import React from 'react';
5
 
5
 
6
-import { connect } from '../../base/redux';
6
+import { connect } from '../../../base/redux';
7
 
7
 
8
 import AbstractNotificationsContainer, {
8
 import AbstractNotificationsContainer, {
9
     _abstractMapStateToProps as _mapStateToProps,
9
     _abstractMapStateToProps as _mapStateToProps,
10
     type Props
10
     type Props
11
-} from './AbstractNotificationsContainer';
11
+} from '../AbstractNotificationsContainer';
12
+
12
 import Notification from './Notification';
13
 import Notification from './Notification';
13
 
14
 
14
 /**
15
 /**

+ 4
- 0
react/features/notifications/components/web/index.js 查看文件

1
+// @flow
2
+
3
+export { default as Notification } from './Notification';
4
+export { default as NotificationsContainer } from './NotificationsContainer';

+ 2
- 0
react/features/notifications/constants.js 查看文件

1
+// @flow
2
+
1
 /**
3
 /**
2
  * The set of possible notification types.
4
  * The set of possible notification types.
3
  *
5
  *

+ 3
- 1
react/features/notifications/functions.js 查看文件

1
+// @flow
2
+
1
 import { toState } from '../base/redux';
3
 import { toState } from '../base/redux';
2
 
4
 
3
 /**
5
 /**
7
  * @param {Object|Function} stateful - The redux store state.
9
  * @param {Object|Function} stateful - The redux store state.
8
  * @returns {boolean}
10
  * @returns {boolean}
9
  */
11
  */
10
-export function areThereNotifications(stateful) {
12
+export function areThereNotifications(stateful: Object | Function) {
11
     const state = toState(stateful);
13
     const state = toState(stateful);
12
     const { enabled, notifications } = state['features/notifications'];
14
     const { enabled, notifications } = state['features/notifications'];
13
 
15
 

+ 2
- 0
react/features/notifications/index.js 查看文件

1
+// @flow
2
+
1
 export * from './actions';
3
 export * from './actions';
2
 export * from './actionTypes';
4
 export * from './actionTypes';
3
 export * from './components';
5
 export * from './components';

+ 2
- 0
react/features/notifications/reducer.js 查看文件

1
+// @flow
2
+
1
 import { ReducerRegistry } from '../base/redux';
3
 import { ReducerRegistry } from '../base/redux';
2
 
4
 
3
 import {
5
 import {

正在加载...
取消
保存