diff --git a/src/components/drawer.ts b/src/components/drawer.ts index 900943ad..0639c707 100644 --- a/src/components/drawer.ts +++ b/src/components/drawer.ts @@ -15,6 +15,11 @@ import drawerStyle from '../scss/drawer.scss'; import { stopEventFromActivatingCardWideActions } from '../utils/action'; import { isHoverableDevice } from '../utils/basic'; +export interface DrawerIcons { + open?: string; + closed?: string; +} + @customElement('frigate-card-drawer') export class FrigateCardDrawer extends LitElement { @property({ attribute: true, reflect: true }) @@ -26,6 +31,9 @@ export class FrigateCardDrawer extends LitElement { @property({ type: Boolean, reflect: true, attribute: true }) public open = false; + @property({ attribute: false }) + public icons?: DrawerIcons; + // The 'empty' attribute is used in the styling to change the drawer // visibility and that of all descendants if there is no content. Styling is // used rather than display or hidden in order to ensure the contents continue @@ -111,7 +119,9 @@ export class FrigateCardDrawer extends LitElement { > { // Only open the drawer on mousenter when the device // supports hover (otherwise iOS may end up passing on diff --git a/src/components/gallery.ts b/src/components/gallery.ts index aa2ce708..0d14c132 100644 --- a/src/components/gallery.ts +++ b/src/components/gallery.ts @@ -103,7 +103,14 @@ export class FrigateCardGallery extends LitElement { // TODO Make this slot choice configuration left/right. return html` - + = createRef(); protected _refDrawerRight: Ref = createRef(); protected _boundDrawerHandler = this._drawerHandler.bind(this); @@ -53,10 +58,18 @@ export class FrigateCardSurroundBasic extends LitElement { protected render(): TemplateResult | void { return html` - + - + `; diff --git a/src/view/view.ts b/src/view/view.ts index ac8a3655..ddd3e63e 100644 --- a/src/view/view.ts +++ b/src/view/view.ts @@ -8,7 +8,6 @@ // - TODO: Use spinner for gallery loading / cardwideconfig not dotdotdot // - TODO: Handle all TODOs in media filter and media filter core. // - TODO: Make media filter slot choice configurable (gallery.ts). -// - TODO: Configurable drawer icons (e.g. filter). // - TODO: Filter panel expands from right can occasionally 'stick' open. // Hard: