mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-18 12:01:48 +03:00
remove prefixes as we're using data urls now
This commit is contained in:
parent
5ac5c056e3
commit
0c5c2501e6
1 changed files with 2 additions and 7 deletions
|
@ -259,7 +259,7 @@ class RoomPillPart extends PillPart {
|
||||||
"crop");
|
"crop");
|
||||||
if (!avatarUrl) {
|
if (!avatarUrl) {
|
||||||
initialLetter = Avatar.getInitialLetter(this._room ? this._room.name : this.resourceId);
|
initialLetter = Avatar.getInitialLetter(this._room ? this._room.name : this.resourceId);
|
||||||
avatarUrl = `../../${Avatar.defaultAvatarUrlForString(this._room ? this._room.roomId : this.resourceId)}`;
|
avatarUrl = Avatar.defaultAvatarUrlForString(this._room ? this._room.roomId : this.resourceId);
|
||||||
}
|
}
|
||||||
this._setAvatarVars(node, avatarUrl, initialLetter);
|
this._setAvatarVars(node, avatarUrl, initialLetter);
|
||||||
}
|
}
|
||||||
|
@ -291,18 +291,13 @@ class UserPillPart extends PillPart {
|
||||||
}
|
}
|
||||||
const name = this._member.name || this._member.userId;
|
const name = this._member.name || this._member.userId;
|
||||||
const defaultAvatarUrl = Avatar.defaultAvatarUrlForString(this._member.userId);
|
const defaultAvatarUrl = Avatar.defaultAvatarUrlForString(this._member.userId);
|
||||||
let avatarUrl = Avatar.avatarUrlForMember(
|
const avatarUrl = Avatar.avatarUrlForMember(
|
||||||
this._member,
|
this._member,
|
||||||
16 * window.devicePixelRatio,
|
16 * window.devicePixelRatio,
|
||||||
16 * window.devicePixelRatio,
|
16 * window.devicePixelRatio,
|
||||||
"crop");
|
"crop");
|
||||||
let initialLetter = "";
|
let initialLetter = "";
|
||||||
if (avatarUrl === defaultAvatarUrl) {
|
if (avatarUrl === defaultAvatarUrl) {
|
||||||
// the url from defaultAvatarUrlForString is meant to go in an img element,
|
|
||||||
// which has the base of the document. we're using it in css,
|
|
||||||
// which has the base of the theme css file, two levels deeper than the document,
|
|
||||||
// so go up to the level of the document.
|
|
||||||
avatarUrl = `../../${avatarUrl}`;
|
|
||||||
initialLetter = Avatar.getInitialLetter(name);
|
initialLetter = Avatar.getInitialLetter(name);
|
||||||
}
|
}
|
||||||
this._setAvatarVars(node, avatarUrl, initialLetter);
|
this._setAvatarVars(node, avatarUrl, initialLetter);
|
||||||
|
|
Loading…
Reference in a new issue