Change date and closedBy properties for a more generic description
This commit is contained in:
@@ -14,6 +14,14 @@ export default class extends BridgeComponent {
|
||||
}
|
||||
|
||||
notifyBridgeOfConnect() {
|
||||
this.send("connect", this.bridgeElement.getStamp())
|
||||
this.send("connect", this.#data)
|
||||
}
|
||||
|
||||
get #data() {
|
||||
const bridgeElement = this.bridgeElement
|
||||
return {
|
||||
title: bridgeElement.title,
|
||||
description: bridgeElement.bridgeAttribute("description") ?? null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,6 @@ BridgeElement.prototype.getButton = function() {
|
||||
}
|
||||
}
|
||||
|
||||
BridgeElement.prototype.getStamp = function() {
|
||||
return {
|
||||
title: this.title,
|
||||
date: this.getDate(),
|
||||
closedBy: this.getClosedBy()
|
||||
}
|
||||
}
|
||||
|
||||
BridgeElement.prototype.getIcon = function() {
|
||||
const url = this.bridgeAttribute("icon-url")
|
||||
|
||||
@@ -27,14 +19,6 @@ BridgeElement.prototype.getIcon = function() {
|
||||
return null
|
||||
}
|
||||
|
||||
BridgeElement.prototype.getDate = function() {
|
||||
return this.bridgeAttribute("date") ?? null
|
||||
}
|
||||
|
||||
BridgeElement.prototype.getClosedBy = function() {
|
||||
return this.bridgeAttribute("closed-by") ?? null
|
||||
}
|
||||
|
||||
BridgeElement.prototype.getDisplayTitle = function() {
|
||||
return !!this.bridgeAttribute("display-title")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user