Different name and icons for beta web app

This commit is contained in:
JannisX11 2024-09-13 15:51:46 +02:00
parent 849446821e
commit 8994cc637b
7 changed files with 50 additions and 12 deletions

View File

@ -626,6 +626,7 @@
flex-shrink: 0;
overflow: hidden;
position: relative;
pointer-events: none;
}
.texture.selected img.texture_icon {
margin-top: 0;

BIN
icons/favicon_beta.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

37
manifest-beta.webmanifest Normal file
View File

@ -0,0 +1,37 @@
{
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/web-manifest.json",
"short_name": "Blockbench",
"name": "Blockbench Beta",
"icons": [
{
"src": "icons/favicon_beta.png",
"type": "image/png",
"sizes": "128x128"
},
{
"src": "icons/icon_maskable_beta.png",
"type": "image/png",
"sizes": "1024x1024"
},
{
"src": "icons/icon_maskable_beta.png",
"type": "image/png",
"sizes": "256x256",
"purpose": "maskable"
}
],
"screenshots": [
{
"src": "content/front_page_app.png",
"sizes": "1920x1040",
"type": "image/png",
"label": "Blockbench Interface"
}
],
"start_url": "./index.html",
"background_color": "#21252b",
"theme_color": "#3e90ff",
"display": "standalone",
"display_override": ["window-controls-overlay"],
"orientation": "any"
}

View File

@ -122,6 +122,7 @@
"publish-windows": "npm run bundle && electron-builder -w --publish=onTagOrDraft && node ./scripts/rename_portable.js && electron-builder --windows portable --publish=onTagOrDraft",
"pwa": "node ./scripts/generate_pwa.js",
"prepublish": "npm run bundle && npm run pwa",
"prepublish-beta": "node ./scripts/enable_beta.js && npm run bundle && npm run pwa",
"webapp": "git checkout gh-pages && git pull && git merge master && git push && git checkout master"
},
"devDependencies": {

11
scripts/enable_beta.js Normal file
View File

@ -0,0 +1,11 @@
const fs = require('fs');
const index_path = './index.html';
let package_file = fs.readFileSync(index_path, {encoding: 'utf-8'});
package_file = package_file.replace('manifest.webmanifest', 'manifest-beta.webmanifest');
package_file = package_file.replace('favicon.png', 'icons/favicon_beta.png');
fs.writeFileSync(index_path, package_file, {encoding: 'utf-8'});
console.log('Changed index.html and manifest file to beta');

View File

@ -1,12 +0,0 @@
const fs = require('fs');
const package_path = './package.json';
let package_file = fs.readFileSync(package_path, {encoding: 'utf-8'});
let package = JSON.parse(package_file);
package.build.artifactName = "${productName}_32bit_${version}.${ext}";
package_file = JSON.stringify(package, null, '\t');
fs.writeFileSync(package_path, package_file, {encoding: 'utf-8'});
console.log('Changed artifactName for 32bit build');