+ MineXLauncher 1.5 +
  • hello there
  • +
    MineXLauncher 1.4
  • Added welcome and setup screen
  • Show changelog when MineXLauncher is updated
  • diff --git a/public/welcome.html b/public/welcome.html index 463ab3c..2d8c5be 100644 --- a/public/welcome.html +++ b/public/welcome.html @@ -15,7 +15,7 @@
    - MineXLauncher 1.4 + MineXLauncher 1.5
    diff --git a/src/resources/scripts/main.ts b/src/resources/scripts/main.ts index 766c186..d9c9e64 100644 --- a/src/resources/scripts/main.ts +++ b/src/resources/scripts/main.ts @@ -1,5 +1,5 @@ let selectedVersion: string | undefined; -const launcherVersion = '1.4'; +const launcherVersion = '1.5'; const theme = { load: function (themeToLoad?: string) { @@ -284,13 +284,7 @@ if (window.location.pathname !== '/') { alert(`MineXLauncher has been updated to v${launcherVersion}! Changes in v${launcherVersion}: - - Added welcome and setup screen - - Show changelog when MineXLauncher is updated - - Added themes and backgrounds - - Settings now update automatically without saving them - - You will now stay on the same page when reloading - - Username rules have been updated to match Minecraft - - Added Starlike Client`); + - hello there`); storage.local.set('lastVersion', launcherVersion); } }); diff --git a/src/resources/scripts/mods/mods.ts b/src/resources/scripts/mods/mods.ts index b4579b5..2b74571 100644 --- a/src/resources/scripts/mods/mods.ts +++ b/src/resources/scripts/mods/mods.ts @@ -1,29 +1,29 @@ -document.addEventListener('DOMContentLoaded', function () { - fetch('/resources/data/mods.json') - .then((response) => response.json()) - .then((data: { mods: { [x: string]: string; icon: string; author: string; description: string }[] }) => { - const modListElement = document.querySelector('.mod-list'); - data.mods.forEach((mod: { [x: string]: string; icon: string; author: string; description: string }) => { - const modItem = document.createElement('div'); - modItem.classList.add('mod-item'); - modItem.innerHTML = ` -
    - +document.addEventListener('DOMContentLoaded', async () => { + try { + const response = await fetch('/resources/data/mods.json'); + const data = await response.json(); + const modListElement = document.querySelector('.mod-list'); + + data.mods.forEach(({ icon, author, description, displayName, authorLink, repoLink, downloadLink }) => { + const modItem = document.createElement('div'); + modItem.classList.add('mod-item'); + modItem.innerHTML = ` +
    + +
    +
    +

    ${displayName}

    +

    By ${author}

    +

    ${description}

    + -
    -

    ${mod['display-name'] ?? ''}

    -

    By ${mod.author}

    -

    ${mod.description}

    - -
    - `; - modListElement?.appendChild(modItem); - }); - }) - .catch((error: unknown) => { - console.error('Error fetching mods:', error); +
    + `; + modListElement?.appendChild(modItem); }); + } catch (error) { + console.error('Error fetching mods:', error); + } });