mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
fix: small code quality and mismatch.
This commit is contained in:
@@ -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.)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -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: |
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -270,7 +270,6 @@ async function loadThemesFromFolder() {
|
||||
if (fs.statSync(filePath).isDirectory()) {
|
||||
const theme = await loadThemeFromFolder(filePath, themeId);
|
||||
if (theme) themes.push(theme);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 }));
|
||||
|
||||
@@ -271,6 +271,6 @@ async function init() {
|
||||
|
||||
})
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
init();
|
||||
Reference in New Issue
Block a user