mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-03 16:22:08 +00:00
# Description Changing a slicing plugin's configuration had no effect on the sliced result until you forced a re-slice some other way; it now applies immediately. Print, printer and filament presets also keep their plugin configuration separately, so configuring a plugin on one no longer wipes out what you set on another. A plugin's custom configuration page gets the same round of improvements in both the Plugins dialog and the per-preset dialog: it follows the app's light/dark theme, keeps its state while you edit instead of resetting under the cursor, and can tell whether it is being edited globally or for a preset, so "Restore defaults" can be labeled for what it will actually do. The two bundled examples show this off — Twistify now ships a custom configuration UI, and Inspector is themed, groups # Screenshots/Recordings/Graphs https://github.com/user-attachments/assets/02ca062a-5143-49a3-abe0-a2a040b3a928 ## Tests <!-- > Please describe the tests that you have conducted to verify the changes made in this PR. --> <!-- > A guide for users on how to download the artifacts from this PR. --> [How to Download Pull Requests Artifacts for Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
55 lines
2.5 KiB
HTML
55 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Plugin configuration</title>
|
|
<link rel="stylesheet" href="styles.css">
|
|
<!-- The shared dialog sheets, theme.css last so its host-injected variables win. -->
|
|
<link rel="stylesheet" type="text/css" href="../../include/global.css">
|
|
<link rel="stylesheet" type="text/css" href="../css/common.css">
|
|
<link rel="stylesheet" type="text/css" href="../css/theme.css">
|
|
</head>
|
|
<body>
|
|
<main class="page">
|
|
<header class="page-header">
|
|
<h1 id="pagePresetName" class="page-title"></h1>
|
|
</header>
|
|
|
|
<div id="configEmpty" class="detail-empty">This preset does not use any plugin capabilities</div>
|
|
|
|
<div id="configLayout" class="config-layout" hidden>
|
|
<div id="configSidebar" class="config-sidebar thin-scroll" role="listbox"
|
|
aria-label="Capabilities used by this preset"></div>
|
|
<div class="config-view">
|
|
<div id="configError" class="config-error" role="status" aria-live="polite" hidden></div>
|
|
<div id="configEditor" class="config-editor" hidden>
|
|
<textarea id="configText" class="config-textarea thin-scroll" spellcheck="false"
|
|
autocomplete="off" autocapitalize="off" aria-label="Capability configuration (JSON)"></textarea>
|
|
</div>
|
|
<!-- Custom capability UI. Sandboxed without allow-same-origin, so the plugin's HTML runs in
|
|
an opaque origin and reaches the host only through the injected window.orca bridge. -->
|
|
<iframe id="configCustom" class="config-custom" title="Plugin configuration"
|
|
sandbox="allow-scripts" referrerpolicy="no-referrer" hidden></iframe>
|
|
<div id="configFooter" class="config-view-footer" hidden>
|
|
<span id="configValidation" class="config-validation" role="status" aria-live="polite"></span>
|
|
<div class="config-actions">
|
|
<button id="configRestoreBtn" class="ButtonStyleRegular ButtonTypeChoice" type="button"
|
|
title="Discard this preset's override and use the global configuration again">
|
|
Restore defaults
|
|
</button>
|
|
<button id="configSaveBtn" class="ButtonStyleConfirm ButtonTypeChoice" type="button">Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer id="statusBar" class="status-bar is-empty">
|
|
<span id="statusText" class="status-text"></span>
|
|
</footer>
|
|
</main>
|
|
<script src="../js/plugin-config-ui.js"></script>
|
|
<script src="index.js"></script>
|
|
</body>
|
|
</html>
|