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
     sendData(commands.EMAIL, email);
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
  * Changes the display name for the local user
320
  * Changes the display name for the local user
338
  * @param nickname {string} the new display name
321
  * @param nickname {string} the new display name
1269
             APP.UI.setUserEmail(from, data.value);
1252
             APP.UI.setUserEmail(from, data.value);
1270
         });
1253
         });
1271
 
1254
 
1272
-        APP.UI.addListener(UIEvents.AVATAR_URL_CHANGED, changeLocalAvatarUrl);
1273
-
1274
         room.addCommandListener(this.commands.defaults.AVATAR_URL,
1255
         room.addCommandListener(this.commands.defaults.AVATAR_URL,
1275
         (data, from) => {
1256
         (data, from) => {
1276
             APP.UI.setUserAvatarUrl(from, data.value);
1257
             APP.UI.setUserAvatarUrl(from, data.value);

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

119
         "selectAudioOutput": "Select audio output",
119
         "selectAudioOutput": "Select audio output",
120
         "followMe": "Enable follow me",
120
         "followMe": "Enable follow me",
121
         "noDevice": "None",
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
     "videothumbnail":
124
     "videothumbnail":
126
     {
125
     {

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

82
             emitter.emit(UIEvents.EMAIL_CHANGED, $('#setEmail').val());
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
         $('#setEmail')
85
         $('#setEmail')
91
             .val(Settings.getEmail())
86
             .val(Settings.getEmail())
92
             .keyup(function (event) {
87
             .keyup(function (event) {
95
             }
90
             }
96
         }).focusout(updateEmail);
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
         // START MUTED
93
         // START MUTED
108
         $("#startMutedOptions").change(function () {
94
         $("#startMutedOptions").change(function () {
109
             let startAudioMuted = $("#startAudioMuted").is(":checked");
95
             let startAudioMuted = $("#startAudioMuted").is(":checked");

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

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

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

14
      * Notifies that local user changed email.
14
      * Notifies that local user changed email.
15
      */
15
      */
16
     EMAIL_CHANGED: "UI.email_changed",
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
      * Notifies that "start muted" settings changed.
18
      * Notifies that "start muted" settings changed.
23
      */
19
      */

Loading…
Peruuta
Tallenna