File tree Expand file tree Collapse file tree 2 files changed +35
-8
lines changed Expand file tree Collapse file tree 2 files changed +35
-8
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,13 @@ class StorageDatabase implements workspaceStorage.IStorageDatabase {
5252
5353 public updateItems ( request : workspaceStorage . IUpdateRequest ) : Promise < void > {
5454 if ( request . insert ) {
55- request . insert . forEach ( ( value , key ) => this . items . set ( key , value ) ) ;
55+ request . insert . forEach ( ( value , key ) => {
56+ if ( key === "colorThemeData" ) {
57+ localStorage . setItem ( "colorThemeData" , value ) ;
58+ }
59+
60+ this . items . set ( key , value ) ;
61+ } ) ;
5662 }
5763
5864 if ( request . delete ) {
Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22< html lang ="en ">
3- < head >
4- < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
5- < title > VS Code</ title >
6- </ head >
7- < body >
8- </ body >
9- </ html >
3+
4+ < head >
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
6+ < title > code-server</ title >
7+ </ head >
8+
9+ < body style ="background: rgb(30, 30, 30); ">
10+ < script >
11+ ( ( ) => {
12+ const rawColorTheme = localStorage . getItem ( "colorThemeData" ) ;
13+ if ( ! rawColorTheme ) {
14+ return ;
15+ }
16+ const colorTheme = JSON . parse ( rawColorTheme ) ;
17+ const colorMap = colorTheme . colorMap ;
18+ if ( ! colorMap ) {
19+ return ;
20+ }
21+ const bg = colorMap [ "editor.background" ] ;
22+ if ( ! bg ) {
23+ return ;
24+ }
25+ document . body . style . background = bg ;
26+ } ) ( ) ;
27+ </ script >
28+ </ body >
29+
30+ </ html >
You can’t perform that action at this time.
0 commit comments