Skip to content

Commit

Permalink
Developer sidebar: Display cannot run toast when trying to run unitia…
Browse files Browse the repository at this point in the history
…lized rule

Fixes #2748.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 committed Sep 12, 2024
1 parent b207722 commit 33d1e3a
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,6 @@ export default {
if (this.addThingAutocomplete) this.addThingAutocomplete.destroy()
},
methods: {
itemContext (item) {
return {
}
},
addItemsFromModel (value) {
this.$set(this.pinnedObjects, 'items', [...value])
},
Expand Down Expand Up @@ -789,7 +784,13 @@ export default {
})
},
runRuleNow (rule) {
if (rule.status === 'RUNNING') return
if (rule.status.status === 'RUNNING' || rule.status.status === 'UNINITIALIZED') {
return this.$f7.toast.create({
text: `Rule cannot be run ${(rule.status.status === 'RUNNING') ? 'while already running, please wait' : 'if it is uninitialized'}!`,
destroyOnClose: true,
closeTimeout: 2000
}).open()
}
this.$f7.toast.create({
text: 'Running rule',
destroyOnClose: true,
Expand Down

0 comments on commit 33d1e3a

Please sign in to comment.