Chore: Update vscode configurations (#3986)

This commit is contained in:
Svallinn 2023-09-05 05:26:11 +00:00 committed by GitHub
parent 81007efd49
commit 1003763b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 21 deletions

23
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,23 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "dev-runner (Electron)",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/_scripts/dev-runner.js",
"args": ["--remote-debug"]
},
{
"name": "Attach to renderer process (Electron)",
"type": "chrome",
"request": "attach",
"port": 9223,
"webRoot": "http://localhost:9080",
"sourceMapPathOverrides": {
"webpack://freetube/./~/*": "${workspaceFolder}/node_modules/*",
"webpack://freetube/./*": "${workspaceFolder}/*"
}
}
]
}

19
.vscode/tasks.json vendored
View File

@ -1,19 +0,0 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev",
"problemMatcher": []
},
{
"type": "npm",
"script": "dev-runner",
"problemMatcher": [],
"label": "npm: dev-runner",
"detail": "node _scripts/dev-runner.js"
}
]
}

View File

@ -472,8 +472,12 @@ function runApp() {
searchQueryText = null
} = { }) {
// Syncing new window background to theme choice.
const windowBackground = await baseHandlers.settings._findTheme().then(({ value }) => {
switch (value) {
const windowBackground = await baseHandlers.settings._findTheme().then((setting) => {
if (!setting) {
return nativeTheme.shouldUseDarkColors ? '#212121' : '#f1f1f1'
}
switch (setting.value) {
case 'dark':
return '#212121'
case 'light':