Improve mobile settings

This commit is contained in:
syuilo
2018-05-20 17:37:30 +09:00
parent 42849da497
commit f6449a7f32
6 changed files with 34 additions and 3 deletions

View File

@ -16,10 +16,13 @@ export default Vue.extend({
}
},
computed: {
lightmode(): boolean {
return localStorage.getItem('lightmode') == 'true';
},
style(): any {
return {
'background-color': this.image.properties.avgColor && this.image.properties.avgColor.length == 3 ? `rgb(${this.image.properties.avgColor.join(',')})` : 'transparent',
'background-image': this.raw ? `url(${this.image.url})` : `url(${this.image.url}?thumbnail&size=512)`
'background-image': this.lightmode ? null : this.raw ? `url(${this.image.url})` : `url(${this.image.url}?thumbnail&size=512)`
};
}
}