forked from JannisX11/blockbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
575 lines (519 loc) · 24.9 KB
/
index.html
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
<!DOCTYPE html>
<html lang="en">
<head>
<title>Blockbench</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#181a1f">
<meta name="robots" content="noindex">
<link rel="manifest" href="manifest.webmanifest">
<link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
<link rel="apple-touch-icon" href="icon_full.png">
<link rel="stylesheet" href="css/w3.css">
<link rel="stylesheet" href="css/jquery-ui.min.css">
<link rel="stylesheet" href="css/fontawesome.css">
<link rel="stylesheet" href="css/spectrum.css">
<link rel="stylesheet" href="css/prism.css">
<link rel="stylesheet" href="css/setup.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/window.css">
<link rel="stylesheet" href="css/panels.css">
<link rel="stylesheet" href="css/dialogs.css">
<style type="text/css" id="theme_css"></style>
</head>
<body spellcheck="false">
<script>
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
const isApp = typeof require !== 'undefined';
const appVersion = '4.0.1';
if (localStorage.getItem('theme')) {
try {
stored_theme = JSON.parse(localStorage.getItem('theme'));
document.body.style.setProperty('--color-dark', stored_theme.colors.dark);
} catch (err) {}
}
window.onerror = (message, file, line) => {
if (typeof Blockbench != 'undefined' && Blockbench.setup_successful) return;
let error_element = document.querySelector('#loading_error_detail');
if (error_element && !error_element.innerText) {
error_element.innerText = `${message}\nIn .${file.split(location.origin).join('')}:${line}`
}
}
</script>
<div id="loading_error_message" style="display: none;">
<div>An error occurred while loading Blockbench</div>
<div id="loading_error_detail" style="color: var(--color-subtle_text);"></div>
<button onclick="isApp ? Blockbench.reload() : window.location.reload(true)" class="large" style="margin-right: auto; margin-left: auto;">Reload</button>
<button onclick="window.close()" class="large" style="margin-right: auto; margin-left: auto;">Quit</button>
</div>
<script src="lib/vue.min.js"></script>
<script src="lib/vue_sortable.js"></script>
<script src="lib/jquery.js"></script>
<script src="lib/jquery-ui.min.js"></script>
<script src="lib/targa.js"></script>
<script src="lib/jimp.min.js"></script>
<script src="lib/jszip.min.js"></script>
<script src="lib/gif.js"></script>
<script src="lib/FileSaver.js"></script>
<script src="lib/prism.js"></script>
<script src="lib/VuePrismEditor.min.js"></script>
<script src="lib/molang-prism-syntax.js"></script>
<script src="lib/lzutf8.js"></script>
<script src="lib/peer.min.js"></script>
<script src="lib/marked.min.js"></script>
<script src="lib/spectrum.js"></script>
<script src="lib/color-picker.min.js"></script>
<script src="lib/three.min.js"></script>
<script src="lib/three_custom.js"></script>
<script src="lib/GLTFExporter.js"></script>
<script src="lib/CanvasFrame.js"></script>
<script src="lib/fik.min.js"></script>
<script src="lib/molang.umd.js"></script>
<script src="lib/wintersky.umd.js"></script>
<script src="js/webpack/bundle.js"></script>
<script src="js/preview/OrbitControls.js"></script>
<script src="js/util.js"></script>
<script src="js/property.js"></script>
<script src="js/interface/menu.js"></script>
<script src="js/interface/actions.js"></script>
<script src="js/interface/themes.js"></script>
<script src="js/blockbench.js"></script>
<script src="js/modes.js"></script>
<script src="js/api.js"></script>
<script src="js/file_system.js"></script>
<script src="js/interface/panels.js"></script>
<script src="js/interface/interface.js"></script>
<script src="js/interface/keyboard.js"></script>
<script src="js/interface/settings.js"></script>
<script src="js/interface/dialog.js"></script>
<script src="js/copy_paste.js"></script>
<script src="js/undo.js"></script>
<script type="text/javascript">
if (isApp === true) {
document.write("<script src='js/desktop.js'><\/script>");
} else {
document.write("<script src='js/web.js'><\/script>");
}
</script>
<script src="js/edit_sessions.js"></script>
<script src="js/outliner/outliner.js"></script>
<script src="js/outliner/group.js"></script>
<script src="js/outliner/mesh.js"></script>
<script src="js/outliner/cube.js"></script>
<script src="js/outliner/texture_mesh.js"></script>
<script src="js/outliner/locator.js"></script>
<script src="js/outliner/null_object.js"></script>
<script src="js/preview/preview.js"></script>
<script src="js/preview/canvas.js"></script>
<script src="js/preview/transformer.js"></script>
<script src="js/transform.js"></script>
<script src="js/texturing/textures.js"></script>
<script src="js/texturing/uv.js"></script>
<script src="js/texturing/painter.js"></script>
<script src="js/texturing/texture_generator.js"></script>
<script src="js/texturing/color.js"></script>
<script src="js/display_mode.js"></script>
<script src="js/animations/animation.js"></script>
<script src="js/animations/keyframe.js"></script>
<script src="js/animations/timeline.js"></script>
<script src="js/plugin_loader.js"></script>
<script src="js/io/codec.js"></script>
<script src="js/io/format.js"></script>
<script src="js/io/project.js"></script>
<script src="js/io/io.js"></script>
<script src="js/io/formats/bbmodel.js"></script>
<script src="js/io/formats/java_block.js"></script>
<script src="js/io/formats/bedrock.js"></script>
<script src="js/io/formats/bedrock_old.js"></script>
<script src="js/io/formats/obj.js"></script>
<script src="js/io/formats/gltf.js"></script>
<script src="js/io/formats/modded_entity.js"></script>
<script src="js/io/formats/optifine_jem.js"></script>
<script src="js/io/formats/optifine_jpm.js"></script>
<script src="js/io/formats/skin.js"></script>
<script>if (window.module) module = window.module;</script>
<div style="display: none;"></div>
<div id="overlay_message_box" style="display: none;">
<div>
<h3><i class="material-icons">keyboard</i><span class="tl">keybindings.recording</span></h3>
<p class="tl">keybindings.press</p>
<button class="tl" onclick="Keybinds.recording.stopRecording()">dialog.cancel</button>
<button class="tl" onclick="Keybinds.recording.clear().stopRecording()">keybindings.clear</button>
<div id="keybind_input_box" contenteditable="true" style="font-size: 0"></div>
</div>
</div>
<dialog class="dialog draggable" id="entity_import">
<div class="dialog_handle">
<div class="dialog_title tl">dialog.entitylist.title</div>
</div>
<div class="dialog_content">
<div class="dialog_bar narrow tl">dialog.entitylist.text</div>
<div class="search_bar">
<input type="text" class="dark_bordered" id="pe_search_bar" oninput="pe_list._data.search_term = $(this).val().toUpperCase()">
<i class="material-icons" id="plugin_search_bar_icon">search</i>
</div>
<ul id="pe_list" class="list">
<li v-for="item in searched" v-bind:class="{ selected: item.selected }" v-on:click="selectE(item, $event)" v-on:dblclick="open(item)">
<img class="pe_icon" v-if="item.icon" v-bind:src="item.icon">
<div class="pe_icon" v-else></div>
<h4>{{ item.title }} <span>({{ item.name }})</span></h4>
<p>{{ item.bonecount+' '+tl('dialog.entitylist.bones') }}, {{ item.cubecount+' '+tl('dialog.entitylist.cubes') }}</p>
</li>
</ul>
</div>
<div class="dialog_bar button_bar">
<button type="button" class="tl confirm_btn" onclick="">dialog.import</button>
<button type="button" class="cancel_btn tl" onclick="hideDialog();BarItems.close_project.click()">dialog.cancel</button>
</div>
<div class="dialog_close_button" onclick="hideDialog();BarItems.close_project.click()"><i class="material-icons">clear</i></div>
</dialog>
<dialog class="dialog draggable" id="image_extruder">
<div class="dialog_handle">
<div class="dialog_title tl">dialog.extrude.title</div>
</div>
<div class="dialog_content">
<div class="dialog_bar">
<label class="tl">dialog.extrude.mode</label>
<div class="bar_select f_left">
<select id="scan_mode" name="scan_mode">
<option class="tl" id="areas" selected>dialog.extrude.mode.areas</option>
<option class="tl" id="lines">dialog.extrude.mode.lines</option>
<option class="tl" id="columns">dialog.extrude.mode.columns</option>
<option class="tl" id="pixels">dialog.extrude.mode.pixels</option>
</select>
</div>
</div>
<div class="dialog_bar">
<label class="tl">dialog.extrude.opacity</label>
<input class="tool" type="range" id="scan_tolerance" value="255" min="1" max="255">
<label id="scan_tolerance_label">255</label>
</div>
<canvas height="256" width="256" id="extrusion_canvas"></canvas>
</div>
<div class="dialog_bar button_bar">
<button type="button" class="confirm_btn tl" onclick="Extruder.startConversion()">Scan and Import</button>
<button type="button" class="cancel_btn tl" onclick="hideDialog()">dialog.cancel</button>
</div>
<div class="dialog_close_button" onclick="hideDialog()"><i class="material-icons">clear</i></div>
</dialog>
<dialog class="dialog draggable" id="scaling">
<div class="dialog_handle">
<div class="dialog_title tl">dialog.scale.title</div>
</div>
<div class="dialog_content">
<label class="tl">dialog.scale.axis</label>
<div class="dialog_bar" style="height: 32px;">
<input type="checkbox" class="toggle_panel" id="model_scale_x_axis" onchange="scaleAll()" checked>
<label class="toggle_panel" for="model_scale_x_axis">X</label>
<input type="checkbox" class="toggle_panel" id="model_scale_y_axis" onchange="scaleAll()" checked>
<label class="toggle_panel" for="model_scale_y_axis">Y</label>
<input type="checkbox" class="toggle_panel" id="model_scale_z_axis" onchange="scaleAll()" checked>
<label class="toggle_panel" for="model_scale_z_axis">Z</label>
</div>
<label class="tl">data.origin</label>
<div class="dialog_bar">
<label for="scaling_origin_x" class="inline_label tl">X</label>
<input type="number" id="scaling_origin_x" class="dark_bordered medium_width" oninput="scaleAll()">
<label for="scaling_origin_y" class="inline_label tl">Y</label>
<input type="number" id="scaling_origin_y" class="dark_bordered medium_width" oninput="scaleAll()">
<label for="scaling_origin_z" class="inline_label tl">Z</label>
<input type="number" id="scaling_origin_z" class="dark_bordered medium_width" oninput="scaleAll()">
<div class="tool" style="float: none" onclick="setScaleAllPivot('origin')">
<div class="tooltip tl">dialog.scale.element_pivot</div>
<i class="material-icons">center_focus_strong</i>
</div>
<div class="tool" style="float: none" onclick="setScaleAllPivot('selection')">
<div class="tooltip tl">dialog.scale.selection_center</div>
<i class="material-icons">filter_tilt_shift</i>
</div>
</div>
<label class="tl">dialog.scale.scale</label>
<div class="dialog_bar" style="height: 32px;">
<input type="range" id="model_scale_range" value="1" min="0" max="4" step="0.02" oninput="modelScaleSync()">
<input type="number" class="f_left dark_bordered" id="model_scale_label" min="0" max="4" step="0.02" value="1" oninput="modelScaleSync(true)">
</div>
<div class="dialog_bar narrow" id="scaling_clipping_warning"></div>
</div>
<div class="dialog_bar button_bar">
<button type="button" onclick="scaleAll(true)" class="confirm_btn tl">dialog.scale.confirm</button>
<button type="button" class="cancel_btn tl" onclick="cancelScaleAll()">dialog.cancel</button>
<button type="button" class="minor hidden tl" id="scale_overflow_btn" onclick="scaleAllSelectOverflow()">dialog.scale.select_overflow</button>
</div>
<div class="dialog_close_button" onclick="cancelScaleAll()"><i class="material-icons">clear</i></div>
</dialog>
<dialog class="dialog draggable" id="create_preset">
<div class="dialog_handle">
<div class="dialog_title tl">dialog.display_presets.title</div>
</div>
<div class="dialog_content">
<div class="dialog_bar tl">dialog.display_preset.message</div>
<div class="dialog_bar">
<input type="checkbox" id="thirdperson_righthand_save" checked>
<label for="thirdperson_righthand_save" class="tl">display.slot.third_right</label>
</div>
<div class="dialog_bar">
<input type="checkbox" id="thirdperson_lefthand_save" checked>
<label for="thirdperson_lefthand_save" class="tl">display.slot.third_left</label>
</div>
<div class="dialog_bar">
<input type="checkbox" id="firstperson_righthand_save" checked>
<label for="firstperson_righthand_save" class="tl">display.slot.first_right</label>
</div>
<div class="dialog_bar">
<input type="checkbox" id="firstperson_lefthand_save" checked>
<label for="firstperson_lefthand_save" class="tl">display.slot.first_left</label>
</div>
<div class="dialog_bar">
<input type="checkbox" id="head_save" checked>
<label for="head_save" class="tl">display.slot.head</label>
</div>
<div class="dialog_bar">
<input type="checkbox" id="ground_save" checked>
<label for="ground_save" class="tl">display.slot.ground</label>
</div>
<div class="dialog_bar">
<input type="checkbox" id="fixed_save" checked>
<label for="fixed_save" class="tl">display.slot.frame</label>
</div>
<div class="dialog_bar">
<input type="checkbox" id="gui_save" checked>
<label for="gui_save" class="tl">display.slot.gui</label>
</div>
<div class="dialog_bar narrow">
<label class="tl">generic.name</label>
</div>
<div class="dialog_bar">
<input type="text" id="preset_name" class="input_wide" id="new preset">
</div>
</div>
<div class="dialog_bar button_bar">
<button type="button" class="tl confirm_btn" onclick="DisplayMode.createPreset()">dialog.display_preset.create</button>
<button type="button" class="tl cancel_btn" onclick="hideDialog()">dialog.cancel</button>
</div>
<div class="dialog_close_button" onclick="hideDialog()"><i class="material-icons">clear</i></div>
</dialog>
<dialog class="dialog draggable" id="text_input">
<div class="dialog_handle">
<div class="dialog_title tl">dialog.input.title</div>
</div>
<div class="dialog_content">
<input type="text" id="text_input_field" class="dark_bordered input_wide">
</div>
<div class="dialog_bar button_bar">
<button type="button" class="confirm_btn tl" onclick="hideDialog()">dialog.confirm</button>
<button type="button" class="cancel_btn tl" onclick="hideDialog()">dialog.cancel</button>
</div>
<div class="dialog_close_button" onclick="hideDialog()"><i class="material-icons">clear</i></div>
</dialog>
<div id="dialog_wrapper"></div>
<header>
<ul id="mac_window_menu" hidden></ul>
<div id="corner_logo" class="app-drag-region">
<img class="blockbench_logo" src="assets/logo_text_white.svg" alt="Blockbench" />
</div>
<ul id="menu_bar" class="scroll_horizontal"></ul>
<div class="app-drag-region" id="header_free_bar"></div>
<div id="update_menu"></div>
<ul id="windows_window_menu" hidden>
<li onclick="currentwindow.minimize()"><i class="material-icons" style="margin-top: 4px;">remove</i></li>
<li onclick="currentwindow.isMaximized() ? currentwindow.unmaximize() : currentwindow.maximize()"><i class="material-icons">crop_square</i><!--🗖--></li>
<li class="wwm_r" onclick="currentwindow.close()"><i class="material-icons">clear</i></li>
</ul>
<button id="web_download_button" hidden><a class="tl" href="https://blockbench.net/downloads">web.download_app</a></button>
</header>
<div id="page_wrapper" class="invisible start_screen">
<div id="blackout"></div>
<div id="tab_bar" :class="{drag_mode: drag_target_index !== null}">
<div id="tab_bar_list">
<div
class="project_tab"
v-for="(project, index) in tabs" :key="project.uuid"
:class="{
selected: project.selected,
new_tab: project.is_new_tab,
dragging: index == drag_target_index,
move_back: (drag_position_index !== null && index > drag_target_index && drag_position_index >= index),
move_forth: (drag_position_index !== null && index < drag_target_index && drag_position_index <= index)
}"
:title="project.name || project.geometry_name"
@dblclick="project.openSettings()"
@mousedown="mouseDown(project, $event)"
@mouseup="mouseUp(project, $event)"
@mouseenter="mouseEnter(project, $event)"
@mouseleave="mouseLeave(project, $event)"
>
<label class="project_tab_session_badge" v-if="project.EditSession"><i class="material-icons">group</i>{{ project.EditSession.client_count }}</label>
<label>{{ project.getDisplayName() }}</label>
<div class="project_tab_close_button" :class="{unsaved: !project.saved}" :title="close_tab_label" @click="project.close()">
<i class="material-icons close_icon">clear</i>
<i class="material-icons unsaved_icon" v-if="!project.saved">fiber_manual_record</i>
</div>
</div>
<div id="new_tab_button" v-if="!new_tab.visible" @click="openNewTab()" :title="new_tab.name">
<i class="material-icons">add</i>
</div>
</div>
<div id="search_tab_button" v-if="projects.length > 1" @click="searchTabs()" :title="search_tabs_label">
<i class="material-icons">search</i>
</div>
</div>
<dialog id="action_selector"></dialog>
<div id="start_screen">
<content>
<section id="start-files">
<div class="start_screen_left">
<h2 class="tl">mode.start.new</h2>
<div class="bar next_to_title">
<div class="tool" onclick="Blockbench.openLink('https://blockbench.net/quickstart/')">
<div class="tooltip tl">menu.help.quickstart</div>
<i class="fas fa-question-circle"></i>
</div>
</div>
<ul>
<li v-for="format in formats" v-if="format.show_on_start_screen" v-on:click="format.new()">
<span class="icon_wrapper f_left" v-html="getIconNode(format.icon).outerHTML"></span>
<h3>{{ format.name }}</h3>
<p>{{ format.description }}</p>
</li>
</ul>
</div>
<div class="start_screen_right">
<h2 class="tl">mode.start.recent</h2>
<div id="start_screen_list_type" v-if="isApp && !redact_names">
<li class="tool" v-bind:class="{selected: list_type == 'list'}" v-on:click="setListType('list')">
<i class="material-icons">list</i>
</li>
<li class="tool" v-bind:class="{selected: list_type == 'grid'}" v-on:click="setListType('grid')">
<i class="material-icons">view_module</i>
</li>
</div>
<div v-if="redact_names">{{ '['+tl('generic.redacted')+']' }}</div>
<ul v-else-if="list_type == 'list'">
<li v-on:click="openProject(project, $event)" v-for="project in recent" :key="project.path" v-bind:title="redact_names ? '' : project.path" class="recent_project">
<span class="icon_wrapper" v-html="getIconNode(project.icon).outerHTML"></span>
<span class="recent_project_name">{{ redact_names ? redacted : project.name }}</span>
<span class="recent_project_date">{{ getDate(project) }}</span>
</li>
<div v-if="recent.length == 0">{{ tl('mode.start.no_recents') }}</div>
</ul>
<ul :class="{redact: redact_names}" style="display: grid;" v-else>
<li v-on:click="openProject(project, $event)" v-for="project in recent" :key="project.path" v-bind:title="redact_names ? '' : project.path" class="recent_project thumbnail">
<div class="thumbnail_image" :style="{'background-image': getThumbnail(project.path)}"></div>
<span class="recent_project_name">{{ redact_names ? redacted : project.name }}</span>
<span class="icon_wrapper" v-html="getIconNode(project.icon).outerHTML"></span>
</li>
<div v-if="recent.length == 0">{{ tl('mode.start.no_recents') }}</div>
</ul>
<button class="tl" style="margin-top: 20px;" onclick="BarItems.open_model.trigger()">action.open_model</button>
</div>
</section>
</content>
</div>
<div id="work_screen" hidden>
<div id="main_toolbar">
<div class="toolbar_wrapper narrow tools"></div>
<div class="toolbar_wrapper narrow tool_options"></div>
<ul id="mode_selector">
<li
v-for="mode in options"
v-if="Condition(mode.condition)"
v-bind:class="{selected: mode.selected}"
v-on:mousedown="mode.select()"
>{{ mode.name }}</li>
</ul>
<div class="toolbar_wrapper narrow mobile_side"></div>
</div>
<div id="left_bar" class="sidebar"></div>
<div id="right_bar" class="sidebar">
<div id="element" class="panel selection_only">
<div class="panel_inside">
<p class="tl panel_toolbar_label">panel.element.position</p>
<div class="toolbar_wrapper element_position"></div>
<p class="tl panel_toolbar_label">panel.element.size</p>
<div class="toolbar_wrapper element_size"></div>
<p class="tl panel_toolbar_label">panel.element.origin</p>
<div class="toolbar_wrapper element_origin"></div>
<p class="tl panel_toolbar_label">panel.element.rotation</p>
<div class="toolbar_wrapper element_rotation"></div>
</div>
</div>
<div id="color" class="panel">
<div id="color_panel_wrapper" class="panel_inside">
<div id="color_panel_head">
<div class="main" v-bind:style="{'background-color': hover_color || main_color}"></div>
<div class="side">
<input type="text" v-model="color_code" @focusout="validateMainColor()">
<div id="color_history">
<li
v-for="(color, i) in history" v-if="i || color != main_color"
:key="color"
v-bind:style="{'background-color': color}"
v-bind:title="color" @click="setColor(color)"
></li>
</div>
</div>
</div>
<div class="bar tabs_small">
<input type="radio" name="tab" id="radio_color_picker" value="picker" v-model="open_tab">
<label class="tl" for="radio_color_picker">panel.color.picker</label>
<input type="radio" name="tab" id="radio_color_palette" value="palette" v-model="open_tab">
<label class="tl" for="radio_color_palette">panel.color.palette</label>
<input type="radio" name="tab" id="radio_color_both" value="both" v-model="open_tab">
<label class="tl" for="radio_color_both">panel.color.both</label>
<div class="tool" @click="togglePickerType()" :title="picker_toggle_label">
<i class="fa_big icon" :class="picker_type == 'box' ? 'fas fa-square' : 'far fa-stop-circle'"></i>
</div>
</div>
<div v-show="open_tab == 'picker' || open_tab == 'both'">
<div v-show="picker_type == 'box'">
<input id="main_colorpicker">
</div>
<color-wheel v-if="picker_type == 'wheel' && width" v-model="main_color" :width="width" :height="width"></color-wheel>
<div class="toolbar_wrapper color_picker"></div>
</div>
<div v-show="open_tab == 'palette' || open_tab == 'both'">
<div class="toolbar_wrapper palette"></div>
<ul id="palette_list" class="list" v-sortable="{onUpdate: sort, onEnd: drop, fallbackTolerance: 10}" @contextmenu="ColorPanel.menu.open($event)">
<li
class="color" v-for="color in palette"
:title="color" :key="color"
:class="{selected: color == main_color, contrast: isDarkColor(color)}"
@click="setColor(color)"
@mouseenter="hover_color = color"
@mouseleave="hover_color = ''"
>
<div class="color_inner" v-bind:style="{'background-color': color}"></div>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="center">
<ul id="toast_notification_list">
</ul>
<div id="preview" class="center_window">
</div>
<div id="timeline" class="center_window">
<div class="toolbar_wrapper timeline"></div>
<div id="timeline_vue"></div>
</div>
<div id="mobile_panel_overlay" hidden></div>
</div>
<div id="status_bar"></div>
<div id="panel_selector_bar"></div>
</div>
</div>
<script src="js/boot_loader.js"></script>
<script>
if (!Blockbench || !Blockbench.setup_successful) {
document.getElementById('loading_error_message').style.display = 'block'
if (window.require) {
require('electron').remote.getCurrentWindow().webContents.openDevTools()
}
} else {
document.getElementById('loading_error_message').innerHTML = 'No loading errors...'
}
</script>
</body>
</html>