Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bartbutenaers committed Dec 21, 2024
2 parents 00e06ee + d27fd37 commit 01e71c6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
18 changes: 3 additions & 15 deletions docs/nodes/widgets/ui-audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,19 @@ dynamic:
<script setup>
import { ref } from 'vue'

import ExampleButtonHold from '../../examples/ui-button-hold.json'

import TryDemo from "./../../components/TryDemo.vue"
import FlowViewer from '../../components/FlowViewer.vue'

const examples = ref({
'hold': ExampleButtonHold
})
</script>


<TryDemo href="button-example">
<TryDemo href="audio-example">

# Audio `ui-audio`

</TryDemo>

Adds a clickable button to your dashboard.
Adds an audio player to the dashboard.
The audio player can be controlled by the user or by control messages.

## Properties

Expand All @@ -67,10 +62,3 @@ Adds a clickable button to your dashboard.
## Controls

<ControlsTable/>

## Example

### Simple Button

![Example of a Button](/images/node-examples/ui-button.png "Example of a Button"){data-zoomable}
*Example of a rendered button in a Dashboard.*
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flowfuse/node-red-dashboard",
"version": "1.20.1",
"version": "1.21.0",
"description": "Dashboard 2.0 - A collection of Node-RED nodes that provide functionality to build your own UI applications (inc. forms, buttons, charts).",
"keywords": [
"node-red"
Expand Down
4 changes: 2 additions & 2 deletions ui/src/layouts/Group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export default {
widgetStyles () {
return (widget) => {
const styles = {}
const height = widget.props.height || widget.layout.height
const width = widget.props.width || widget.layout.width
const height = widget.props.height
const width = widget.props.width
styles['grid-row-end'] = `span ${height}`
styles['grid-template-rows'] = `repeat(${height}, minmax(var(--widget-row-height), auto))`
styles['grid-column-end'] = `span min(${this.getWidgetWidth(+width)}, var(--layout-columns))`
Expand Down
2 changes: 1 addition & 1 deletion ui/src/widgets/ui-table/UITable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export default {
calculatePaginatedRows () {
if (this.itemsPerPage > 0) {
this.pagination.pages = Math.ceil(this.localData?.length / this.props.maxrows)
this.pagination.rows = this.localData.slice(
this.pagination.rows = (this.localData || []).slice(
(this.pagination.page - 1) * this.props.maxrows,
(this.pagination.page) * this.props.maxrows
)
Expand Down

0 comments on commit 01e71c6

Please sign in to comment.