fix: small code quality and mismatch.

This commit is contained in:
MasterAcnolo
2026-06-28 21:34:00 +02:00
parent a56a070bc8
commit eebce83976
7 changed files with 9 additions and 10 deletions

View File

@@ -105,7 +105,7 @@ Freedom-Loader/
│ ├── controller/ # Business logic
│ └── helpers/ # Utility functions
├── public/ # Frontend (HTML, CSS, JS)
└── ressources/ # Binaries (yt-dlp, ffmpeg, etc.)
└── resources/ # Binaries (yt-dlp, ffmpeg, etc.)
```
---

View File

@@ -5,7 +5,7 @@
We actively maintain and provide security updates for the following versions of Freedom Loader:
| Version | Supported |
| ------- | ------------------ |
|---------|--------------------|
| 1.4.x | :white_check_mark: |
| 1.3.x | :white_check_mark: |
| < 1.3.0 | :x: |

View File

@@ -15,7 +15,7 @@ const { logger } = require("../server/logger");
/**
* Configures autoUpdater behavior:
* - disables automatic download
* - disables automatic install on quit
* - disables automatic installation on quit
* (manual user-controlled update flow)
*/
autoUpdater.autoDownload = false;
@@ -51,7 +51,7 @@ function initAutoUpdater(mainWindow) {
});
if (response === 0) {
autoUpdater.downloadUpdate();
await autoUpdater.downloadUpdate();
} else {
mainWindow?.webContents.executeJavaScript(
`window.showUpdateBadge && window.showUpdateBadge("${info.version}")`
@@ -108,6 +108,9 @@ function initAutoUpdater(mainWindow) {
* Separated from init for reusability and testability.
*/
async function checkForUpdates() {
if (!require("electron").app.isPackaged) return ;
try {
await autoUpdater.checkForUpdates();
} catch (err) {

View File

@@ -12,7 +12,6 @@
const { ipcMain, dialog, shell } = require("electron");
const fs = require("fs");
const path = require("path");
const { logger, logDir } = require("../server/logger");
const { configFeatures, featuresPath } = require("../config");
const { getThemes, reloadThemes } = require("./themeManager");

View File

@@ -270,7 +270,6 @@ async function loadThemesFromFolder() {
if (fs.statSync(filePath).isDirectory()) {
const theme = await loadThemeFromFolder(filePath, themeId);
if (theme) themes.push(theme);
continue;
}
}

View File

@@ -17,9 +17,7 @@ document.addEventListener("DOMContentLoaded", () => {
*/
pasteBtn.addEventListener("click", async () => {
try {
const text = await navigator.clipboard.readText();
urlInput.value = text;
urlInput.value = await navigator.clipboard.readText();
// Notify frameworks / listeners bound to input changes
urlInput.dispatchEvent(new Event("input", { bubbles: true }));

View File

@@ -271,6 +271,6 @@ async function init() {
})
};
}
init();