Only show gallery back button in certain cases.
This commit is contained in:
@@ -239,7 +239,6 @@ export class BrowseMediaUtil {
|
|||||||
view
|
view
|
||||||
.evolve({
|
.evolve({
|
||||||
target: parent,
|
target: parent,
|
||||||
previous: view,
|
|
||||||
})
|
})
|
||||||
.dispatchChangeEvent(node);
|
.dispatchChangeEvent(node);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,18 @@ export class FrigateCardGalleryCore extends LitElement {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the back arrow should be displayed.
|
||||||
|
* @returns `true` if the back arrow should be displayed, `false` otherwise.
|
||||||
|
*/
|
||||||
|
protected _showBackArrow(): boolean {
|
||||||
|
return (
|
||||||
|
!!this.view?.previous &&
|
||||||
|
!!this.view.previous.target &&
|
||||||
|
this.view.previous.view === this.view.view
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Master render method.
|
* Master render method.
|
||||||
* @returns A rendered template.
|
* @returns A rendered template.
|
||||||
@@ -158,7 +170,7 @@ export class FrigateCardGalleryCore extends LitElement {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return html` <ul class="mdc-image-list frigate-card-gallery">
|
return html` <ul class="mdc-image-list frigate-card-gallery">
|
||||||
${this.view && this.view.previous
|
${this._showBackArrow()
|
||||||
? html`<li class="mdc-image-list__item" style="${styleMap(itemStyle)}">
|
? html`<li class="mdc-image-list__item" style="${styleMap(itemStyle)}">
|
||||||
<div class="mdc-image-list__image-aspect-container">
|
<div class="mdc-image-list__image-aspect-container">
|
||||||
<div class="mdc-image-list__image">
|
<div class="mdc-image-list__image">
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// TODO: Hover over an event should show something useful.
|
|
||||||
// TODO: Periodically refetch events.
|
// TODO: Periodically refetch events.
|
||||||
// TODO: Editor support for timeline (incl. in views).
|
// TODO: Editor support for timeline (incl. in views).
|
||||||
// TODO: Make thumbnail controls optional (in all places that use thumbnails).
|
// TODO: Make thumbnail controls optional (in all places that use thumbnails).
|
||||||
|
|||||||
Reference in New Issue
Block a user