-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from OpenHausIO/dev
Release v1.1.0
- Loading branch information
Showing
6 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,56 @@ | ||
<script setup> | ||
import Collapsable from "@/components/Collapsable.vue"; | ||
import Tile from "@/components/Tile.vue"; | ||
import { request } from "@/helper"; | ||
</script> | ||
|
||
<script> | ||
export default {}; | ||
import { itemStore } from "../store.js"; | ||
const store = itemStore(); | ||
export default { | ||
components: { | ||
Collapsable, | ||
Tile, | ||
}, | ||
data() { | ||
return { | ||
}; | ||
}, | ||
computed: { | ||
items() { | ||
return store.scenes; | ||
}, | ||
}, | ||
methods: { | ||
trigger(item) { | ||
request( | ||
`/api/scenes/${item._id}/trigger`, | ||
{ | ||
method: "POST", | ||
}, | ||
(err, result) => { | ||
console.log(err, result); | ||
} | ||
); | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<template> | ||
<div class="container-fluid">Scenes page</div> | ||
<div class="container-fluid"> | ||
<!-- COMMANDS/STATES/SCENES --> | ||
<div class="row display-flex text-center" style="height: 100%"> | ||
<!-- COMMANDS --> | ||
<div class="p-0 col-6 col-md-3 col-xl-2" v-bind:key="item._id" v-for="item in items"> | ||
<Tile style="background: transparent; border: 1px solid rgb(0, 0, 0)" @click="trigger(item, $event)"> | ||
{{ item.name }} | ||
</Tile> | ||
</div> | ||
<!-- COMMANDS --> | ||
|
||
</div> | ||
<!-- COMMANDS/STATES/SCENES --> | ||
</div> | ||
</template> |