Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	package-lock.json
#	package.json
  • Loading branch information
pablo.garcia.almis committed Apr 14, 2024
2 parents 8eaf373 + 7e1319c commit 6212dc7
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 243 deletions.
22 changes: 0 additions & 22 deletions .devcontainer/configuration.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions .devcontainer/devcontainer.json

This file was deleted.

24 changes: 0 additions & 24 deletions .devcontainer/ui-lovelace.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
* Added placeholder.jpg as asset ([c49a3ce](https://github.com/lukelalo/gallery-card/commit/c49a3ce0ec9277b5e60f480ced01572a674b6e6a))
* isImageExtension wasn't matching right ([c36ff00](https://github.com/lukelalo/gallery-card/commit/c36ff00410d265fd65436cdd2478b491c6b97df4))

## [1.0.2-dev.1](https://github.com/lukelalo/gallery-card/compare/v1.0.1...v1.0.2-dev.1) (2024-04-14)


### Bug Fixes

* Added placeholder.jpg as asset ([c49a3ce](https://github.com/lukelalo/gallery-card/commit/c49a3ce0ec9277b5e60f480ced01572a674b6e6a))

## [1.0.1](https://github.com/lukelalo/gallery-card/compare/v1.0.0...v1.0.1) (2024-04-14)


Expand Down
80 changes: 41 additions & 39 deletions README.md

Large diffs are not rendered by default.

135 changes: 41 additions & 94 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^12.0.0",
"@semantic-release/exec": "^6.0.3",
Expand All @@ -56,8 +57,6 @@
"prettier-eslint": "^16.3.0",
"rollup": "^2.77.4-1",
"rollup-plugin": "^1.0.0",
"rollup-plugin-serve": "^1.1.1",
"rollup-plugin-terser": "^7.0.2",
"semantic-release": "^23.0.8"
},
"dependencies": {
Expand Down
16 changes: 2 additions & 14 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
import commonjs from '@rollup/plugin-commonjs';
import nodeResolve from '@rollup/plugin-node-resolve';
import babel from '@rollup/plugin-babel';
import { terser } from 'rollup-plugin-terser';
import serve from 'rollup-plugin-serve';
import '@rollup/plugin-terser';
import json from '@rollup/plugin-json';
import terser from '@rollup/plugin-terser';

const dev = process.env.ROLLUP_WATCH;

const serveopts = {
contentBase: ['./dist'],
host: '0.0.0.0',
port: 5000,
allowCrossOrigin: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
};

const plugins = [
nodeResolve({}),
commonjs(),
Expand All @@ -26,8 +16,6 @@ const plugins = [
babelHelpers: 'bundled',
babelrc: false,
}),
//cleanup({ comments: 'none' }),
dev && serve(serveopts),
!dev &&
terser({
format: {
Expand Down
9 changes: 8 additions & 1 deletion src/gallery-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ class GalleryCard extends LitElement {
` :
this._isImageExtension(this._currentResource().extension) ?
html`<img @click="${event => this._popupImage(event)}" src="${this._currentResource().url}"/>` :
html`<video controls ?loop=${this.config.video_loop} ?autoplay=${this.config.video_autoplay} src="${this._currentResource().url}#t=0.1" @loadedmetadata="${event => this._videoMetadataLoaded(event)}" @canplay="${event => this._startVideo(event)}" preload="metadata"></video>`
html`<video controls ?loop=${this.config.video_loop} ?autoplay=${this.config.video_autoplay} src="${this._currentResource().url}#t=0.1" @loadedmetadata="${event => this._videoMetadataLoaded(event)}" @canplay="${event => this._startVideo(event)}"
@ended="${() => this._videoHasEnded()}" preload="metadata"></video>`
}
<figcaption>${this._currentResource().caption}
${this._isImageExtension(this._currentResource().extension) ?
Expand Down Expand Up @@ -237,6 +238,12 @@ class GalleryCard extends LitElement {
event.target.muted = "muted";
}

_videoHasEnded() {
if (this.config.slideshow_video_end) {
this._doSlideShow();
}
}

_popupCamera() {
const event = new Event("hass-more-info", {
bubbles: true,
Expand Down

0 comments on commit 6212dc7

Please sign in to comment.