diff --git a/.gitignore b/.gitignore index a0be5c16..46efe69a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ selenium-debug.log config/local.json config/local.*.json docs/site/ -.vscode/ \ No newline at end of file +.vscode/ diff --git a/src/App.js b/src/App.js index 898cda59..14c05fa8 100644 --- a/src/App.js +++ b/src/App.js @@ -76,11 +76,24 @@ export default { ? null : this.$store.state.instance.background }, - background () { return this.pageBackground || (this.$store.getters.mergedConfig.overrideInstanceWallpaper && this.userBackground) || this.instanceBackground }, + background () { + return this.pageBackground || + (this.$store.getters.mergedConfig.overrideInstanceWallpaper && this.userBackground) || + this.instanceBackground + }, bgStyle () { - if (this.background) { + const background = this.background + if (!background) return null + + const isVideo = /\.(mp4|webm|mov)$/i.test(background) + + if (isVideo) { return { - '--body-background-image': `url(${this.background})` + '--body-background-image': 'none' + } + } else { + return { + '--body-background-image': `url(${background})` } } }, diff --git a/src/App.vue b/src/App.vue index 80ebb525..54486944 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,7 +6,18 @@
+ > + +
diff --git a/src/components/about/about.vue b/src/components/about/about.vue index cfdc2806..b94195f0 100644 --- a/src/components/about/about.vue +++ b/src/components/about/about.vue @@ -1,7 +1,7 @@