1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-08 09:24:48 +00:00
This commit is contained in:
zumbiepig 2024-08-17 19:58:44 -07:00
parent b0a03d94c8
commit ab0ea362b9
6 changed files with 36 additions and 11 deletions

View File

@ -26,12 +26,13 @@
<script> <script>
const iframe = document.createElement('iframe'); const iframe = document.createElement('iframe');
const lastPage = storage.session.get('lastPage'); const lastPage = storage.session.get('lastPage');
const isMobile = detect.mobile();
if (storage.local.get('lastVersion') === null) { if (storage.local.get('lastVersion') === null) {
iframe.src = '/welcome.html'; iframe.src = '/welcome.html';
} else if (lastPage !== null) { } else if (lastPage !== null) {
iframe.src = lastPage; iframe.src = lastPage;
} else if (detect.mobile()) { } else if (isMobile) {
iframe.src = '/mobile/'; iframe.src = '/mobile/';
} else { } else {
iframe.src = '/home/game/'; iframe.src = '/home/game/';

View File

@ -1,19 +1,40 @@
{ {
"name": "MineXLauncher", "name": "MineXLauncher",
"short_name": "MineX",
"description": "Custom launcher for Eaglercraft, which contains many versions and clients.",
"id": "/",
"start_url": "/",
"theme_color": "#333",
"background_color": "#333",
"orientation": "landscape",
"display": "standalone",
"display_override": ["fullscreen"],
"categories": ["games"],
"icons": [ "icons": [
{ {
"src": "/resources/images/icons/minexlauncher-192x192.webp", "src": "/resources/images/icons/minexlauncher.webp",
"sizes": "192x192", "sizes": "192x192 512x512 2048x2048",
"type": "image/webp" "type": "image/webp"
}, },
{ {
"src": "/resources/images/icons/minexlauncher-512x512.webp", "src": "/resources/manifest/icons/maskable-2275x2275.webp",
"sizes": "512x512", "sizes": "192x192 512x512 2275x2275",
"type": "image/webp" "type": "image/webp",
"purpose": "maskable"
} }
], ],
"start_url": "/", "screenshots": [
"display": "standalone", {
"background_color": "#333", "src": "/resources/manifest/screenshots/desktop/later.webp",
"theme_color": "#333" "sizes": "1280x720",
"type": "image/webp",
"form_factor": "wide"
},
{
"src": "/resources/manifest/screenshots/mobile/later.webp",
"sizes": "1280x720",
"type": "image/webp",
"form_factor": "narrow"
}
]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 KiB

View File

@ -260,6 +260,9 @@ const detect = {
return true; return true;
} }
}, },
landscape: function () {
return window.innerWidth > window.innerHeight;
},
}; };
if (detect.mobile()) { if (detect.mobile()) {
@ -284,7 +287,7 @@ if (window.location.pathname !== '/') {
alert(`MineXLauncher has been updated to v${launcherVersion}! alert(`MineXLauncher has been updated to v${launcherVersion}!
Changes in v${launcherVersion}: Changes in v${launcherVersion}:
- hello there`); - You can now install MineXLauncher as a PWA web app`);
storage.local.set('lastVersion', launcherVersion); storage.local.set('lastVersion', launcherVersion);
} }
}); });