cinema/cacher-desc.riot

45 lines
813 B
Plaintext
Raw Permalink Normal View History

2022-04-01 22:49:14 +02:00
<cacher-desc>
<button id="cacher-desc-but" onclick={toggle}>
<i id="logo-cacher-desc-but" class="fa-solid fa-eye"></i>
</button>
<script>
export default {
state: {
loading: false,
error: null,
cache: false
},
reset() {
this.update({
loading: false,
error: null,
cache: false
})
},
async toggle(e) {
e.preventDefault();
this.state.cache=!this.state.cache;
if(this.state.cache){
document.getElementById("logo-cacher-desc-but").classList="fa-solid fa-eye-slash";
} else {
document.getElementById("logo-cacher-desc-but").classList="fa-solid fa-eye";
}
this.props.t_setvisi(!this.state.cache);
}
}
</script>
<style>
#cacher-desc-but {
width: 50px;
padding: -50px;
}
</style>
</cacher-desc>