Skip to content

Commit 86a1afa

Browse files
author
ozelot379
committed
Merge branch 'develop' into 'master'
- Log warn logs occurred count See merge request minecraft/convert-minecraft-java-texture-to-bedrock/webapp!54
2 parents 041218a + 9ea0ffa commit 86a1afa

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [4.0.3]
4+
- Log warn logs occurred count
5+
- Mark warning logs yellow
6+
37
## [4.0.2]
48
- Fix `pack_format` `6`
59
- Remove convert piglin

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ozelot379/convert-minecraft-java-texture-to-bedrock-webapp",
33
"productName": "ConvertJavaTextureToBedrockWebApp",
4-
"version": "4.0.2",
4+
"version": "4.0.3",
55
"description": "Web app for convert Minecraft Java texture packs to Bedrock texture packs",
66
"keywords": [
77
"Minecraft",
@@ -23,7 +23,7 @@
2323
"homepage": "https://github.com/ozelot379/ConvertJavaTextureToBedrock#readme",
2424
"dependencies": {},
2525
"devDependencies": {
26-
"@ozelot379/convert-minecraft-java-texture-to-bedrock-api": "4.0.2",
26+
"@ozelot379/convert-minecraft-java-texture-to-bedrock-api": "4.0.3",
2727
"clean-webpack-plugin": "3.0.0",
2828
"css-loader": "3.4.2",
2929
"favicons-webpack-plugin": "1.0.2",

src/css/style.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ input[type="file"] {
4040
.log {
4141
.grey.lighten-3;
4242
.black-text;
43-
height: 150px;
43+
height: 160px;
4444
overflow: auto;
4545
}
4646

src/js/index.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ document.addEventListener("DOMContentLoaded", () => {
163163
* @returns {Promise<>}
164164
*/
165165
async function afterConvert(e) {
166-
const {log, output} = e.data;
166+
const {log, log_color_class, output} = e.data;
167167

168168
if (log) {
169-
_log(log);
169+
_log(log, log_color_class);
170170
return;
171171
}
172172

@@ -210,13 +210,18 @@ document.addEventListener("DOMContentLoaded", () => {
210210

211211
/**
212212
* @param {string|undefined} log
213+
* @param {string|undefined} log_color_class
213214
*/
214-
function _log(log = undefined) {
215+
function _log(log = undefined, log_color_class = undefined) {
215216
if (log) {
216217
const li = document.createElement("li");
217218

218219
li.innerText = log;
219220

221+
if (log_color_class) {
222+
li.classList.add(`${log_color_class}-text`, "text-darken-3");
223+
}
224+
220225
logs.appendChild(li);
221226
}
222227

src/js/worker.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@ addEventListener("message", async e => {
1212
new class extends AbstractLog {
1313
/**
1414
* @inheritDoc
15+
*
16+
* @param {string|undefined} log_color_class
1517
*/
16-
log(log) {
17-
postMessage({log})
18+
log(log, log_color_class = undefined) {
19+
postMessage({log, log_color_class})
1820
}
1921

2022
/**
2123
* @inheritDoc
2224
*/
2325
warn(log) {
24-
this.log(`WARNING: ${log}`);
26+
this.warnCount();
27+
28+
this.log(`WARNING: ${log}`, "yellow");
2529
}
2630
}(),
2731
options

0 commit comments

Comments
 (0)