feature: Removed unimplemented CSS rules from config, but added ID for buttons to allow for easy theming (#255)

This commit is contained in:
James Read 2024-03-24 22:35:19 +00:00 committed by GitHub
parent 19b4340e18
commit 709223bd46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -8,7 +8,6 @@ type Action struct {
Icon string Icon string
Shell string Shell string
ShellAfterCompleted string ShellAfterCompleted string
CSS map[string]string `mapstructure:"omitempty"`
Timeout int Timeout int
Acls []string Acls []string
Entity string Entity string
@ -48,7 +47,6 @@ type EntityFile struct {
File string File string
Name string Name string
Icon string Icon string
CSS map[string]string
} }
// PermissionsList defines what users can do with an action. // PermissionsList defines what users can do with an action.

View File

@ -31,6 +31,9 @@ class ActionButton extends ExecutionFeedbackButton {
// DOM Attributes // DOM Attributes
this.setAttribute('role', 'none') this.setAttribute('role', 'none')
this.setAttribute('id', 'actionButton-' + this.actionId)
this.btn.setAttribute('id', 'actionButtonInner-' + this.actionId)
this.btn.title = json.title this.btn.title = json.title
this.btn.onclick = () => { this.btn.onclick = () => {
if (json.arguments.length > 0) { if (json.arguments.length > 0) {
@ -56,8 +59,6 @@ class ActionButton extends ExecutionFeedbackButton {
this.domTitle.innerText = this.btn.title this.domTitle.innerText = this.btn.title
this.domIcon.innerHTML = this.unicodeIcon this.domIcon.innerHTML = this.unicodeIcon
this.setAttribute('id', 'actionButton-' + this.actionId)
} }
updateFromJson (json) { updateFromJson (json) {