Compare commits

...

16 Commits

Author SHA1 Message Date
Moyasee
91adb97013 refactor: improve code formatting and consistency in DownloadManager 2025-12-27 02:50:27 +02:00
Chubby Granny Chaser
f138b2efcb Merge pull request #1906 from Wkeynhk/main
Buzzheavier fix
2025-12-27 00:47:44 +00:00
Wkeynhk
991aa05760 Sonar fix2 2025-12-27 03:23:36 +03:00
Wkeynhk
aff9e13bca Sonar fix 2025-12-27 03:17:42 +03:00
Wkeynhk
240a75c1d0 Buzzheavier fix 2025-12-27 03:02:35 +03:00
Chubby Granny Chaser
edbe86a1fb Merge pull request #1904 from hydralauncher/feat/LBX-155
Some checks failed
Build / build (ubuntu-latest) (push) Has been cancelled
Build / build (windows-2022) (push) Has been cancelled
fix: notification item styling
2025-12-26 22:54:13 +00:00
Moyasee
a01e1b1709 style: formatting 2025-12-27 00:51:26 +02:00
Moyase
60fd90820c Merge branch 'main' into feat/LBX-155 2025-12-27 00:44:35 +02:00
Moyasee
798f88618e style: enhance notification item styles with color adjustments and SVG inheritance 2025-12-27 00:42:23 +02:00
Moyasee
40795c34dc Merge branch 'feat/LBX-155' of https://github.com/hydralauncher/hydra into feat/LBX-155 2025-12-27 00:39:01 +02:00
Moyasee
e335e05628 style: update notification item styles for improved layout and alignment 2025-12-27 00:32:15 +02:00
Chubby Granny Chaser
05464f25df Merge pull request #1882 from keipa/patch-1
Adding chocolatey publishing
2025-12-26 22:20:57 +00:00
Chubby Granny Chaser
b9830afca1 Merge branch 'main' into patch-1 2025-12-26 22:20:33 +00:00
Chubby Granny Chaser
1cab73bcb4 Merge pull request #1865 from hydralauncher/feat/disabling-update-badges
feat: checkbox to disable new game update badges
2025-12-26 21:57:44 +00:00
Nikolay Rovdo
387b3ebeac Merge branch 'main' into patch-1 2025-12-22 15:04:41 +01:00
Nikolay Rovdo
1545f42d17 Adding chocolatey publishing 2025-11-30 14:51:24 +01:00
3 changed files with 31 additions and 8 deletions

View File

@@ -10,6 +10,7 @@
[![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions) [![build](https://img.shields.io/github/actions/workflow/status/hydralauncher/hydra/build.yml)](https://github.com/hydralauncher/hydra/actions)
[![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases) [![release](https://img.shields.io/github/package-json/v/hydralauncher/hydra)](https://github.com/hydralauncher/hydra/releases)
[![chocolatey](https://img.shields.io/chocolatey/v/hydralauncher.svg)](https://community.chocolatey.org/packages/hydralauncher)
![Hydra Launcher Home Page](./docs/screenshot.png) ![Hydra Launcher Home Page](./docs/screenshot.png)

View File

@@ -35,18 +35,27 @@ export class DownloadManager {
): string | undefined { ): string | undefined {
if (originalUrl?.includes("#")) { if (originalUrl?.includes("#")) {
const hashPart = originalUrl.split("#")[1]; const hashPart = originalUrl.split("#")[1];
if (hashPart && !hashPart.startsWith("http")) return hashPart; if (hashPart && !hashPart.startsWith("http") && hashPart.includes(".")) {
return hashPart;
}
} }
if (url.includes("#")) { if (url.includes("#")) {
const hashPart = url.split("#")[1]; const hashPart = url.split("#")[1];
if (hashPart && !hashPart.startsWith("http")) return hashPart; if (hashPart && !hashPart.startsWith("http") && hashPart.includes(".")) {
return hashPart;
}
} }
try { try {
const urlObj = new URL(url); const urlObj = new URL(url);
const filename = urlObj.pathname.split("/").pop(); const pathname = urlObj.pathname;
if (filename?.length) return filename; const pathParts = pathname.split("/");
const filename = pathParts[pathParts.length - 1];
if (filename?.includes(".") && filename.length > 0) {
return decodeURIComponent(filename);
}
} catch { } catch {
// Invalid URL // Invalid URL
} }
@@ -55,7 +64,7 @@ export class DownloadManager {
} }
private static sanitizeFilename(filename: string): string { private static sanitizeFilename(filename: string): string {
return filename.replace(/[<>:"/\\|?*]/g, "_"); return filename.replaceAll(/[<>:"/\\|?*]/g, "_");
} }
private static createDownloadPayload( private static createDownloadPayload(
@@ -64,13 +73,19 @@ export class DownloadManager {
downloadId: string, downloadId: string,
savePath: string savePath: string
) { ) {
const filename = this.extractFilename(directUrl, originalUrl); const filename =
this.extractFilename(originalUrl, directUrl) ||
this.extractFilename(directUrl);
const sanitizedFilename = filename const sanitizedFilename = filename
? this.sanitizeFilename(filename) ? this.sanitizeFilename(filename)
: undefined; : undefined;
if (sanitizedFilename) { if (sanitizedFilename) {
logger.log(`[DownloadManager] Using filename: ${sanitizedFilename}`); logger.log(`[DownloadManager] Using filename: ${sanitizedFilename}`);
} else {
logger.log(
`[DownloadManager] No filename extracted, aria2 will use default`
);
} }
return { return {
@@ -227,10 +242,10 @@ export class DownloadManager {
) )
) { ) {
gameFilesManager.extractDownloadedFile(); gameFilesManager.extractDownloadedFile();
} else { } else if (download.folderName) {
gameFilesManager gameFilesManager
.extractFilesInDirectory( .extractFilesInDirectory(
path.join(download.downloadPath, download.folderName!) path.join(download.downloadPath, download.folderName)
) )
.then(() => gameFilesManager.setExtractionComplete()); .then(() => gameFilesManager.setExtractionComplete());
} }

View File

@@ -11,6 +11,8 @@
transition: all ease 0.2s; transition: all ease 0.2s;
position: relative; position: relative;
opacity: 0.4; opacity: 0.4;
width: 100%;
text-align: left;
&:hover { &:hover {
background-color: rgba(255, 255, 255, 0.03); background-color: rgba(255, 255, 255, 0.03);
@@ -40,12 +42,17 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: globals.$background-color; background-color: globals.$background-color;
color: #fff;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: cover; object-fit: cover;
} }
svg {
color: inherit;
}
} }
&__badge-picture { &__badge-picture {