diff --git a/README.md b/README.md index 82fbcd82..8dc5250f 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ lovelace: | ------------- | --------------------------------------------- | - | | `menu_mode` | `hidden-top` | The menu mode to show by default. See [menu modes](#menu-modes) below.| | `menu_buttons.{frigate, live, clips, snapshots, frigate_ui}` | `true` | Whether or not to show these builtin actions in the card menu. | +| `controls.nextprev` | `true` | Whether or not to show the next and previous controls when viewing media. | ### Advanced diff --git a/src/editor.ts b/src/editor.ts index c1dad8a0..c67cfab4 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -300,6 +300,18 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor @change=${this._valueChanged} > +
+ + +
` : ''}
diff --git a/src/frigate-hass-card.ts b/src/frigate-hass-card.ts index 6bb6adc9..10f90c28 100644 --- a/src/frigate-hass-card.ts +++ b/src/frigate-hass-card.ts @@ -767,7 +767,9 @@ export class FrigateCard extends LitElement { const neighbors = this._getMediaNeighbors(parent, childIndex); return html` - ${neighbors?.previous && neighbors.previous.thumbnail + ${(this.config.controls?.nextprev ?? true) && + neighbors?.previous && + neighbors.previous.thumbnail ? html``} - ${neighbors?.next && neighbors.next.thumbnail + ${(this.config.controls?.nextprev ?? true) && + neighbors?.next && + neighbors.next.thumbnail ? html`