Inherit theme color for brief loading screen
This commit is contained in:
parent
94edbd59e9
commit
38b500fc02
|
@ -52,7 +52,13 @@ class StorageDatabase implements workspaceStorage.IStorageDatabase {
|
||||||
|
|
||||||
public updateItems(request: workspaceStorage.IUpdateRequest): Promise<void> {
|
public updateItems(request: workspaceStorage.IUpdateRequest): Promise<void> {
|
||||||
if (request.insert) {
|
if (request.insert) {
|
||||||
request.insert.forEach((value, key) => this.items.set(key, value));
|
request.insert.forEach((value, key) => {
|
||||||
|
if (key === "colorThemeData") {
|
||||||
|
localStorage.setItem("colorThemeData", value);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.items.set(key, value);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.delete) {
|
if (request.delete) {
|
||||||
|
|
|
@ -1,9 +1,30 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<head>
|
||||||
<title>VS Code</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
</head>
|
<title>code-server</title>
|
||||||
<body>
|
</head>
|
||||||
</body>
|
|
||||||
|
<body style="background: rgb(30, 30, 30);">
|
||||||
|
<script>
|
||||||
|
(() => {
|
||||||
|
const rawColorTheme = localStorage.getItem("colorThemeData");
|
||||||
|
if (!rawColorTheme) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const colorTheme = JSON.parse(rawColorTheme);
|
||||||
|
const colorMap = colorTheme.colorMap;
|
||||||
|
if (!colorMap) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const bg = colorMap["editor.background"];
|
||||||
|
if (!bg) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
document.body.style.background = bg;
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue