@ale-rainbow/rainbow-notification
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -24,2 +24,3 @@ export declare class RainbowNotificationAction { | ||
avatarURL: string; | ||
avatarURLs: string[]; | ||
infoTitle: string; | ||
@@ -42,2 +43,3 @@ infoMessage: string; | ||
attachActionHandlers(attach?: boolean): void; | ||
getRoomAvatar(): string; | ||
} |
@@ -41,2 +41,3 @@ "use strict"; | ||
this.avatarURL = null; | ||
this.avatarURLs = null; | ||
this.infoTitle = null; | ||
@@ -74,3 +75,6 @@ this.infoMessage = null; | ||
const urgency = (this.urgencyLabel && this.urgencyLabel !== 'std') ? `<div class='extCallNotif__urg ${this.urgencyClass}'><svg><use href="${this.urgencyIcon}"></svg>${this.urgencyLabel}</div>` : ''; | ||
const avatar = this.avatarURL ? `<img class='extCallNotif__img' src='${this.avatarURL}' draggable='false' alt='' />` : ''; | ||
let avatar = this.avatarURL ? `<img class='extCallNotif__img' src='${this.avatarURL}' draggable='false' alt='' />` : ''; | ||
if (this.avatarURLs) { | ||
avatar = this.getRoomAvatar(); | ||
} | ||
const origin = this.origin ? `<div class='extCallNotif__origin'>${this.origin}</div>` : ''; | ||
@@ -132,3 +136,27 @@ const message = `<div class='extCallNotif__message'>${this.message}</div>`; | ||
} | ||
getRoomAvatar() { | ||
let buffer = '<div class="extCallNotif__roomImg"><div class="extCallNotif__trivial--big">'; | ||
if (this.avatarURLs.length === 1) { | ||
buffer += ` | ||
<div class="extCallNotif__trivial__avatar extCallNotif__trivial__avatar--1o2"><img class="extCallNotif__trivial__img" draggable="false" src="${this.avatarURLs[0]}" alt=""/></div> \ | ||
<div class="extCallNotif__trivial__avatar extCallNotif__trivial__avatar--2o2 extCallNotif__trival__avatar--grey"></div> | ||
`; | ||
} | ||
if (this.avatarURLs.length === 2) { | ||
buffer += ` | ||
<div class="extCallNotif__trivial__avatar extCallNotif__trivial__avatar--1o2"><img class="extCallNotif__trivial__img" draggable="false" src="${this.avatarURLs[0]}" alt="" /></div> \ | ||
<div class="extCallNotif__trivial__avatar extCallNotif__trivial__avatar--2o2"><img class="extCallNotif__trivial__img" draggable="false" src="${this.avatarURLs[1]}" alt="" /></div> | ||
`; | ||
} | ||
if (this.avatarURLs.length > 2) { | ||
buffer += ` | ||
<div class="extCallNotif__trivial__avatar extCallNotif__trivial__avatar--1o3"><img class="extCallNotif__trivial__img" draggable="false" src="${this.avatarURLs[0]}" alt="" /></div> \ | ||
<div class="extCallNotif__trivial__avatar extCallNotif__trivial__avatar--2o3"><img class="extCallNotif__trivial__img" draggable="false" src="${this.avatarURLs[1]}" alt="" /></div> \ | ||
<div class="extCallNotif__trivial__avatar extCallNotif__trivial__avatar--3o3"><img class="extCallNotif__trivial__img" draggable="false" src="${this.avatarURLs[2]}" alt="" /></div> | ||
`; | ||
} | ||
buffer += '</div></div>'; | ||
return buffer; | ||
} | ||
} | ||
exports.RainbowNotification = RainbowNotification; |
{ | ||
"name": "@ale-rainbow/rainbow-notification", | ||
"version": "v1.0.21", | ||
"version": "v1.0.22", | ||
"description": "Alcatel-Lucent Enterprise Rainbow Notification", | ||
@@ -5,0 +5,0 @@ "main": "./dist/rainbowNotification.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
38136
1279