2017-10-31 14:49:01 +01:00
|
|
|
<!DOCTYPE html>
|
2019-12-15 20:04:31 +01:00
|
|
|
<html lang="en">
|
2017-10-31 14:49:01 +01:00
|
|
|
<head>
|
2019-01-09 15:54:35 +01:00
|
|
|
<title>Blockbench</title>
|
2020-04-25 20:25:07 +02:00
|
|
|
<meta charset="utf-8" />
|
2019-01-09 15:54:35 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2019-07-17 18:02:07 +02:00
|
|
|
<meta name="theme-color" content="#181a1f">
|
2024-03-02 22:53:13 +01:00
|
|
|
<meta name="color-scheme" content="dark">
|
2019-04-12 18:44:18 +02:00
|
|
|
<meta name="robots" content="noindex">
|
2021-02-09 23:56:40 +01:00
|
|
|
<link rel="manifest" href="manifest.webmanifest">
|
2019-01-09 15:54:35 +01:00
|
|
|
<link rel="shortcut icon" href="favicon.png" type="image/x-icon" />
|
2020-12-25 12:38:45 +01:00
|
|
|
<link rel="apple-touch-icon" href="icon_full.png">
|
2019-01-09 15:54:35 +01:00
|
|
|
<link rel="stylesheet" href="css/w3.css">
|
|
|
|
<link rel="stylesheet" href="css/jquery-ui.min.css">
|
2019-07-17 18:02:07 +02:00
|
|
|
<link rel="stylesheet" href="css/fontawesome.css">
|
2019-01-09 15:54:35 +01:00
|
|
|
<link rel="stylesheet" href="css/spectrum.css">
|
2019-12-15 20:04:31 +01:00
|
|
|
<link rel="stylesheet" href="css/prism.css">
|
2019-07-17 18:02:07 +02:00
|
|
|
<link rel="stylesheet" href="css/setup.css">
|
|
|
|
<link rel="stylesheet" href="css/general.css">
|
2020-04-25 20:25:07 +02:00
|
|
|
<link rel="stylesheet" href="css/window.css">
|
2022-07-01 08:47:05 +02:00
|
|
|
<link rel="stylesheet" href="css/start_screen.css">
|
2019-07-17 18:02:07 +02:00
|
|
|
<link rel="stylesheet" href="css/panels.css">
|
|
|
|
<link rel="stylesheet" href="css/dialogs.css">
|
2019-12-15 20:04:31 +01:00
|
|
|
<style type="text/css" id="theme_css"></style>
|
2024-04-09 18:59:23 +01:00
|
|
|
<style type="text/css" id="theme_thumbnail_css"></style>
|
2017-10-31 14:49:01 +01:00
|
|
|
</head>
|
2023-10-22 20:44:45 +02:00
|
|
|
<body spellcheck="false" class="maximized">
|
2019-01-09 15:54:35 +01:00
|
|
|
<script>
|
|
|
|
if (typeof module === 'object') {window.module = module; module = undefined;}//jQuery Fix
|
2021-08-23 22:17:59 +02:00
|
|
|
|
|
|
|
if (localStorage.getItem('theme')) {
|
|
|
|
try {
|
|
|
|
stored_theme = JSON.parse(localStorage.getItem('theme'));
|
|
|
|
document.body.style.setProperty('--color-dark', stored_theme.colors.dark);
|
|
|
|
} catch (err) {}
|
|
|
|
}
|
2022-04-03 14:54:40 +02:00
|
|
|
window.ErrorLog = [];
|
2021-07-01 23:05:34 +02:00
|
|
|
window.onerror = (message, file, line) => {
|
2022-04-03 14:54:40 +02:00
|
|
|
window.ErrorLog.push({message, file, line})
|
2021-07-21 12:56:45 +02:00
|
|
|
if (typeof Blockbench != 'undefined' && Blockbench.setup_successful) return;
|
2021-07-01 23:05:34 +02:00
|
|
|
|
|
|
|
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}`
|
|
|
|
}
|
|
|
|
}
|
2019-01-09 15:54:35 +01:00
|
|
|
</script>
|
2020-03-04 20:56:17 +01:00
|
|
|
<div id="loading_error_message" style="display: none;">
|
|
|
|
<div>An error occurred while loading Blockbench</div>
|
2021-07-01 23:05:34 +02:00
|
|
|
<div id="loading_error_detail" style="color: var(--color-subtle_text);"></div>
|
2025-03-08 21:21:57 +01:00
|
|
|
<button onclick="window.location.reload(true)" class="large" style="margin-right: auto; margin-left: auto;">Reload</button>
|
2024-03-02 23:07:25 +01:00
|
|
|
<button onclick="factoryResetAndReload()" class="large" style="margin-right: auto; margin-left: auto;">Factory Reset</button>
|
2020-03-04 20:56:17 +01:00
|
|
|
<button onclick="window.close()" class="large" style="margin-right: auto; margin-left: auto;">Quit</button>
|
|
|
|
</div>
|
2022-11-20 13:45:45 +01:00
|
|
|
<script>
|
|
|
|
// Browser compatibility check
|
|
|
|
try {
|
2023-02-04 12:42:11 +01:00
|
|
|
eval('window?.document ?? 2');
|
2022-11-20 13:45:45 +01:00
|
|
|
} catch (err) {
|
2023-02-04 12:42:11 +01:00
|
|
|
console.error(err);
|
2022-11-20 13:45:45 +01:00
|
|
|
let error_element = document.querySelector('#loading_error_detail')
|
|
|
|
error_element.innerHTML = `Incompatible browser version. Please update your web browser.`
|
|
|
|
}
|
|
|
|
</script>
|
2025-03-02 21:16:55 +01:00
|
|
|
<script type="module" src="dist/bundle.js"></script>
|
2019-01-09 15:54:35 +01:00
|
|
|
|
2019-07-17 18:02:07 +02:00
|
|
|
<div style="display: none;"></div>
|
2019-01-09 15:54:35 +01:00
|
|
|
|
2019-03-09 22:06:35 +01:00
|
|
|
<div id="overlay_message_box" style="display: none;">
|
|
|
|
<div>
|
2024-04-21 18:18:29 +02:00
|
|
|
<h3><i class="material-icons icon">keyboard</i><span class="tl">keybindings.recording</span></h3>
|
2019-03-09 22:06:35 +01:00
|
|
|
<p class="tl">keybindings.press</p>
|
2019-08-17 18:26:14 +02:00
|
|
|
<button class="tl" onclick="Keybinds.recording.stopRecording()">dialog.cancel</button>
|
|
|
|
<button class="tl" onclick="Keybinds.recording.clear().stopRecording()">keybindings.clear</button>
|
2019-03-09 22:06:35 +01:00
|
|
|
<div id="keybind_input_box" contenteditable="true" style="font-size: 0"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-02-20 13:21:11 +01:00
|
|
|
<div id="dialog_wrapper"></div>
|
2019-01-09 15:54:35 +01:00
|
|
|
|
|
|
|
<header>
|
2019-07-17 18:02:07 +02:00
|
|
|
<ul id="mac_window_menu" hidden></ul>
|
2021-05-24 21:39:15 +02:00
|
|
|
<div id="corner_logo" class="app-drag-region">
|
2021-08-24 00:25:42 +02:00
|
|
|
<img class="blockbench_logo" src="assets/logo_text_white.svg" alt="Blockbench" />
|
2019-01-09 15:54:35 +01:00
|
|
|
</div>
|
2019-07-17 18:02:07 +02:00
|
|
|
<ul id="menu_bar" class="scroll_horizontal"></ul>
|
2024-04-21 18:18:29 +02:00
|
|
|
<div id="title_bar_home_button" class="tool" onclick="Interface.tab_bar.openNewTab()"><i class="material-icons icon">home</i></div>
|
2019-07-17 18:02:07 +02:00
|
|
|
<div class="app-drag-region" id="header_free_bar"></div>
|
2021-08-11 22:59:48 +02:00
|
|
|
<div id="update_menu"></div>
|
2024-05-11 13:28:44 +02:00
|
|
|
<div id="settings_profiles_header_menu" class="hidden tool">
|
2024-04-21 18:18:29 +02:00
|
|
|
<i class="material-icons icon">manage_accounts</i>
|
2023-01-11 17:49:17 +01:00
|
|
|
</div>
|
2019-07-17 18:02:07 +02:00
|
|
|
<ul id="windows_window_menu" hidden>
|
2023-10-22 20:44:45 +02:00
|
|
|
<li onclick="currentwindow.minimize()">
|
|
|
|
<svg width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M14 8v1H3V8h11z"/></svg>
|
|
|
|
</li>
|
|
|
|
<li onclick="currentwindow.isMaximized() ? currentwindow.unmaximize() : currentwindow.maximize()">
|
|
|
|
<svg class="restore" width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M3 5v9h9V5H3zm8 8H4V6h7v7z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5 5h1V4h7v7h-1v1h2V3H5v2z"/></svg>
|
|
|
|
<svg class="maximize" width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M3 3v10h10V3H3zm9 9H4V4h8v8z"/></svg>
|
|
|
|
</li>
|
|
|
|
<li class="wwm_r" onclick="currentwindow.close()">
|
|
|
|
<svg width="18" height="18" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.116 8l-4.558 4.558.884.884L8 8.884l4.558 4.558.884-.884L8.884 8l4.558-4.558-.884-.884L8 7.116 3.442 2.558l-.884.884L7.116 8z"/></svg>
|
|
|
|
</li>
|
2019-07-17 18:02:07 +02:00
|
|
|
</ul>
|
2022-07-03 12:57:44 +02:00
|
|
|
<button id="web_download_button" hidden><a href="https://blockbench.net/downloads">
|
|
|
|
<span class="tl">web.download_app</span>
|
2024-04-21 18:18:29 +02:00
|
|
|
<i class="material-icons icon">system_update</i>
|
2022-07-03 12:57:44 +02:00
|
|
|
</a></button>
|
2019-07-17 18:02:07 +02:00
|
|
|
</header>
|
2021-05-08 11:43:40 +02:00
|
|
|
|
2021-05-05 13:54:41 +02:00
|
|
|
|
2021-07-07 13:08:56 +02:00
|
|
|
<div id="page_wrapper" class="invisible start_screen">
|
2021-05-08 11:43:40 +02:00
|
|
|
|
2022-01-30 00:23:44 +01:00
|
|
|
<div id="blackout" class="darken"></div>
|
2019-07-17 18:02:07 +02:00
|
|
|
|
2021-07-24 13:51:42 +02:00
|
|
|
<div id="tab_bar" :class="{drag_mode: drag_target_index !== null}">
|
2024-04-18 18:27:08 +02:00
|
|
|
<div id="tab_bar_list" @wheel="mousewheelBar($event)" ref="tab_bar_list">
|
2021-08-27 22:43:01 +02:00
|
|
|
<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)
|
|
|
|
}"
|
2022-05-20 00:24:43 +02:00
|
|
|
:title="project.name || project.geometry_name || ''"
|
2021-08-27 22:43:01 +02:00
|
|
|
@dblclick="project.openSettings()"
|
2024-04-04 14:16:20 +02:00
|
|
|
@contextmenu="project.showContextMenu($event)"
|
2021-08-27 22:43:01 +02:00
|
|
|
@mousedown="mouseDown(project, $event)"
|
|
|
|
@mouseup="mouseUp(project, $event)"
|
|
|
|
@mouseenter="mouseEnter(project, $event)"
|
|
|
|
@mouseleave="mouseLeave(project, $event)"
|
|
|
|
>
|
2023-11-26 19:00:05 +01:00
|
|
|
<dynamic-icon :icon="project.format ? project.format.icon : 'home'"></dynamic-icon>
|
2021-08-27 22:43:01 +02:00
|
|
|
<label class="project_tab_session_badge" v-if="project.EditSession"><i class="material-icons">group</i>{{ project.EditSession.client_count }}</label>
|
2021-09-22 13:47:46 +02:00
|
|
|
<label>{{ project.getDisplayName() }}</label>
|
2021-08-27 22:43:01 +02:00
|
|
|
<div class="project_tab_close_button" :class="{unsaved: !project.saved}" :title="close_tab_label" @click="project.close()">
|
2021-09-13 20:36:51 +02:00
|
|
|
<i class="material-icons close_icon">clear</i>
|
|
|
|
<i class="material-icons unsaved_icon" v-if="!project.saved">fiber_manual_record</i>
|
2021-08-27 22:43:01 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="new_tab_button" v-if="!new_tab.visible" @click="openNewTab()" :title="new_tab.name">
|
|
|
|
<i class="material-icons">add</i>
|
2021-07-24 13:51:42 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-19 00:36:19 +01:00
|
|
|
<div id="search_tab_button" v-if="projects.length > 1" @click="tabOverview()" :title="search_tabs_label">
|
|
|
|
<i class="material-icons">view_module</i>
|
2021-07-24 13:51:42 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<dialog id="action_selector"></dialog>
|
|
|
|
|
2021-11-13 23:19:23 +01:00
|
|
|
<div id="start_screen"></div>
|
2021-07-07 13:08:56 +02:00
|
|
|
|
|
|
|
<div id="work_screen" hidden>
|
|
|
|
|
|
|
|
<div id="main_toolbar">
|
|
|
|
<div class="toolbar_wrapper narrow tools"></div>
|
|
|
|
|
|
|
|
<div class="toolbar_wrapper narrow tool_options"></div>
|
2022-08-06 13:37:20 +02:00
|
|
|
<ul id="mode_selector" v-if="showModes()">
|
2021-07-07 13:08:56 +02:00
|
|
|
<li
|
|
|
|
v-for="mode in options"
|
|
|
|
v-if="Condition(mode.condition)"
|
|
|
|
v-bind:class="{selected: mode.selected}"
|
2021-08-08 14:51:00 +02:00
|
|
|
v-on:mousedown="mode.select()"
|
2021-07-07 13:08:56 +02:00
|
|
|
>{{ mode.name }}</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2021-08-17 22:02:23 +02:00
|
|
|
|
|
|
|
<div id="left_bar" class="sidebar"></div>
|
2020-07-16 09:32:59 +02:00
|
|
|
|
2022-02-22 18:12:27 +01:00
|
|
|
<div id="right_bar" class="sidebar"></div>
|
2021-07-07 13:08:56 +02:00
|
|
|
|
|
|
|
<div id="center">
|
2024-06-15 00:12:20 +02:00
|
|
|
<ul id="toast_notification_list"></ul>
|
2022-02-22 18:12:27 +01:00
|
|
|
|
|
|
|
<div id="top_slot"></div>
|
|
|
|
<div id="preview">
|
2023-03-10 23:17:25 +01:00
|
|
|
<div class="clamped_reference_images"></div>
|
2019-12-15 20:04:31 +01:00
|
|
|
</div>
|
2022-02-22 18:12:27 +01:00
|
|
|
<div id="bottom_slot"></div>
|
2019-07-19 17:31:22 +02:00
|
|
|
|
2021-07-07 13:08:56 +02:00
|
|
|
<div id="mobile_panel_overlay" hidden></div>
|
|
|
|
</div>
|
|
|
|
<div id="status_bar"></div>
|
2020-12-22 13:32:49 +01:00
|
|
|
|
2021-07-07 13:08:56 +02:00
|
|
|
<div id="panel_selector_bar"></div>
|
2020-10-11 16:54:52 +02:00
|
|
|
|
2021-07-07 13:08:56 +02:00
|
|
|
</div>
|
2019-07-17 18:02:07 +02:00
|
|
|
|
|
|
|
</div>
|
2025-03-01 23:29:12 +01:00
|
|
|
|
2025-03-02 10:54:40 +01:00
|
|
|
<script type="module">
|
2025-03-01 23:29:12 +01:00
|
|
|
if (!window.Blockbench?.setup_successful) {
|
2019-01-09 15:54:35 +01:00
|
|
|
document.getElementById('loading_error_message').style.display = 'block'
|
2020-10-26 15:27:07 +01:00
|
|
|
if (window.require) {
|
2019-01-09 15:54:35 +01:00
|
|
|
require('electron').remote.getCurrentWindow().webContents.openDevTools()
|
|
|
|
}
|
2019-07-17 18:02:07 +02:00
|
|
|
} else {
|
|
|
|
document.getElementById('loading_error_message').innerHTML = 'No loading errors...'
|
2019-01-09 15:54:35 +01:00
|
|
|
}
|
|
|
|
</script>
|
2017-10-31 14:49:01 +01:00
|
|
|
</body>
|
|
|
|
</html>
|