[-] Remove unnecessary isDark()
This commit is contained in:
@@ -139,17 +139,13 @@ export default class Navigation extends Vue
|
|||||||
{
|
{
|
||||||
this.app.darkMode = !this.app.darkMode;
|
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');
|
else this.$cookies.remove('dark');
|
||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
isDark()
|
|
||||||
{
|
|
||||||
return this.app.darkMode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get version() {return Constants.VERSION}
|
get version() {return Constants.VERSION}
|
||||||
|
|||||||
@@ -42,7 +42,9 @@
|
|||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item style="text-align: center">{{user.nickname}}</el-dropdown-item>
|
<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-item icon="el-icon-switch-button" command="sign-out" divided>Sign Out</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
|||||||
Reference in New Issue
Block a user