瀏覽代碼

store the active theme

Sven Czarnian 2 年之前
父節點
當前提交
c3f36bae01
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/services/session.ts

+ 8 - 0
src/services/session.ts

@@ -10,4 +10,12 @@ export class Session {
   static bearerToken(): string | null {
     return localStorage.getItem('token');
   }
+
+  static setTheme(theme: string) {
+    localStorage.setItem('theme', theme);
+  }
+
+  static theme(): string | null {
+    return localStorage.getItem('theme');
+  }
 }