Skip to content

Commit

Permalink
Don't show empty devices
Browse files Browse the repository at this point in the history
Signed-off-by: Arne Hamann <git@arne.email>
  • Loading branch information
tacruc committed Sep 26, 2023
1 parent 8e1c373 commit d5b0bab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/DevicesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function shareDevice(int $id, int $timestampFrom, int $timestampTo): Data
$share = $this->deviceShareMapper->create($id, $timestampFrom, $timestampTo);

if ($share === null) {
return new DataResponse($this->l->t("Error sharing favorite"), Http::STATUS_INTERNAL_SERVER_ERROR);
return new DataResponse($this->l->t("Error sharing device"), Http::STATUS_INTERNAL_SERVER_ERROR);
}
}
else {
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/DevicesLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default {
computed: {
displayedDevices() {
return this.devices.filter(d => d.enabled)
return this.devices.filter(d => d.enabled && d.points.length > 0)
},
enabledDevices() {
return this.devices.map(d => d.enabled)
Expand Down

0 comments on commit d5b0bab

Please sign in to comment.