Minor changes

main
aandrew-me 1 week ago
parent 3adc854fbb
commit 944e6c5db4

@ -14,7 +14,7 @@ const fs = require("fs");
const path = require("path"); const path = require("path");
const DownloadHistory = require("./src/history"); const DownloadHistory = require("./src/history");
autoUpdater.autoDownload = false; autoUpdater.autoDownload = false;
/**@type {BrowserWindow} */ /**@type {Electron.CrossProcessExports.BrowserWindow} */
let win = null; let win = null;
let secondaryWindow = null; let secondaryWindow = null;
let tray = null; let tray = null;
@ -57,7 +57,7 @@ function createWindow() {
win.show(); win.show();
autoUpdater.checkForUpdates().then(result => { autoUpdater.checkForUpdates().then(result => {
// Removing unnecesary files for windows // Removing unnecessary files for windows
if (result && process.platform === "win32") { if (result && process.platform === "win32") {
if (result.updateInfo.version === app.getVersion()) { if (result.updateInfo.version === app.getVersion()) {
fs.readdir(path.join(process.env.LOCALAPPDATA, "ytdownloader-updater"), {encoding: "utf-8", withFileTypes: true}, (err, files) => { fs.readdir(path.join(process.env.LOCALAPPDATA, "ytdownloader-updater"), {encoding: "utf-8", withFileTypes: true}, (err, files) => {
@ -171,9 +171,9 @@ app.whenReady().then(() => {
let trayInUse = false; let trayInUse = false;
// TODO: Find why tray icon isn't showing properly on gnome // TODO: Find why tray icon isn't showing properly on gnome
let icon; let icon;
if (process.platform == "win32") { if (process.platform === "win32") {
icon = path.join(__dirname, "resources/icon.ico"); icon = path.join(__dirname, "resources/icon.ico");
} else if (process.platform == "darwin") { } else if (process.platform === "darwin") {
icon = path.join(__dirname, "resources/icons/16x16.png"); icon = path.join(__dirname, "resources/icons/16x16.png");
} else { } else {
icon = path.join(__dirname, "resources/icons/256x256.png"); icon = path.join(__dirname, "resources/icons/256x256.png");

@ -433,6 +433,7 @@ class YtDownloaderApp {
// Error details // Error details
$(CONSTANTS.DOM_IDS.ERROR_DETAILS).addEventListener("click", (e) => { $(CONSTANTS.DOM_IDS.ERROR_DETAILS).addEventListener("click", (e) => {
// @ts-ignore
clipboard.writeText(e.target.innerText); clipboard.writeText(e.target.innerText);
this._showPopup("Copied error details to clipboard."); this._showPopup("Copied error details to clipboard.");
}); });

Loading…
Cancel
Save