-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloot-table-generator.html
More file actions
250 lines (232 loc) · 7.29 KB
/
Copy pathloot-table-generator.html
File metadata and controls
250 lines (232 loc) · 7.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minecraft Bedrock Loot-Table Editor</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 1200px;
margin: 0 auto;
background-color: white;
padding: 20px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 20px;
min-height: 850px;
}
.header {
grid-column: 1 / 3;
}
.panel {
border: 1px solid #ddd;
border-radius: 5px;
padding: 15px;
}
.panel-title {
margin-top: 0;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
margin-bottom: 15px;
font-size: 16px;
font-weight: bold;
}
.file-list {
height: 500px;
overflow-y: auto;
border: 1px solid #ddd;
margin-bottom: 10px;
}
.file-item {
padding: 8px;
cursor: pointer;
border-bottom: 1px solid #eee;
}
.file-item:hover {
background-color: #f0f0f0;
}
.file-item.selected {
background-color: #e0e7ff;
}
.button-container {
display: flex;
gap: 10px;
margin-top: 10px;
}
.button {
padding: 8px 16px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
.button:hover {
background-color: #45a049;
}
.button-secondary {
background-color: #2196F3;
}
.button-secondary:hover {
background-color: #0b7dda;
}
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.input-group input {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
}
/* Switch styles */
.switch-label {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 10px;
cursor: pointer;
}
.switch-text {
font-size: 14px;
color: #333;
}
.switch-description {
font-size: 12px;
color: #666;
margin-top: 5px;
}
input[type="checkbox"] {
width: 20px;
height: 20px;
cursor: pointer;
}
/* Progress bar styles */
.progress-container {
display: none;
margin-top: 20px;
}
.progress-bar {
width: 100%;
height: 20px;
background-color: #f0f0f0;
border-radius: 10px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background-color: #4CAF50;
width: 0%;
transition: width 0.3s ease;
}
.progress-text {
text-align: center;
margin-top: 5px;
font-size: 14px;
color: #666;
}
@media screen and (max-width: 768px) {
.container {
grid-template-columns: 1fr;
padding: 10px;
min-height: auto;
}
.header {
grid-column: 1;
}
.footer {
grid-column: 1;
}
.panel {
margin-bottom: 15px;
}
.file-list {
height: 300px;
}
.modal-content {
width: 95%;
margin: 5% auto;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>Minecraft Bedrock Loot-Table Editor</h1>
<div class="input-group">
<label for="folder-path">Folder Path:</label>
<div style="display: flex; gap: 10px;">
<input type="text" id="folder-path" readonly>
<button class="button" id="select-folder">Select Folder</button>
</div>
</div>
</div>
<div class="panel">
<h2 class="panel-title">Loot Table Files</h2>
<div class="file-list" id="file-list">
<!-- Files will be populated here -->
</div>
<div class="button-container">
<button class="button button-secondary" id="select-all">Select All</button>
<button class="button button-secondary" id="deselect-all">Deselect All</button>
</div>
</div>
<div class="panel">
<h2 class="panel-title">New Item Configuration</h2>
<div class="input-group">
<label for="item-id">Item ID:</label>
<input type="text" id="item-id" placeholder="e.g. minecraft:diamond_sword">
</div>
<div class="input-group">
<label for="weight">Weight (1-100):</label>
<input type="number" id="weight" value="1" min="1" max="100">
</div>
<div class="input-group">
<label for="rolls">Number of Rolls:</label>
<input type="number" id="rolls" value="1" min="1">
</div>
<div class="input-group">
<label for="enchant-level">Enchantment Level:</label>
<input type="number" id="enchant-level" min="0">
</div>
<div class="input-group">
<label class="switch-label">
<input type="checkbox" id="create-new-pool" checked>
<span class="switch-text">Create new pool</span>
</label>
<div class="switch-description">
If enabled, creates a new pool. If disabled, modifies the last existing pool.
</div>
</div>
<div id="progress-container" class="progress-container">
<div class="progress-bar">
<div id="progress-fill" class="progress-fill"></div>
</div>
<div id="progress-text" class="progress-text">Processing files: 0/0</div>
</div>
</div>
<div class="footer">
<div class="button-container" style="justify-content: center;">
<button class="button" id="apply-changes">Apply to All</button>
</div>
</div>
</div>
<!-- Link to the external JavaScript file -->
<script src="lootTableApp.js"></script>
</body>
</html>