mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 09:24:48 +00:00
update to 1.6.0-beta.1
This commit is contained in:
parent
e1c382be28
commit
0a58472584
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<link rel="stylesheet" id="theme" />
|
<link rel="stylesheet" id="theme" />
|
||||||
<script src="/resources/scripts/google-tag.js"></script>
|
<script src="/resources/scripts/google-tag.js"></script>
|
||||||
<script src="/resources/scripts/main.js"></script>
|
<script src="/resources/scripts/main.js"></script>
|
||||||
<script src="/resources/scripts/mods/mods.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="ads-container">
|
<div class="ads-container">
|
||||||
@ -17,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
<link rel="stylesheet" id="theme" />
|
<link rel="stylesheet" id="theme" />
|
||||||
<script src="/resources/scripts/google-tag.js"></script>
|
<script src="/resources/scripts/google-tag.js"></script>
|
||||||
<script src="/resources/scripts/main.js"></script>
|
<script src="/resources/scripts/main.js"></script>
|
||||||
<script src="/resources/scripts/mods/resourcepacks.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="ads-container">
|
<div class="ads-container">
|
||||||
@ -17,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="main-panel">
|
<div class="main-panel">
|
||||||
|
59
public/resources/data/updates.json
Normal file
59
public/resources/data/updates.json
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"version": "1.6.0",
|
||||||
|
"changelog": [
|
||||||
|
"You can now install mods directly from the mods list"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.5.0",
|
||||||
|
"changelog": [
|
||||||
|
"You can now install the launcher as a PWA web app"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.4.0",
|
||||||
|
"changelog": [
|
||||||
|
"Added Starlike Client",
|
||||||
|
"Added welcome and setup screen",
|
||||||
|
"Show changelog when the launcher 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"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.3.0",
|
||||||
|
"changelog": [
|
||||||
|
"Redesigned archive page",
|
||||||
|
"Added offline page"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.2.0",
|
||||||
|
"changelog": [
|
||||||
|
"Added Eaglercraft 1.2.5",
|
||||||
|
"Added more mods and resource packs",
|
||||||
|
"Fix and optimize mobile site"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.1.0",
|
||||||
|
"changelog": [
|
||||||
|
"Added a mods and resource packs list",
|
||||||
|
"Temporary workaround for keyboard not working in the game",
|
||||||
|
"Moved most images and assets to this websites in case they are blocked",
|
||||||
|
"Added a 404 page",
|
||||||
|
"Added Discord link to bottom bar",
|
||||||
|
"Added Peyton's Infdev and Classic versions",
|
||||||
|
"Updated client versions"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.0.0",
|
||||||
|
"changelog": [
|
||||||
|
"Major rewrite, check it out yourself!"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
@ -359,14 +359,18 @@ nav {
|
|||||||
color: #ddd;
|
color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.news-item {
|
.updates-container {
|
||||||
flex: 1;
|
margin: 20px;
|
||||||
padding: 20px;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.news-item li {
|
.updates-container strong {
|
||||||
padding-left: 20px;
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.updates-container ul {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 5px 0 20px 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.minecraft-button {
|
.minecraft-button {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
@ -51,40 +51,7 @@
|
|||||||
<span class="game-title">Updates</span>
|
<span class="game-title">Updates</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<div class="news-item">
|
<div class="updates-container" id="updates-container"></div>
|
||||||
<!-- Don't forget to update launcherVersion and the changelog in main.js as well -->
|
|
||||||
<strong>MineXLauncher 1.5</strong>
|
|
||||||
<li>You can now install the launcher as a PWA web app</li>
|
|
||||||
<br />
|
|
||||||
<strong>MineXLauncher 1.4</strong>
|
|
||||||
<li>Added welcome and setup screen</li>
|
|
||||||
<li>Show changelog when the launcher is updated</li>
|
|
||||||
<li>Added themes and backgrounds</li>
|
|
||||||
<li>Settings now update automatically without saving them</li>
|
|
||||||
<li>You will now stay on the same page when reloading</li>
|
|
||||||
<li>Username rules have been updated to match Minecraft</li>
|
|
||||||
<li>Added Starlike Client</li>
|
|
||||||
<br />
|
|
||||||
<strong>MineXLauncher 1.3</strong>
|
|
||||||
<li>Redesigned Archive Page</li>
|
|
||||||
<li>Added offline page</li>
|
|
||||||
<br />
|
|
||||||
<strong>MineXLauncher 1.2</strong>
|
|
||||||
<li>Added Eaglercraft 1.2.5</li>
|
|
||||||
<li>Added more mods and resource packs</li>
|
|
||||||
<li>Fix and optimize mobile site</li>
|
|
||||||
<br />
|
|
||||||
<strong>MineXLauncher 1.1</strong>
|
|
||||||
<li>Temporary workaround for keyboard not working in the game</li>
|
|
||||||
<li>Moved most images and assets to this websites in case they are blocked</li>
|
|
||||||
<li>Added a 404 page</li>
|
|
||||||
<li>Added Discord link to bottom bar</li>
|
|
||||||
<li>Added Peyton's Infdev and Classic versions</li>
|
|
||||||
<li>Updated client versions</li>
|
|
||||||
<br />
|
|
||||||
<strong>MineXLauncher 1.0</strong>
|
|
||||||
<li>Major rewrite, check it out yourself!</li>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="launcher">
|
<div class="launcher">
|
||||||
<div class="title-bar">
|
<div class="title-bar">
|
||||||
<span>MineXLauncher 1.5</span>
|
<span>MineXLauncher 1.6.0</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="main-panel">
|
<div class="main-panel">
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
import { gt, coerce } from 'semver';
|
import { SemVer, gt } from 'semver';
|
||||||
|
|
||||||
let selectedVersion: string | undefined;
|
let selectedVersion: string | undefined;
|
||||||
const launcherVersion = '1.5';
|
|
||||||
|
// Update `cacheVersion` in sw.js too
|
||||||
|
const launcherVersion: SemVer = new SemVer('1.6.0-beta.1');
|
||||||
|
const releaseNotes = ['You can now install mods directly from the mods list'];
|
||||||
|
|
||||||
const theme = {
|
const theme = {
|
||||||
load: function (themeToLoad?: string) {
|
load: function (themeToLoad?: string) {
|
||||||
@ -298,7 +301,7 @@ const mods = {
|
|||||||
mods.splice(modIndex, 1);
|
mods.splice(modIndex, 1);
|
||||||
storage.local.set('mods', mods);
|
storage.local.set('mods', mods);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const serviceworker = {
|
const serviceworker = {
|
||||||
@ -381,10 +384,8 @@ if (window.location.pathname === '/') {
|
|||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const lastVersion = storage.local.get('lastVersion');
|
const lastVersion = storage.local.get('lastVersion');
|
||||||
// @ts-expect-error
|
if (lastVersion !== null && gt(launcherVersion, lastVersion)) {
|
||||||
if (lastVersion !== null && gt(coerce(launcherVersion, { includePrerelease: true }), coerce(lastVersion, { includePrerelease: true }))) {
|
alert(`MineXLauncher has been updated to v${launcherVersion}!\n\nChanges in v${launcherVersion}:\n${releaseNotes.map((item) => ` - ${item}`).join('\n')}`);
|
||||||
const releaseNotes = ['You can now install the launcher as a PWA web app'].map((item) => ` - ${item}`).join('\n');
|
|
||||||
alert(`MineXLauncher has been updated to v${launcherVersion}!\n\nChanges in v${launcherVersion}:\n${releaseNotes}`);
|
|
||||||
storage.local.set('lastVersion', launcherVersion);
|
storage.local.set('lastVersion', launcherVersion);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -446,9 +447,7 @@ if (window.location.pathname === '/settings/') {
|
|||||||
window.location.reload();
|
window.location.reload();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
} else if (window.location.pathname === '/welcome/') {
|
||||||
|
|
||||||
if (window.location.pathname === '/welcome/') {
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
const setupForm = document.getElementById('setup-form') as HTMLFormElement;
|
const setupForm = document.getElementById('setup-form') as HTMLFormElement;
|
||||||
const usernameInput = document.getElementById('username-input') as HTMLInputElement;
|
const usernameInput = document.getElementById('username-input') as HTMLInputElement;
|
||||||
@ -505,6 +504,51 @@ if (window.location.pathname === '/welcome/') {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if (window.location.pathname === '/mods/mods/' || window.location.pathname === '/mods/resourcepacks/') {
|
||||||
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
let modType: 'mods' | 'resourcepacks' = 'mods';
|
||||||
|
let modExt: 'js' | 'zip' = 'js';
|
||||||
|
switch (window.location.pathname) {
|
||||||
|
case '/mods/mods/':
|
||||||
|
modType = 'mods';
|
||||||
|
modExt = 'js';
|
||||||
|
break;
|
||||||
|
case '/mods/resourcepacks/':
|
||||||
|
modType = 'resourcepacks';
|
||||||
|
modExt = 'zip';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
const mods = await (await fetch('/resources/data/mods.json')).json();
|
||||||
|
mods[modType].forEach((mod: { id: string; name: string; description: string; author: string; authorLink: string; source: string }) => {
|
||||||
|
const modItem = document.createElement('div');
|
||||||
|
modItem.classList.add('mod-item');
|
||||||
|
modItem.innerHTML = `<div class="mod-icon"><img loading="lazy" src="/resources/mods/icons/${mod.id}.webp" /></div><div class="mod-details"><h3 class="mod-name">${mod.name}</h3><p class="mod-author">By <a href="${mod.authorLink}" target="_blank">${mod.author}</a></p><p class="mod-description">${mod.description}</p><div class="mod-links"><a href="${mod.source}" class="mod-link" target="_blank">Source</a><a href="/resources/mods/downloads/${mod.id}.${modExt}" class="mod-link" download>Download</a></div></div>`;
|
||||||
|
|
||||||
|
const modList = document.querySelector('.mod-list');
|
||||||
|
modList?.appendChild(modItem);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else if (window.location.pathname === '/updates/') {
|
||||||
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
const updatesContainer = document.getElementById('updates-container');
|
||||||
|
const updates = await (await fetch('/resources/data/updates.json')).json();
|
||||||
|
|
||||||
|
updates.forEach((update: { version: string; changelog: string[] }) => {
|
||||||
|
const versionHeader = document.createElement('strong');
|
||||||
|
versionHeader.textContent = `MineXLauncher ${update.version}`;
|
||||||
|
updatesContainer?.appendChild(versionHeader);
|
||||||
|
|
||||||
|
const changelog = document.createElement('ul');
|
||||||
|
update.changelog.forEach((change) => {
|
||||||
|
const changelogItem = document.createElement('li');
|
||||||
|
changelogItem.textContent = change;
|
||||||
|
changelog.appendChild(changelogItem);
|
||||||
|
});
|
||||||
|
|
||||||
|
updatesContainer?.appendChild(changelog);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.location.hostname === null) {
|
if (window.location.hostname === null) {
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
document.addEventListener('DOMContentLoaded', async () => {
|
|
||||||
const response = await fetch('/resources/mods/data.json');
|
|
||||||
const data = await response.json();
|
|
||||||
const modListElement = document.querySelector('.mod-list');
|
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
data.mods.forEach(({ id, name, description, author, authorLink, source }) => {
|
|
||||||
const div = document.createElement('div');
|
|
||||||
div.classList.add('mod-item');
|
|
||||||
div.innerHTML = `<div class="mod-icon"><img loading="lazy" src="/resources/mods/icons/${id}.webp" /></div><div class="mod-details"><h3 class="mod-name">${name}</h3><p class="mod-author">By <a href="${authorLink}" target="_blank">${author}</a></p><p class="mod-description">${description}</p><div class="mod-links"><a href="${source}" class="mod-link" target="_blank">Source</a><a href="/resources/mods/downloads/${id}.js" class="mod-link" download>Download</a></div></div>`;
|
|
||||||
modListElement?.appendChild(div);
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,13 +0,0 @@
|
|||||||
document.addEventListener('DOMContentLoaded', async () => {
|
|
||||||
const response = await fetch('/resources/mods/data.json');
|
|
||||||
const data = await response.json();
|
|
||||||
const modListElement = document.querySelector('.mod-list');
|
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
data.resourcepacks.forEach(({ id, name, description, author, authorLink, source }) => {
|
|
||||||
const div = document.createElement('div');
|
|
||||||
div.classList.add('mod-item');
|
|
||||||
div.innerHTML = `<div class="mod-icon"><img loading="lazy" src="/resources/mods/icons/${id}.webp" /></div><div class="mod-details"><h3 class="mod-name">${name}</h3><p class="mod-author">By <a href="${authorLink}" target="_blank">${author}</a></p><p class="mod-description">${description}</p><div class="mod-links"><a href="${source}" class="mod-link" target="_blank">Source</a><a href="/resources/mods/downloads/${id}.zip" class="mod-link" download>Download</a></div></div>`;
|
|
||||||
modListElement?.appendChild(div);
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,5 +1,5 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
const cacheVersion = '1.5';
|
const cacheVersion = '1.6.0';
|
||||||
const cacheName = `minexlauncher-full-v${cacheVersion}`;
|
const cacheName = `minexlauncher-full-v${cacheVersion}`;
|
||||||
|
|
||||||
self.addEventListener('install', (event) => {
|
self.addEventListener('install', (event) => {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
const cacheVersion = '1.5';
|
const cacheVersion = '1.6.0';
|
||||||
const cacheName = `minexlauncher-v${cacheVersion}`;
|
const cacheName = `minexlauncher-v${cacheVersion}`;
|
||||||
const offlineUrl = '/offline.html';
|
const offlineUrl = '/offline.html';
|
||||||
const cacheAssets = [
|
const cacheAssets = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user