diff --git a/manifest.json b/manifest.json index f5e043b..e7f25a4 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { "applicationId": "js.grassclipper.app", - "version": "0.7.3", + "version": "0.7.2", "resourcesURL": "https://github.com/Grasscutters/GrassClipper/releases/latest/download/resources.neu" } \ No newline at end of file diff --git a/neutralino.config.json b/neutralino.config.json index 4336cac..8147edd 100644 --- a/neutralino.config.json +++ b/neutralino.config.json @@ -1,13 +1,12 @@ { "applicationId": "js.grassclipper.app", - "version": "0.7.3", + "version": "0.7.2", "defaultMode": "window", "port": 0, "documentRoot": "/resources/", "url": "/", "enableServer": true, "enableNativeAPI": true, - "tokenSecurity": "one-time", "logging": { "enabled": true, "writeToLogFile": true diff --git a/package.json b/package.json index 30681fd..91f8844 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grassclipper", - "version": "0.7.3", + "version": "0.7.2", "repository": "https://github.com/Grasscutters/GrassClipper.git", "author": "SpikeHD ", "license": "Apache-2.0", diff --git a/resources/banner_creator/banner_creator.html b/resources/banner_creator/banner_creator.html index a7ed832..6fe6474 100644 --- a/resources/banner_creator/banner_creator.html +++ b/resources/banner_creator/banner_creator.html @@ -2,12 +2,14 @@ - + + +
- Select a banner to use as a base (or select no banner to start from scratch) + Select a banner to use as a base: diff --git a/banner_data/banners.txt b/resources/banner_creator/data/banners.txt similarity index 100% rename from banner_data/banners.txt rename to resources/banner_creator/data/banners.txt diff --git a/resources/banner_creator/js/banner_data.js b/resources/banner_creator/js/banner_data.js index e69de29..7d53e06 100644 --- a/resources/banner_creator/js/banner_data.js +++ b/resources/banner_creator/js/banner_data.js @@ -0,0 +1,3 @@ +async function fillDefaultBanners() { + getBannerData() +} \ No newline at end of file diff --git a/resources/banner_creator/js/banner_onload.js b/resources/banner_creator/js/banner_onload.js new file mode 100644 index 0000000..cb448a1 --- /dev/null +++ b/resources/banner_creator/js/banner_onload.js @@ -0,0 +1,5 @@ +document.addEventListener('DOMContentLoaded', async () => { + fillDefaultBanners() + + console.log('loaded') +}) \ No newline at end of file diff --git a/resources/banner_creator/js/helpers.js b/resources/banner_creator/js/helpers.js new file mode 100644 index 0000000..54c25fd --- /dev/null +++ b/resources/banner_creator/js/helpers.js @@ -0,0 +1,22 @@ +Neutralino.init() + +const filesystem = Neutralino.filesystem + +async function getBannerData() { + const bannerData = await filesystem.readFile('resources/banner_creator/data/banners.txt') + const lines = bannerData.split('\n') + let bannerObj = {} + + for (const line of lines) { + const values = line.split(' ') + + bannerObj[values[0]] = { + assetName: values[1], + fiveStar: values[2], + // The rest are a list of 4 stars + fourStars: values.slice(3) + } + } + + console.log(bannerObj) +} \ No newline at end of file diff --git a/resources/banner_creator/style/banner.css b/resources/banner_creator/style/banner.css index d20798f..b6ec564 100644 --- a/resources/banner_creator/style/banner.css +++ b/resources/banner_creator/style/banner.css @@ -3,6 +3,24 @@ html { user-select: none; } body { overflow: hidden; height: 95vh; - margin: 0; + margin: 5%; font-family: Arial, Helvetica, sans-serif; +} + +#base { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column +} + +#base span { + display: block; +} + +#base select { + display: block; + width: 60%; + height: 30px; + margin: 10px auto; } \ No newline at end of file