Selaa lähdekoodia

Removes avatarURL from settings UI.

Removes storing avatarURL in localstorage and retrieving it.
j8
damencho 8 vuotta sitten
vanhempi
commit
0e27f471f1

+ 0
- 19
conference.js Näytä tiedosto

@@ -316,23 +316,6 @@ function changeLocalEmail(email = '') {
316 316
     sendData(commands.EMAIL, email);
317 317
 }
318 318
 
319
-
320
-/**
321
- * Changes the local avatar url for the local user
322
- * @param avatarUrl {string} the new avatar url
323
- */
324
-function changeLocalAvatarUrl(avatarUrl = '') {
325
-    avatarUrl = avatarUrl.trim();
326
-
327
-    if (avatarUrl === APP.settings.getAvatarUrl()) {
328
-        return;
329
-    }
330
-
331
-    APP.settings.setAvatarUrl(avatarUrl);
332
-    APP.UI.setUserAvatarUrl(room.myUserId(), avatarUrl);
333
-    sendData(commands.AVATAR_URL, avatarUrl);
334
-}
335
-
336 319
 /**
337 320
  * Changes the display name for the local user
338 321
  * @param nickname {string} the new display name
@@ -1269,8 +1252,6 @@ export default {
1269 1252
             APP.UI.setUserEmail(from, data.value);
1270 1253
         });
1271 1254
 
1272
-        APP.UI.addListener(UIEvents.AVATAR_URL_CHANGED, changeLocalAvatarUrl);
1273
-
1274 1255
         room.addCommandListener(this.commands.defaults.AVATAR_URL,
1275 1256
         (data, from) => {
1276 1257
             APP.UI.setUserAvatarUrl(from, data.value);

+ 1
- 2
lang/main.json Näytä tiedosto

@@ -119,8 +119,7 @@
119 119
         "selectAudioOutput": "Select audio output",
120 120
         "followMe": "Enable follow me",
121 121
         "noDevice": "None",
122
-        "noPermission": "Permission to use device is not granted",
123
-        "avatarUrl": "Avatar URL"
122
+        "noPermission": "Permission to use device is not granted"
124 123
     },
125 124
     "videothumbnail":
126 125
     {

+ 0
- 14
modules/UI/side_pannels/settings/SettingsMenu.js Näytä tiedosto

@@ -82,11 +82,6 @@ export default {
82 82
             emitter.emit(UIEvents.EMAIL_CHANGED, $('#setEmail').val());
83 83
         }
84 84
 
85
-        // AVATAR URL CHANGED
86
-        function updateAvatarUrl () {
87
-            emitter.emit(UIEvents.AVATAR_URL_CHANGED, $('#setAvatarUrl').val());
88
-        }
89
-
90 85
         $('#setEmail')
91 86
             .val(Settings.getEmail())
92 87
             .keyup(function (event) {
@@ -95,15 +90,6 @@ export default {
95 90
             }
96 91
         }).focusout(updateEmail);
97 92
 
98
-        $('#setAvatarUrl')
99
-            .val(Settings.getAvatarUrl())
100
-            .keyup(function (event) {
101
-            if (event.keyCode === 13) { // enter
102
-                updateAvatarUrl();
103
-            }
104
-        }).focusout(updateAvatarUrl);
105
-
106
-
107 93
         // START MUTED
108 94
         $("#startMutedOptions").change(function () {
109 95
             let startAudioMuted = $("#startAudioMuted").is(":checked");

+ 0
- 3
modules/settings/Settings.js Näytä tiedosto

@@ -35,7 +35,6 @@ if (supportsLocalStorage()) {
35 35
     }
36 36
 
37 37
     email = UIUtil.unescapeHtml(window.localStorage.email || '');
38
-    avatarUrl = UIUtil.unescapeHtml(window.localStorage.avatarUrl || '');
39 38
     localFlipX = JSON.parse(window.localStorage.localFlipX || true);
40 39
     displayName = UIUtil.unescapeHtml(window.localStorage.displayname || '');
41 40
     language = window.localStorage.language;
@@ -106,7 +105,6 @@ export default {
106 105
      */
107 106
     setAvatarUrl: function (newAvatarUrl) {
108 107
         avatarUrl = newAvatarUrl;
109
-        window.localStorage.avatarUrl = UIUtil.escapeHtml(newAvatarUrl);
110 108
     },
111 109
 
112 110
     /**
@@ -117,7 +115,6 @@ export default {
117 115
         return avatarUrl;
118 116
     },
119 117
 
120
-
121 118
     getLanguage () {
122 119
         return language;
123 120
     },

+ 0
- 4
service/UI/UIEvents.js Näytä tiedosto

@@ -14,10 +14,6 @@ export default {
14 14
      * Notifies that local user changed email.
15 15
      */
16 16
     EMAIL_CHANGED: "UI.email_changed",
17
-    /**
18
-     * Notifies that local user changed avatar url.
19
-     */
20
-    AVATAR_URL_CHANGED: "UI.avatar_url_changed",
21 17
     /**
22 18
      * Notifies that "start muted" settings changed.
23 19
      */

Loading…
Peruuta
Tallenna