mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-30 09:42:44 +00:00
* Fix #12 - Add expand tag * Add Chinese translation
This commit is contained in:
@@ -151,6 +151,15 @@
|
||||
</div>
|
||||
<input type="text" class="form-control" onchange="updateField(this)" onfocus="this.select()">
|
||||
</div>
|
||||
<div class="input-group mt-3 entry-expand d-none" data-type="boolean" data-field="expand">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" data-i18n="expand"></span>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" value="false" class="btn btn-secondary rounded-0" onclick="updateField(this)" data-i18n="false"></button>
|
||||
<button type="button" value="true" class="btn btn-secondary" onclick="updateField(this)" data-i18n="true"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group mt-3 entry-weight d-none" data-type="int" data-field="weight">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" data-i18n="$entry.weight"></span>
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
"group": "Group",
|
||||
"dynamic": "Dynamic"
|
||||
},
|
||||
"expand": "Expand",
|
||||
"weight": "Weight",
|
||||
"quality": "Quality"
|
||||
},
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
"group": "组",
|
||||
"dynamic": "动态"
|
||||
},
|
||||
"expand": "展开",
|
||||
"weight": "权重",
|
||||
"quality": "每级幸运对权重的影响"
|
||||
},
|
||||
|
||||
9
view.js
9
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) {
|
||||
|
||||
Reference in New Issue
Block a user