mirror of
				https://gitlab.com/PronounsPage/PronounsPage.git
				synced 2025-11-03 19:06:31 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			739 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			739 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
<template>
 | 
						|
    <label class="form-check form-switch d-inline-block">
 | 
						|
        <input class="form-check-input" type="checkbox" role="switch" v-model="reducedColours">
 | 
						|
        <T>mode.reducedColours</T>
 | 
						|
    </label>
 | 
						|
</template>
 | 
						|
 | 
						|
<script>
 | 
						|
    export default {
 | 
						|
        data() {
 | 
						|
            return {
 | 
						|
                reducedColours: false,
 | 
						|
            }
 | 
						|
        },
 | 
						|
        mounted() {
 | 
						|
            if (!process.client) { return; }
 | 
						|
 | 
						|
            this.reducedColours = localStorage.getItem('reducedColours') === 'true';
 | 
						|
        },
 | 
						|
        watch: {
 | 
						|
            reducedColours(v) {
 | 
						|
                document.body.classList.toggle('reduced-colours', v);
 | 
						|
                localStorage.setItem('reducedColours', v);
 | 
						|
            },
 | 
						|
        }
 | 
						|
    }
 | 
						|
</script>
 |