mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-15 03:11:34 +00:00
Merge pull request #357 from cPhost/img-fix
Add default icon if the server image is not available.
This commit is contained in:
@@ -149,6 +149,13 @@ class ServerManagerView {
|
||||
this.openSettings('General');
|
||||
});
|
||||
|
||||
const $serverImgs = document.querySelectorAll('.server-icons');
|
||||
$serverImgs.forEach($serverImg => {
|
||||
$serverImg.addEventListener('error', () => {
|
||||
$serverImg.src = 'img/icon.png';
|
||||
});
|
||||
});
|
||||
|
||||
this.sidebarHoverEvent(this.$addServerButton, this.$addServerTooltip);
|
||||
this.sidebarHoverEvent(this.$settingsButton, this.$settingsTooltip);
|
||||
this.sidebarHoverEvent(this.$reloadButton, this.$reloadTooltip);
|
||||
|
||||
Reference in New Issue
Block a user