リモートサーバーのファイルをデータベースに保存せず、クライアントで直接表示させられるように
This commit is contained in:
@ -16,13 +16,18 @@ export default Vue.extend({
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
lightmode(): boolean {
|
||||
return this.$store.state.device.lightmode;
|
||||
},
|
||||
style(): any {
|
||||
let url = `url(${this.image.url}?thumbnail)`;
|
||||
|
||||
if (this.$store.state.device.loadRemoteMedia || this.$store.state.device.lightmode) {
|
||||
url = null;
|
||||
} else if (this.raw || this.$store.state.device.loadRawImages) {
|
||||
url = `url(${this.image.url})`;
|
||||
}
|
||||
|
||||
return {
|
||||
'background-color': this.image.properties.avgColor && this.image.properties.avgColor.length == 3 ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
|
||||
'background-image': this.lightmode ? null : this.raw ? `url(${this.image.url})` : `url(${this.image.url}?thumbnail&size=512)`
|
||||
'background-image': url
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user