Browse Source

fix(e2ee) show entire content at all times

master
Saúl Ibarra Corretgé 3 years ago
parent
commit
cd5f2b483f
2 changed files with 5 additions and 60 deletions
  1. 0
    8
      css/_e2ee.scss
  2. 5
    52
      react/features/e2ee/components/E2EESection.js

+ 0
- 8
css/_e2ee.scss View File

5
     .description {
5
     .description {
6
         font-size: 13px;
6
         font-size: 13px;
7
         margin: 15px 0;
7
         margin: 15px 0;
8
-
9
-        .read-more {
10
-            cursor: pointer;
11
-            opacity: .9;
12
-            color: #fff;
13
-            font-size: 0.8rem;
14
-            font-weight: bold;
15
-        }
16
     }
8
     }
17
 
9
 
18
     .control-row {
10
     .control-row {

+ 5
- 52
react/features/e2ee/components/E2EESection.js View File

78
         super(props);
78
         super(props);
79
 
79
 
80
         this.state = {
80
         this.state = {
81
-            enabled: false,
82
-            expand: false
81
+            enabled: false
83
         };
82
         };
84
 
83
 
85
         // Bind event handlers so they are only bound once for every instance.
84
         // Bind event handlers so they are only bound once for every instance.
86
-        this._onExpand = this._onExpand.bind(this);
87
-        this._onExpandKeyPress = this._onExpandKeyPress.bind(this);
88
         this._onToggle = this._onToggle.bind(this);
85
         this._onToggle = this._onToggle.bind(this);
89
     }
86
     }
90
 
87
 
96
      */
93
      */
97
     render() {
94
     render() {
98
         const { _everyoneSupportE2EE, t } = this.props;
95
         const { _everyoneSupportE2EE, t } = this.props;
99
-        const { enabled, expand } = this.state;
96
+        const { enabled } = this.state;
100
         const description = t('dialog.e2eeDescription');
97
         const description = t('dialog.e2eeDescription');
101
 
98
 
102
         return (
99
         return (
105
                     aria-live = 'polite'
102
                     aria-live = 'polite'
106
                     className = 'description'
103
                     className = 'description'
107
                     id = 'e2ee-section-description'>
104
                     id = 'e2ee-section-description'>
108
-                    { expand && description }
109
-                    { !expand && description.substring(0, 100) }
110
-                    { !expand && <span
111
-                        aria-controls = 'e2ee-section-description'
112
-                        aria-expanded = { expand }
113
-                        className = 'read-more'
114
-                        onClick = { this._onExpand }
115
-                        onKeyPress = { this._onExpandKeyPress }
116
-                        role = 'button'
117
-                        tabIndex = { 0 }>
118
-                            ... { t('dialog.readMore') }
119
-                    </span> }
105
+                    { description }
106
+                    { !_everyoneSupportE2EE && <br /> }
107
+                    { !_everyoneSupportE2EE && t('dialog.e2eeWarning') }
120
                 </p>
108
                 </p>
121
-                {
122
-                    !_everyoneSupportE2EE
123
-                        && <span className = 'warning'>
124
-                            { t('dialog.e2eeWarning') }
125
-                        </span>
126
-                }
127
                 <div className = 'control-row'>
109
                 <div className = 'control-row'>
128
                     <label htmlFor = 'e2ee-section-switch'>
110
                     <label htmlFor = 'e2ee-section-switch'>
129
                         { t('dialog.e2eeLabel') }
111
                         { t('dialog.e2eeLabel') }
137
         );
119
         );
138
     }
120
     }
139
 
121
 
140
-    _onExpand: () => void;
141
-
142
-    /**
143
-     * Callback to be invoked when the description is expanded.
144
-     *
145
-     * @returns {void}
146
-     */
147
-    _onExpand() {
148
-        this.setState({
149
-            expand: true
150
-        });
151
-    }
152
-
153
-    _onExpandKeyPress: (Object) => void;
154
-
155
-    /**
156
-     * KeyPress handler for accessibility.
157
-     *
158
-     * @param {Object} e - The key event to handle.
159
-     *
160
-     * @returns {void}
161
-     */
162
-    _onExpandKeyPress(e) {
163
-        if (e.key === ' ' || e.key === 'Enter') {
164
-            e.preventDefault();
165
-            this._onExpand();
166
-        }
167
-    }
168
-
169
     _onToggle: () => void;
122
     _onToggle: () => void;
170
 
123
 
171
     /**
124
     /**

Loading…
Cancel
Save