Skip to content

Commit

Permalink
feature: Removed unimplemented CSS rules from config, but added ID fo…
Browse files Browse the repository at this point in the history
…r buttons to allow for easy theming (#255)
  • Loading branch information
jamesread committed Mar 24, 2024
1 parent 19b4340 commit 709223b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ type Action struct {
Icon string
Shell string
ShellAfterCompleted string
CSS map[string]string `mapstructure:"omitempty"`
Timeout int
Acls []string
Entity string
Expand Down Expand Up @@ -48,7 +47,6 @@ type EntityFile struct {
File string
Name string
Icon string
CSS map[string]string
}

// PermissionsList defines what users can do with an action.
Expand Down
5 changes: 3 additions & 2 deletions webui.dev/js/ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class ActionButton extends ExecutionFeedbackButton {

// DOM Attributes
this.setAttribute('role', 'none')
this.setAttribute('id', 'actionButton-' + this.actionId)

this.btn.setAttribute('id', 'actionButtonInner-' + this.actionId)
this.btn.title = json.title
this.btn.onclick = () => {
if (json.arguments.length > 0) {
Expand All @@ -56,8 +59,6 @@ class ActionButton extends ExecutionFeedbackButton {

this.domTitle.innerText = this.btn.title
this.domIcon.innerHTML = this.unicodeIcon

this.setAttribute('id', 'actionButton-' + this.actionId)
}

updateFromJson (json) {
Expand Down

0 comments on commit 709223b

Please sign in to comment.