Show default download path in preferences

pull/360/head
aandrew-me 6 days ago
parent d5d02a18f0
commit 66261b3edc

@ -1,5 +1,7 @@
const {ipcRenderer, shell} = require("electron"); const {ipcRenderer, shell} = require("electron");
const {accessSync, constants} = require("original-fs"); const {accessSync, constants} = require("original-fs");
const {join} = require("path");
const {homedir} = require("os");
const storageTheme = localStorage.getItem("theme"); const storageTheme = localStorage.getItem("theme");
if (storageTheme) { if (storageTheme) {
@ -26,7 +28,13 @@ if (rightToLeft == "true") {
item.style.flexDirection = "row"; item.style.flexDirection = "row";
}); });
} }
// Download path
let downloadPath = localStorage.getItem("downloadPath"); let downloadPath = localStorage.getItem("downloadPath");
if (!downloadPath) {
downloadPath = join(homedir(), "Downloads");
}
getId("path").textContent = downloadPath; getId("path").textContent = downloadPath;
/** /**

Loading…
Cancel
Save