[+] Implement dark mode switcing
This commit is contained in:
@@ -3,6 +3,7 @@ import Course from '@/logic/course';
|
||||
import Constants from '@/constants';
|
||||
import LoginUser from '@/logic/login-user';
|
||||
import NavController from '@/logic/nav-controller';
|
||||
import App from '@/components/app/app';
|
||||
|
||||
/**
|
||||
* This component is the top navigation bar
|
||||
@@ -134,6 +135,15 @@ export default class Navigation extends Vue
|
||||
this.$emit('sign-out');
|
||||
break
|
||||
}
|
||||
case 'switch-dark':
|
||||
{
|
||||
App.instance.darkMode = !App.instance.darkMode;
|
||||
|
||||
if (this.isDark()) this.$cookies.set('dark', true);
|
||||
else this.$cookies.remove('dark');
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user