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
|
│ ├── controller/ # Business logic
|
||||||
│ └── helpers/ # Utility functions
|
│ └── helpers/ # Utility functions
|
||||||
├── public/ # Frontend (HTML, CSS, JS)
|
├── 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:
|
We actively maintain and provide security updates for the following versions of Freedom Loader:
|
||||||
|
|
||||||
| Version | Supported |
|
| Version | Supported |
|
||||||
| ------- | ------------------ |
|
|---------|--------------------|
|
||||||
| 1.4.x | :white_check_mark: |
|
| 1.4.x | :white_check_mark: |
|
||||||
| 1.3.x | :white_check_mark: |
|
| 1.3.x | :white_check_mark: |
|
||||||
| < 1.3.0 | :x: |
|
| < 1.3.0 | :x: |
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const { logger } = require("../server/logger");
|
|||||||
/**
|
/**
|
||||||
* Configures autoUpdater behavior:
|
* Configures autoUpdater behavior:
|
||||||
* - disables automatic download
|
* - disables automatic download
|
||||||
* - disables automatic install on quit
|
* - disables automatic installation on quit
|
||||||
* (manual user-controlled update flow)
|
* (manual user-controlled update flow)
|
||||||
*/
|
*/
|
||||||
autoUpdater.autoDownload = false;
|
autoUpdater.autoDownload = false;
|
||||||
@@ -51,7 +51,7 @@ function initAutoUpdater(mainWindow) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response === 0) {
|
if (response === 0) {
|
||||||
autoUpdater.downloadUpdate();
|
await autoUpdater.downloadUpdate();
|
||||||
} else {
|
} else {
|
||||||
mainWindow?.webContents.executeJavaScript(
|
mainWindow?.webContents.executeJavaScript(
|
||||||
`window.showUpdateBadge && window.showUpdateBadge("${info.version}")`
|
`window.showUpdateBadge && window.showUpdateBadge("${info.version}")`
|
||||||
@@ -108,6 +108,9 @@ function initAutoUpdater(mainWindow) {
|
|||||||
* Separated from init for reusability and testability.
|
* Separated from init for reusability and testability.
|
||||||
*/
|
*/
|
||||||
async function checkForUpdates() {
|
async function checkForUpdates() {
|
||||||
|
|
||||||
|
if (!require("electron").app.isPackaged) return ;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await autoUpdater.checkForUpdates();
|
await autoUpdater.checkForUpdates();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
const { ipcMain, dialog, shell } = require("electron");
|
const { ipcMain, dialog, shell } = require("electron");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
|
||||||
const { logger, logDir } = require("../server/logger");
|
const { logger, logDir } = require("../server/logger");
|
||||||
const { configFeatures, featuresPath } = require("../config");
|
const { configFeatures, featuresPath } = require("../config");
|
||||||
const { getThemes, reloadThemes } = require("./themeManager");
|
const { getThemes, reloadThemes } = require("./themeManager");
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ async function loadThemesFromFolder() {
|
|||||||
if (fs.statSync(filePath).isDirectory()) {
|
if (fs.statSync(filePath).isDirectory()) {
|
||||||
const theme = await loadThemeFromFolder(filePath, themeId);
|
const theme = await loadThemeFromFolder(filePath, themeId);
|
||||||
if (theme) themes.push(theme);
|
if (theme) themes.push(theme);
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
*/
|
*/
|
||||||
pasteBtn.addEventListener("click", async () => {
|
pasteBtn.addEventListener("click", async () => {
|
||||||
try {
|
try {
|
||||||
const text = await navigator.clipboard.readText();
|
urlInput.value = await navigator.clipboard.readText();
|
||||||
|
|
||||||
urlInput.value = text;
|
|
||||||
|
|
||||||
// Notify frameworks / listeners bound to input changes
|
// Notify frameworks / listeners bound to input changes
|
||||||
urlInput.dispatchEvent(new Event("input", { bubbles: true }));
|
urlInput.dispatchEvent(new Event("input", { bubbles: true }));
|
||||||
|
|||||||
@@ -271,6 +271,6 @@ async function init() {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
init();
|
init();
|
||||||
Reference in New Issue
Block a user