Removes avatarURL from settings UI.
Removes storing avatarURL in localstorage and retrieving it.
This commit is contained in:
parent
ba477ad720
commit
0e27f471f1
|
@ -316,23 +316,6 @@ function changeLocalEmail(email = '') {
|
||||||
sendData(commands.EMAIL, email);
|
sendData(commands.EMAIL, email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Changes the local avatar url for the local user
|
|
||||||
* @param avatarUrl {string} the new avatar url
|
|
||||||
*/
|
|
||||||
function changeLocalAvatarUrl(avatarUrl = '') {
|
|
||||||
avatarUrl = avatarUrl.trim();
|
|
||||||
|
|
||||||
if (avatarUrl === APP.settings.getAvatarUrl()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
APP.settings.setAvatarUrl(avatarUrl);
|
|
||||||
APP.UI.setUserAvatarUrl(room.myUserId(), avatarUrl);
|
|
||||||
sendData(commands.AVATAR_URL, avatarUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes the display name for the local user
|
* Changes the display name for the local user
|
||||||
* @param nickname {string} the new display name
|
* @param nickname {string} the new display name
|
||||||
|
@ -1269,8 +1252,6 @@ export default {
|
||||||
APP.UI.setUserEmail(from, data.value);
|
APP.UI.setUserEmail(from, data.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
APP.UI.addListener(UIEvents.AVATAR_URL_CHANGED, changeLocalAvatarUrl);
|
|
||||||
|
|
||||||
room.addCommandListener(this.commands.defaults.AVATAR_URL,
|
room.addCommandListener(this.commands.defaults.AVATAR_URL,
|
||||||
(data, from) => {
|
(data, from) => {
|
||||||
APP.UI.setUserAvatarUrl(from, data.value);
|
APP.UI.setUserAvatarUrl(from, data.value);
|
||||||
|
|
|
@ -119,8 +119,7 @@
|
||||||
"selectAudioOutput": "Select audio output",
|
"selectAudioOutput": "Select audio output",
|
||||||
"followMe": "Enable follow me",
|
"followMe": "Enable follow me",
|
||||||
"noDevice": "None",
|
"noDevice": "None",
|
||||||
"noPermission": "Permission to use device is not granted",
|
"noPermission": "Permission to use device is not granted"
|
||||||
"avatarUrl": "Avatar URL"
|
|
||||||
},
|
},
|
||||||
"videothumbnail":
|
"videothumbnail":
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,11 +82,6 @@ export default {
|
||||||
emitter.emit(UIEvents.EMAIL_CHANGED, $('#setEmail').val());
|
emitter.emit(UIEvents.EMAIL_CHANGED, $('#setEmail').val());
|
||||||
}
|
}
|
||||||
|
|
||||||
// AVATAR URL CHANGED
|
|
||||||
function updateAvatarUrl () {
|
|
||||||
emitter.emit(UIEvents.AVATAR_URL_CHANGED, $('#setAvatarUrl').val());
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#setEmail')
|
$('#setEmail')
|
||||||
.val(Settings.getEmail())
|
.val(Settings.getEmail())
|
||||||
.keyup(function (event) {
|
.keyup(function (event) {
|
||||||
|
@ -95,15 +90,6 @@ export default {
|
||||||
}
|
}
|
||||||
}).focusout(updateEmail);
|
}).focusout(updateEmail);
|
||||||
|
|
||||||
$('#setAvatarUrl')
|
|
||||||
.val(Settings.getAvatarUrl())
|
|
||||||
.keyup(function (event) {
|
|
||||||
if (event.keyCode === 13) { // enter
|
|
||||||
updateAvatarUrl();
|
|
||||||
}
|
|
||||||
}).focusout(updateAvatarUrl);
|
|
||||||
|
|
||||||
|
|
||||||
// START MUTED
|
// START MUTED
|
||||||
$("#startMutedOptions").change(function () {
|
$("#startMutedOptions").change(function () {
|
||||||
let startAudioMuted = $("#startAudioMuted").is(":checked");
|
let startAudioMuted = $("#startAudioMuted").is(":checked");
|
||||||
|
|
|
@ -35,7 +35,6 @@ if (supportsLocalStorage()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
email = UIUtil.unescapeHtml(window.localStorage.email || '');
|
email = UIUtil.unescapeHtml(window.localStorage.email || '');
|
||||||
avatarUrl = UIUtil.unescapeHtml(window.localStorage.avatarUrl || '');
|
|
||||||
localFlipX = JSON.parse(window.localStorage.localFlipX || true);
|
localFlipX = JSON.parse(window.localStorage.localFlipX || true);
|
||||||
displayName = UIUtil.unescapeHtml(window.localStorage.displayname || '');
|
displayName = UIUtil.unescapeHtml(window.localStorage.displayname || '');
|
||||||
language = window.localStorage.language;
|
language = window.localStorage.language;
|
||||||
|
@ -106,7 +105,6 @@ export default {
|
||||||
*/
|
*/
|
||||||
setAvatarUrl: function (newAvatarUrl) {
|
setAvatarUrl: function (newAvatarUrl) {
|
||||||
avatarUrl = newAvatarUrl;
|
avatarUrl = newAvatarUrl;
|
||||||
window.localStorage.avatarUrl = UIUtil.escapeHtml(newAvatarUrl);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,7 +115,6 @@ export default {
|
||||||
return avatarUrl;
|
return avatarUrl;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
getLanguage () {
|
getLanguage () {
|
||||||
return language;
|
return language;
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,10 +14,6 @@ export default {
|
||||||
* Notifies that local user changed email.
|
* Notifies that local user changed email.
|
||||||
*/
|
*/
|
||||||
EMAIL_CHANGED: "UI.email_changed",
|
EMAIL_CHANGED: "UI.email_changed",
|
||||||
/**
|
|
||||||
* Notifies that local user changed avatar url.
|
|
||||||
*/
|
|
||||||
AVATAR_URL_CHANGED: "UI.avatar_url_changed",
|
|
||||||
/**
|
/**
|
||||||
* Notifies that "start muted" settings changed.
|
* Notifies that "start muted" settings changed.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue