Преглед изворни кода

Remove primary toolbar splitter (#1811)

j8
yanas пре 8 година
родитељ
комит
b0ffe2e63f

+ 0
- 1
css/themes/_light.scss Прегледај датотеку

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

+ 0
- 6
interface_config.js Прегледај датотеку

@@ -27,12 +27,6 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
27 27
      * If we should show authentication block in profile
28 28
      */
29 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 31
      * the toolbar buttons line is intentionally left in one line, to be able
38 32
      * to easily override values or remove them using regex

+ 0
- 24
react/features/toolbox/components/PrimaryToolbar.web.js Прегледај датотеку

@@ -30,28 +30,6 @@ class PrimaryToolbar extends Component {
30 30
 
31 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 34
      * Renders primary toolbar component.
57 35
      *
@@ -67,7 +45,6 @@ class PrimaryToolbar extends Component {
67 45
             return null;
68 46
         }
69 47
 
70
-        const { splitterIndex } = this.state;
71 48
         const { primaryToolbarClassName } = getToolbarClassNames(this.props);
72 49
         const tooltipPosition
73 50
             = interfaceConfig.filmStripOnly ? 'left' : 'bottom';
@@ -75,7 +52,6 @@ class PrimaryToolbar extends Component {
75 52
         return (
76 53
             <Toolbar
77 54
                 className = { primaryToolbarClassName }
78
-                splitterIndex = { splitterIndex }
79 55
                 toolbarButtons = { _primaryToolbarButtons }
80 56
                 tooltipPosition = { tooltipPosition } />
81 57
         );

+ 4
- 17
react/features/toolbox/components/Toolbar.web.js Прегледај датотеку

@@ -44,12 +44,6 @@ class Toolbar extends Component {
44 44
          */
45 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 48
          * Map with toolbar buttons.
55 49
          */
@@ -105,12 +99,11 @@ class Toolbar extends Component {
105 99
      * @param {Array} acc - Toolbar buttons array.
106 100
      * @param {Array} keyValuePair - Key value pair containing button and its
107 101
      * key.
108
-     * @param {number} index - Index of the key value pair in the array.
109 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 107
         const [ key, button ] = keyValuePair;
115 108
 
116 109
         if (button.component) {
@@ -123,13 +116,7 @@ class Toolbar extends Component {
123 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 121
         const { onClick, onMount, onUnmount } = button;
135 122
 

Loading…
Откажи
Сачувај