Fix default previews

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
Richard Steinmetz 2022-01-07 10:28:02 +01:00
parent e78f4cb177
commit 8c534ad8f6
No known key found for this signature in database
GPG Key ID: 27137D9E7D273FB2
22 changed files with 12 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -99,7 +99,7 @@ export default {
this.illustration = ''
if (this.illustrationName !== '') {
try {
const illustration = await import(`!raw-loader!../assets/Illustrations/${this.illustrationName}.svg`)
const illustration = await import(`../assets/Illustrations/${this.illustrationName}.svg`)
this.illustration = illustration.default
} catch (error) {
console.error('Could not get the error illustration', error)

View File

@ -46,8 +46,8 @@
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 32 32"
fill="url(#placeholder__gradient)">
<use v-if="isImage" xlink:href="#placeholder--img" />
<use v-else xlink:href="#placeholder--video" />
<use v-if="isImage" href="#placeholder--img" />
<use v-else href="#placeholder--video" />
</svg>
</transition-group>

View File

@ -29,6 +29,15 @@ webpackRules.RULE_SCSS.use = [
},
]
// Load raw SVGs to be able to inject them via v-html
webpackRules.RULE_ASSETS.test = /\.(png|jpe?g|gif|woff2?|eot|ttf)$/
webpackRules.RULE_RAW_SVGS = {
test: /\.svg$/,
loader: 'raw-loader',
}
webpackConfig.module.rules = Object.values(webpackRules)
webpackConfig.plugins.push(
// patch webdav/dist/request.js
new webpack.NormalModuleReplacementPlugin(