[-] Remove unnecessary isDark()

This commit is contained in:
Hykilpikonna
2020-04-27 03:24:08 -04:00
parent 837fda814b
commit c8ec7893e1
2 changed files with 4 additions and 6 deletions
+1 -5
View File
@@ -139,17 +139,13 @@ export default class Navigation extends Vue
{
this.app.darkMode = !this.app.darkMode;
if (this.isDark()) this.$cookies.set('dark', true);
if (this.app.darkMode) this.$cookies.set('dark', true);
else this.$cookies.remove('dark');
break
}
}
}
isDark()
{
return this.app.darkMode;
}
get version() {return Constants.VERSION}
+3 -1
View File
@@ -42,7 +42,9 @@
<el-dropdown-menu slot="dropdown">
<el-dropdown-item style="text-align: center">{{user.nickname}}</el-dropdown-item>
<el-dropdown-item icon="el-icon-sunrise" command="switch-dark" divided>{{!isDark() ? 'Dark Mode (Unfinished)' : 'Light Mode'}}</el-dropdown-item>
<el-dropdown-item icon="el-icon-sunrise" command="switch-dark" divided>
{{!app.darkMode ? 'Dark Mode (Unfinished)' : 'Light Mode'}}
</el-dropdown-item>
<el-dropdown-item icon="el-icon-switch-button" command="sign-out" divided>Sign Out</el-dropdown-item>
</el-dropdown-menu>