Merge pull request #254 from Ratintosh/assets-refactor

Move static assets into assets/ directory
This commit is contained in:
gardenGnostic 2026-04-17 17:32:10 +02:00 committed by GitHub
commit a42c1a9b0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 15 additions and 14 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
node_modules/

View file

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 987 KiB

After

Width:  |  Height:  |  Size: 987 KiB

View file

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 320 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LegacyLauncher</title> <title>LegacyLauncher</title>
<link rel="icon" type="image/png" href="512x512.png"> <link rel="icon" type="image/png" href="assets/512x512.png">
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
</head> </head>
@ -46,7 +46,7 @@
<!-- Classic Mode: Logo + Splash (only visible in classic theme) --> <!-- Classic Mode: Logo + Splash (only visible in classic theme) -->
<div class="classic-logo-area" id="classic-logo-area"> <div class="classic-logo-area" id="classic-logo-area">
<div style="position: relative;"> <div style="position: relative;">
<img src="minecraftlogo.png" class="mc-logo-img" alt="Minecraft Logo" style="margin-bottom: 0; margin-top: 0;"> <img src="assets/minecraftlogo.png" class="mc-logo-img" alt="Minecraft Logo" style="margin-bottom: 0; margin-top: 0;">
<div id="classic-splash-text" class="splash-text">Splash!</div> <div id="classic-splash-text" class="splash-text">Splash!</div>
</div> </div>
</div> </div>
@ -54,7 +54,7 @@
<!-- Left Side: Main Menu --> <!-- Left Side: Main Menu -->
<div class="menu-column" style="flex: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 5;"> <div class="menu-column" style="flex: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 5;">
<div class="relative"> <div class="relative">
<img src="minecraftlogo.png" class="mc-logo-img" alt="Minecraft Logo"> <img src="assets/minecraftlogo.png" class="mc-logo-img" alt="Minecraft Logo">
<div id="splash-text" class="splash-text">Splash!</div> <div id="splash-text" class="splash-text">Splash!</div>
</div> </div>
@ -70,7 +70,7 @@
</select> </select>
</div> </div>
<div id="btn-check-update" class="btn-mc btn-mini nav-item" onclick="checkForUpdatesManual()" title="Check for Updates" tabindex="0"> <div id="btn-check-update" class="btn-mc btn-mini nav-item" onclick="checkForUpdatesManual()" title="Check for Updates" tabindex="0">
<img src="restart.png" alt="Update"> <img src="assets/restart.png" alt="Update">
</div> </div>
</div> </div>

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "legacylauncher", "name": "legacylauncher",
"version": "3.0.1", "version": "3.5.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "legacylauncher", "name": "legacylauncher",
"version": "3.0.1", "version": "3.5.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"electron-store": "^6.0.1", "electron-store": "^6.0.1",

View file

@ -352,8 +352,8 @@ const GamepadManager = {
const UiSoundManager = { const UiSoundManager = {
files: { files: {
cursor: 'JDSherbert - Ultimate UI SFX Pack - Cursor - 1.mp3', cursor: 'JDSherbert - Ultimate UI SFX Pack - Cursor - 1.mp3', //doesnt exist?
select: 'Click_stereo.ogg.mp3', select: 'assets/Click_stereo.ogg.mp3',
cancel: 'JDSherbert - Ultimate UI SFX Pack - Cancel - 1.mp3', cancel: 'JDSherbert - Ultimate UI SFX Pack - Cancel - 1.mp3',
popupOpen: 'JDSherbert - Ultimate UI SFX Pack - Popup Open - 1.mp3', popupOpen: 'JDSherbert - Ultimate UI SFX Pack - Popup Open - 1.mp3',
popupClose: 'JDSherbert - Ultimate UI SFX Pack - Popup Close - 1.mp3', popupClose: 'JDSherbert - Ultimate UI SFX Pack - Popup Close - 1.mp3',
@ -990,7 +990,7 @@ async function renderGallery() {
item.className = 'gallery-item nav-item'; item.className = 'gallery-item nav-item';
item.tabIndex = 0; item.tabIndex = 0;
item.innerHTML = ` item.innerHTML = `
<img src="${ss.path}?t=${Date.now()}" class="gallery-thumb" alt="${ss.name}" onerror="this.src='minecraft.jpg'"> <img src="${ss.path}?t=${Date.now()}" class="gallery-thumb" alt="${ss.name}" onerror="this.src='assets/minecraft.jpg'">
<div class="gallery-item-actions"> <div class="gallery-item-actions">
<div class="gallery-action-btn" onclick="viewScreenshot('${ss.path.replace(/\\/g, '/')}')">VIEW</div> <div class="gallery-action-btn" onclick="viewScreenshot('${ss.path.replace(/\\/g, '/')}')">VIEW</div>
<div class="gallery-action-btn delete" onclick="deleteScreenshot('${ss.name}')">DELETE</div> <div class="gallery-action-btn delete" onclick="deleteScreenshot('${ss.name}')">DELETE</div>

View file

@ -1,6 +1,6 @@
@font-face { @font-face {
font-family: 'Minecraft'; font-family: 'Minecraft';
src: url('Minecraft.ttf') format('truetype'); src: url('assets/Minecraft.ttf') format('truetype');
} }
@ -296,7 +296,7 @@ body {
.content-area { .content-area {
flex-grow: 1; flex-grow: 1;
background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('minecraft.jpg'); background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/minecraft.jpg');
background-size: cover; background-size: cover;
background-position: center; background-position: center;
display: flex; display: flex;
@ -810,7 +810,7 @@ body.steamdeck-mode .sidebar {
} }
.controller-layout-icon-xbox { .controller-layout-icon-xbox {
background-image: url('gdb-xbox-2.png'); background-image: url('assets/gdb-xbox-2.png');
/* action_button_189 (idle) + action_button_228 (pressed) from spritesheet JSON */ /* action_button_189 (idle) + action_button_228 (pressed) from spritesheet JSON */
--sprite-x: -51px; --sprite-x: -51px;
--sprite-y: -531px; --sprite-y: -531px;
@ -821,7 +821,7 @@ body.steamdeck-mode .sidebar {
} }
.controller-layout-icon-switch { .controller-layout-icon-switch {
background-image: url('gdb-switch-2.png'); background-image: url('assets/gdb-switch-2.png');
/* Switch sheet uses the same atlas layout coordinates */ /* Switch sheet uses the same atlas layout coordinates */
--sprite-x: -51px; --sprite-x: -51px;
--sprite-y: -531px; --sprite-y: -531px;
@ -850,7 +850,7 @@ body.steamdeck-mode .sidebar {
color: white; color: white;
font-size: 36px; font-size: 36px;
z-index: 2000; z-index: 2000;
background-image: url('minecraft.jpg'); background-image: url('assets/minecraft.jpg');
background-size: cover; background-size: cover;
background-position: center; background-position: center;
} }