From d54255669cb6575344e056c3aef05bc2f8bfd41b Mon Sep 17 00:00:00 2001 From: Misode Date: Wed, 11 Sep 2019 23:40:47 +0200 Subject: [PATCH 1/3] Fix #12 - Add expand tag (#13) * Fix #12 - Add expand tag * Add Chinese translation --- index.html | 9 +++++++++ locales/en.json | 1 + locales/zh-CN.json | 1 + view.js | 9 ++++++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 854fd8f6..e0854e8a 100644 --- a/index.html +++ b/index.html @@ -151,6 +151,15 @@ +
+
+ +
+
+ + +
+
diff --git a/locales/en.json b/locales/en.json index 384ffe2a..f71afb5b 100644 --- a/locales/en.json +++ b/locales/en.json @@ -86,6 +86,7 @@ "group": "Group", "dynamic": "Dynamic" }, + "expand": "Expand", "weight": "Weight", "quality": "Quality" }, diff --git a/locales/zh-CN.json b/locales/zh-CN.json index e66e130b..c653b55b 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -86,6 +86,7 @@ "group": "组", "dynamic": "动态" }, + "expand": "展开", "weight": "权重", "quality": "每级幸运对权重的影响" }, diff --git a/view.js b/view.js index 86f4a684..21c06cf8 100644 --- a/view.js +++ b/view.js @@ -104,6 +104,13 @@ function generateEntry(entry, i, size) { } $entry.find('.entry-name input').val(entry.name); } + if (entry.type === 'minecraft:tag') { + if (entry.expand === undefined) entry.expand = true; + $entry.find('.entry-expand').removeClass('d-none'); + generateRadio($entry.find('.entry-expand'), entry.expand); + } else { + delete entry.expand; + } if (size > 1) { $entry.find('.entry-weight').removeClass('d-none'); } @@ -112,7 +119,7 @@ function generateEntry(entry, i, size) { } else { $entry.find('.entry-quality').addClass('d-none'); } - if (entry.weight ) { + if (entry.weight) { $entry.find('.entry-weight input').val(entry.weight); } if (entry.quality) { From 3274e152aacb74cfbe74b0a56919cccf10fb2725 Mon Sep 17 00:00:00 2001 From: Misode Date: Wed, 11 Sep 2019 23:51:50 +0200 Subject: [PATCH 2/3] Fix expand translation key --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e0854e8a..0326ee3a 100644 --- a/index.html +++ b/index.html @@ -153,7 +153,7 @@
- +
From 865e6cbdf3aa320a532f623360460fef8b0ec1c9 Mon Sep 17 00:00:00 2001 From: Misode Date: Fri, 13 Sep 2019 16:50:53 +0200 Subject: [PATCH 3/3] Add Russian translation for expand --- locales/ru.json | 1 + 1 file changed, 1 insertion(+) diff --git a/locales/ru.json b/locales/ru.json index 451e8e35..14df3899 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -86,6 +86,7 @@ "group": "Группа", "dynamic": "Динамический" }, + "expand": "Отдельно", "weight": "Вес", "quality": "Качество" },