diff --git a/public/scripts/extensions/quick-reply/src/QuickReply.js b/public/scripts/extensions/quick-reply/src/QuickReply.js index f65c49c45..d75c1c9de 100644 --- a/public/scripts/extensions/quick-reply/src/QuickReply.js +++ b/public/scripts/extensions/quick-reply/src/QuickReply.js @@ -1204,12 +1204,7 @@ export class QuickReply { this.abortController = new SlashCommandAbortController(); this.debugController = new SlashCommandDebugController(); this.debugController.onBreakPoint = async(closure, executor)=>{ - //TODO move debug code into its own element, separate from the QR - //TODO populate debug code from closure.fullText and get locations, highlights, etc. from that - //TODO keep some kind of reference (human identifier) *where* the closure code comes from? - //TODO QR name, chat input, deserialized closure, ... ? - // this.editorMessage.value = closure.fullText; - // this.editorMessage.dispatchEvent(new Event('input', { bubbles:true })); + this.editorDom.classList.add('qr--isPaused'); syntax.innerHTML = hljs.highlight(`${closure.fullText}${closure.fullText.slice(-1) == '\n' ? ' ' : ''}`, { language:'stscript', ignoreIllegals:true })?.value; this.editorMessageLabel.innerHTML = ''; if (uuidCheck.test(closure.source)) { @@ -1619,6 +1614,7 @@ export class QuickReply { hi.remove(); this.editorDebugState.textContent = ''; this.editorDebugState.classList.remove('qr--active'); + this.editorDom.classList.remove('qr--isPaused'); return isStepping; }; const result = await this.onDebug(this); diff --git a/public/scripts/extensions/quick-reply/style.css b/public/scripts/extensions/quick-reply/style.css index 6fd7e8368..034bc7a1f 100644 --- a/public/scripts/extensions/quick-reply/style.css +++ b/public/scripts/extensions/quick-reply/style.css @@ -435,6 +435,17 @@ .popup:has(#qr--modalEditor) .popup-content > #qr--modalEditor.qr--isExecuting #qr--modal-debugButtons { display: flex; } +.popup:has(#qr--modalEditor) .popup-content > #qr--modalEditor.qr--isExecuting #qr--modal-debugButtons .menu_button:not(#qr--modal-minimize, #qr--modal-maximize) { + cursor: not-allowed; + opacity: 0.5; + pointer-events: none; + transition: 200ms; +} +.popup:has(#qr--modalEditor) .popup-content > #qr--modalEditor.qr--isExecuting.qr--isPaused #qr--modal-debugButtons .menu_button:not(#qr--modal-minimize, #qr--modal-maximize) { + cursor: pointer; + opacity: 1; + pointer-events: all; +} .popup:has(#qr--modalEditor) .popup-content > #qr--modalEditor.qr--isExecuting #qr--resizeHandle { width: 6px; background-color: var(--SmartThemeBorderColor); diff --git a/public/scripts/extensions/quick-reply/style.less b/public/scripts/extensions/quick-reply/style.less index 0547cf1d6..79552f5ee 100644 --- a/public/scripts/extensions/quick-reply/style.less +++ b/public/scripts/extensions/quick-reply/style.less @@ -504,7 +504,20 @@ } #qr--modal-debugButtons { display: flex; + .menu_button:not(#qr--modal-minimize, #qr--modal-maximize) { + cursor: not-allowed; + opacity: 0.5; + pointer-events: none; + transition: 200ms; + } } + &.qr--isPaused #qr--modal-debugButtons { + .menu_button:not(#qr--modal-minimize, #qr--modal-maximize) { + cursor: pointer; + opacity: 1; + pointer-events: all; + } + } #qr--resizeHandle { width: 6px; background-color: var(--SmartThemeBorderColor);