@@ -12,25 +12,25 @@
|
||||
<div class="mb-3">
|
||||
<label for="offset_x" class="form-label">{{ _('Plater Origin Offset X (mm)') }}</label>
|
||||
<input type="number" class="form-control" name="offset_x" id="offset_x" value="{{ configs.get('offset_x', '0') }}">
|
||||
<div class="form-text">{{ _('Adjust the X-axis compilation offset for combined files on the build plate.') }}</div>
|
||||
<div class="form-text"><i class="bi bi-info-circle me-1"></i>{{ _('Adjust the X-axis compilation offset for combined files on the build plate.') }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="offset_y" class="form-label">{{ _('Plater Origin Offset Y (mm)') }}</label>
|
||||
<input type="number" class="form-control" name="offset_y" id="offset_y" value="{{ configs.get('offset_y', '0') }}">
|
||||
<div class="form-text">{{ _('Adjust the Y-axis compilation offset for combined files on the build plate.') }}</div>
|
||||
<div class="form-text"><i class="bi bi-info-circle me-1"></i>{{ _('Adjust the Y-axis compilation offset for combined files on the build plate.') }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="proxy_skip_size_mb" class="form-label">{{ _('Proxy Skip Size (MB)') }}</label>
|
||||
<input type="number" class="form-control" name="proxy_skip_size_mb" id="proxy_skip_size_mb" value="{{ configs.get('proxy_skip_size_mb', '5.0') }}" step="0.1" min="0">
|
||||
<div class="form-text">{{ _('Files smaller than this will not generate a simplified proxy.') }}</div>
|
||||
<div class="form-text"><i class="bi bi-info-circle me-1"></i>{{ _('Files smaller than this will not generate a simplified proxy.') }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label for="gcode_upload_folder" class="form-label"><i class="bi bi-folder2-open me-2"></i>{{ _('Custom GCode Output Folder') }}</label>
|
||||
<input type="text" class="form-control" name="gcode_upload_folder" id="gcode_upload_folder" value="{{ configs.get('gcode_upload_folder', '') }}">
|
||||
<div class="form-text">{{ _('Absolute path to save locally sliced GCode files (e.g. OctoPrint uploads folder like "/home/pi/.octoprint/uploads"). Leave empty to use system default.') }}</div>
|
||||
<div class="form-text"><i class="bi bi-info-circle me-1"></i>{{ _('Absolute path to save locally sliced GCode files (e.g. OctoPrint uploads folder like "/home/pi/.octoprint/uploads"). Leave empty to use system default.') }}</div>
|
||||
</div>
|
||||
|
||||
<h5 class="card-title text-primary border-bottom pb-2 mt-4 mb-3"><i class="bi bi-grid-3x3 me-2"></i>{{ _('Default Plater Settings') }}</h5>
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="mb-3">
|
||||
<label for="build_plate_model_path" class="form-label">{{ _('Build Plate Model Path (.stl)') }}</label>
|
||||
<input type="text" class="form-control" name="build_plate_model_path" id="build_plate_model_path" value="{{ configs.get('build_plate_model_path', '') }}">
|
||||
<div class="form-text">{{ _('Absolute path to a custom build plate STL model to show in the plater. Leave empty to use none.') }}</div>
|
||||
<div class="form-text"><i class="bi bi-info-circle me-1"></i>{{ _('Absolute path to a custom build plate STL model to show in the plater. Leave empty to use none.') }}</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
@@ -62,13 +62,20 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<div class="mb-3">
|
||||
<label for="default_quality" class="form-label">{{ _('Default Quality Profile') }}</label>
|
||||
<select class="form-select" name="default_quality" id="default_quality" data-selected="{{ configs.get('default_quality', 'base_global_standard.inst.cfg') }}">
|
||||
<!-- Loaded via JS -->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="mb-4">
|
||||
<label for="default_material" class="form-label">{{ _('Default Material Profile') }}</label>
|
||||
<select class="form-select" name="default_material" id="default_material" data-selected="{{ configs.get('default_material', '') }}">
|
||||
<!-- Loaded via JS -->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h5 class="card-title text-primary border-bottom pb-2 mt-4 mb-3"><i class="bi bi-cpu me-2"></i>{{ _('Slicing Engine Configurations') }}</h5>
|
||||
<div class="mb-3">
|
||||
<label for="slicer_engine" class="form-label">{{ _('Slicing Engine') }}</label>
|
||||
@@ -151,6 +158,7 @@ function submitSettings(event) {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const engineSelect = document.getElementById('slicer_engine');
|
||||
const qualitySelect = document.getElementById('default_quality');
|
||||
const materialSelect = document.getElementById('default_material');
|
||||
const patternSelect = document.getElementById('default_support_pattern');
|
||||
|
||||
function updateOptions(engine) {
|
||||
@@ -166,6 +174,21 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
if(selQ) qualitySelect.value = selQ;
|
||||
|
||||
const selM = materialSelect.getAttribute('data-selected');
|
||||
materialSelect.innerHTML = '';
|
||||
// Add an empty option for material (optional fallback)
|
||||
const emptyOpt = document.createElement('option');
|
||||
emptyOpt.value = ''; emptyOpt.textContent = "{{ _('Auto / Default') }}";
|
||||
materialSelect.appendChild(emptyOpt);
|
||||
if(data.materials) {
|
||||
data.materials.forEach(p => {
|
||||
const opt = document.createElement('option');
|
||||
opt.value = p.id; opt.textContent = p.name;
|
||||
materialSelect.appendChild(opt);
|
||||
});
|
||||
}
|
||||
if(selM) materialSelect.value = selM;
|
||||
|
||||
const selP = patternSelect.getAttribute('data-selected');
|
||||
patternSelect.innerHTML = '';
|
||||
data.support_patterns.forEach(p => {
|
||||
|
||||
Reference in New Issue
Block a user