@@ -1491,6 +1491,13 @@ export class NewProjectPanel {
1491
1491
)
1492
1492
) ;
1493
1493
1494
+ const defaultTheme =
1495
+ window . activeColorTheme . kind === ColorThemeKind . Dark ||
1496
+ window . activeColorTheme . kind === ColorThemeKind . HighContrast
1497
+ ? "dark"
1498
+ : "light" ;
1499
+ const riscvDefaultSvgUri = defaultTheme === "dark" ? riscvWhiteSvgUri : riscvBlackSvgUri ;
1500
+
1494
1501
this . _versionBundlesLoader = new VersionBundlesLoader ( this . _extensionUri ) ;
1495
1502
1496
1503
// construct auxiliary html
@@ -1664,14 +1671,16 @@ export class NewProjectPanel {
1664
1671
var doProjectImport = ${ this . _isProjectImport } ;
1665
1672
var forceCreateFromExample = ${ forceCreateFromExample } ;
1666
1673
1674
+ localStorage.theme = "${ defaultTheme } ";
1675
+
1667
1676
// riscv logos
1668
1677
const riscvWhiteSvgUri = "${ riscvWhiteSvgUri . toString ( ) } ";
1669
1678
const riscvWhiteYellowSvgUri = "${ riscvWhiteYellowSvgUri . toString ( ) } ";
1670
1679
const riscvBlackSvgUri = "${ riscvBlackSvgUri . toString ( ) } ";
1671
1680
const riscvColorSvgUri = "${ riscvColorSvgUri . toString ( ) } ";
1672
1681
</script>
1673
1682
</head>
1674
- <body class="scroll-smooth w-screen">
1683
+ <body class="scroll-smooth w-screen${ defaultTheme === "dark" ? " dark" : "" } ">
1675
1684
<div id="above-nav" class="container max-w-6xl mx-auto flex justify-between items-center w-full sticky top-0 z-10 pl-5 h-5">
1676
1685
</div>
1677
1686
<div id="nav-overlay" class="overlay hidden md:hidden inset-y-0 right-0 w-auto z-50 overflow-y-auto ease-out bg-slate-400 dark:bg-slate-800 drop-shadow-lg">
@@ -1796,7 +1805,7 @@ export class NewProjectPanel {
1796
1805
<label for="riscvToggle" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Architecture (Pico 2)</label>
1797
1806
<div class="flex items-center justify-between p-2 bg-gray-100 rounded-lg dark:bg-gray-700">
1798
1807
<input type="checkbox" id="sel-riscv" class="ms-2" />
1799
- <img id="riscvIcon" src="${ riscvColorSvgUri . toString ( ) } " alt="RISC-V Logo" class="h-6 mx-auto w-28">
1808
+ <img id="riscvIcon" src="${ riscvDefaultSvgUri . toString ( ) } " alt="RISC-V Logo" class="h-6 mx-auto w-28">
1800
1809
</div>
1801
1810
</div>
1802
1811
</div>
0 commit comments