Added theme setting

This commit is contained in:
2017-11-17 12:51:08 +01:00
parent 7c9d1c3c31
commit 382fc804d1
5 changed files with 38 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import { ServiceWorkerManager } from "./ServiceWorkerManager"
import { displayAiringDate, displayDate } from "./DateView"
import { findAll, delay, canUseWebP, swapElements } from "./Utils"
import * as actions from "./Actions"
import { darkTheme } from "./Actions";
export class AnimeNotifier {
app: Application
@ -115,6 +116,11 @@ export class AnimeNotifier {
this.app.content = this.app.find("content")
this.app.loading = this.app.find("loading")
// Theme
if(this.user.dataset.theme !== "light") {
darkTheme()
}
// Status message
this.statusMessage = new StatusMessage(
this.app.find("status-message"),