瀏覽代碼

Remove primary toolbar splitter (#1811)

j8
yanas 8 年之前
父節點
當前提交
b0ffe2e63f

+ 0
- 1
css/themes/_light.scss 查看文件

94
 $secondaryToolbarBg: rgba(0, 0, 0, 0.5);
94
 $secondaryToolbarBg: rgba(0, 0, 0, 0.5);
95
 // TOFIX: Once moved to react rename to match the side panel class name.
95
 // TOFIX: Once moved to react rename to match the side panel class name.
96
 $sideToolbarContainerBg: rgba(0, 0, 0, 0.75);
96
 $sideToolbarContainerBg: rgba(0, 0, 0, 0.75);
97
-$splitterColor: #ccc;
98
 $toolbarBackground: rgba(0, 0, 0, 0.5);
97
 $toolbarBackground: rgba(0, 0, 0, 0.5);
99
 $toolbarBadgeBackground: #165ECC;
98
 $toolbarBadgeBackground: #165ECC;
100
 $toolbarBadgeColor: #FFFFFF;
99
 $toolbarBadgeColor: #FFFFFF;

+ 0
- 6
interface_config.js 查看文件

27
      * If we should show authentication block in profile
27
      * If we should show authentication block in profile
28
      */
28
      */
29
     AUTHENTICATION_ENABLE: true,
29
     AUTHENTICATION_ENABLE: true,
30
-    /**
31
-     * The index of the splitter button in the main toolbar. The splitter
32
-     * button is a button in the toolbar that will be applied a special styling
33
-     * visually dividing the toolbar buttons.
34
-     */
35
-    //MAIN_TOOLBAR_SPLITTER_INDEX: -1,
36
     /**
30
     /**
37
      * the toolbar buttons line is intentionally left in one line, to be able
31
      * the toolbar buttons line is intentionally left in one line, to be able
38
      * to easily override values or remove them using regex
32
      * to easily override values or remove them using regex

+ 0
- 24
react/features/toolbox/components/PrimaryToolbar.web.js 查看文件

30
 
30
 
31
     state: Object;
31
     state: Object;
32
 
32
 
33
-    /**
34
-     * Constructs instance of primary toolbar React component.
35
-     *
36
-     * @param {Object} props - React component's properties.
37
-     */
38
-    constructor(props) {
39
-        super(props);
40
-
41
-        const splitterIndex = interfaceConfig.MAIN_TOOLBAR_SPLITTER_INDEX;
42
-
43
-        this.state = {
44
-
45
-            /**
46
-             * If deployment supports toolbar splitter this value contains its
47
-             * index.
48
-             *
49
-             * @type {number}
50
-             */
51
-            splitterIndex
52
-        };
53
-    }
54
-
55
     /**
33
     /**
56
      * Renders primary toolbar component.
34
      * Renders primary toolbar component.
57
      *
35
      *
67
             return null;
45
             return null;
68
         }
46
         }
69
 
47
 
70
-        const { splitterIndex } = this.state;
71
         const { primaryToolbarClassName } = getToolbarClassNames(this.props);
48
         const { primaryToolbarClassName } = getToolbarClassNames(this.props);
72
         const tooltipPosition
49
         const tooltipPosition
73
             = interfaceConfig.filmStripOnly ? 'left' : 'bottom';
50
             = interfaceConfig.filmStripOnly ? 'left' : 'bottom';
75
         return (
52
         return (
76
             <Toolbar
53
             <Toolbar
77
                 className = { primaryToolbarClassName }
54
                 className = { primaryToolbarClassName }
78
-                splitterIndex = { splitterIndex }
79
                 toolbarButtons = { _primaryToolbarButtons }
55
                 toolbarButtons = { _primaryToolbarButtons }
80
                 tooltipPosition = { tooltipPosition } />
56
                 tooltipPosition = { tooltipPosition } />
81
         );
57
         );

+ 4
- 17
react/features/toolbox/components/Toolbar.web.js 查看文件

44
          */
44
          */
45
         className: React.PropTypes.string,
45
         className: React.PropTypes.string,
46
 
46
 
47
-        /**
48
-         * If the toolbar requires splitter this property defines splitter
49
-         * index.
50
-         */
51
-        splitterIndex: React.PropTypes.number,
52
-
53
         /**
47
         /**
54
          * Map with toolbar buttons.
48
          * Map with toolbar buttons.
55
          */
49
          */
105
      * @param {Array} acc - Toolbar buttons array.
99
      * @param {Array} acc - Toolbar buttons array.
106
      * @param {Array} keyValuePair - Key value pair containing button and its
100
      * @param {Array} keyValuePair - Key value pair containing button and its
107
      * key.
101
      * key.
108
-     * @param {number} index - Index of the key value pair in the array.
109
      * @private
102
      * @private
110
-     * @returns {Array} Array of toolbar buttons and splitter if it's on.
103
+     * @returns {Array} Array of toolbar buttons.
111
      */
104
      */
112
-    _renderToolbarButton(acc: Array<*>, keyValuePair: Array<*>,
113
-                         index: number): Array<ReactElement<*>> {
105
+    _renderToolbarButton(acc: Array<*>,
106
+                         keyValuePair: Array<*>): Array<ReactElement<*>> {
114
         const [ key, button ] = keyValuePair;
107
         const [ key, button ] = keyValuePair;
115
 
108
 
116
         if (button.component) {
109
         if (button.component) {
123
             return acc;
116
             return acc;
124
         }
117
         }
125
 
118
 
126
-        const { splitterIndex, tooltipPosition } = this.props;
127
-
128
-        if (splitterIndex && index === splitterIndex) {
129
-            const splitter = <span className = 'toolbar__splitter' />;
130
-
131
-            acc.push(splitter);
132
-        }
119
+        const { tooltipPosition } = this.props;
133
 
120
 
134
         const { onClick, onMount, onUnmount } = button;
121
         const { onClick, onMount, onUnmount } = button;
135
 
122
 

Loading…
取消
儲存