mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
fix: keep source viewer backdrop aligned with viewport
This commit is contained in:
@@ -2175,7 +2175,7 @@ export function Settings() {
|
|||||||
|
|
||||||
{/* Code Viewer Modal */}
|
{/* Code Viewer Modal */}
|
||||||
{codeModal.open && (
|
{codeModal.open && (
|
||||||
<div className="fixed inset-0 z-50 flex items-center justify-center p-4" onClick={closeCodeModal}>
|
<div className="fixed inset-0 z-50 flex items-center justify-center p-4" style={{ margin: 0 }} onClick={closeCodeModal}>
|
||||||
<div className="absolute inset-0 bg-black/60 backdrop-blur-sm" />
|
<div className="absolute inset-0 bg-black/60 backdrop-blur-sm" />
|
||||||
<div
|
<div
|
||||||
className="relative bg-card border border-border rounded-xl shadow-2xl w-full max-w-4xl max-h-[85vh] flex flex-col"
|
className="relative bg-card border border-border rounded-xl shadow-2xl w-full max-w-4xl max-h-[85vh] flex flex-col"
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ async function main(){
|
|||||||
f.setReply(()=>({http:500,body:{success:false,error:'PermissionError /opt/demo <unsafe>&'}}));await f.tool('one').props.onClick();f.render();assert.ok(text(f.dialog()).includes('PermissionError /opt/demo <unsafe>&'))
|
f.setReply(()=>({http:500,body:{success:false,error:'PermissionError /opt/demo <unsafe>&'}}));await f.tool('one').props.onClick();f.render();assert.ok(text(f.dialog()).includes('PermissionError /opt/demo <unsafe>&'))
|
||||||
f.language('sk');assert.ok(text(f.dialog()).includes(translate('sk')('settings.optimizations.sourceLoadFailed')))
|
f.language('sk');assert.ok(text(f.dialog()).includes(translate('sk')('settings.optimizations.sourceLoadFailed')))
|
||||||
f.setReply(()=>sourceBody);await f.tool('one').props.onClick();f.render();
|
f.setReply(()=>sourceBody);await f.tool('one').props.onClick();f.render();
|
||||||
|
const backdrop=flatten(f.tree()).find(node=>node.props?.className?.startsWith('fixed inset-0')&&flatten(node).some(child=>child.props?.role==='dialog'))
|
||||||
|
assert.equal(backdrop.props.style.margin,0,'parent space-y must not offset the fixed backdrop')
|
||||||
const pre=flatten(f.dialog()).find(node=>node.type==='pre');assert.ok(pre.props.dangerouslySetInnerHTML.__html.includes('<'));assert.ok(!pre.props.dangerouslySetInnerHTML.__html.includes('<tag>'))
|
const pre=flatten(f.dialog()).find(node=>node.type==='pre');assert.ok(pre.props.dangerouslySetInnerHTML.__html.includes('<'));assert.ok(!pre.props.dangerouslySetInnerHTML.__html.includes('<tag>'))
|
||||||
const copy=flatten(f.dialog()).find(node=>node.props?.title===f.t('actions.copyToClipboard'));await copy.props.onClick();f.render();assert.equal(f.copies.at(-1),sourceBody.source)
|
const copy=flatten(f.dialog()).find(node=>node.props?.title===f.t('actions.copyToClipboard'));await copy.props.onClick();f.render();assert.equal(f.copies.at(-1),sourceBody.source)
|
||||||
f.win.isSecureContext=false;await copy.props.onClick();assert.equal(f.fallbackCopies(),1)
|
f.win.isSecureContext=false;await copy.props.onClick();assert.equal(f.fallbackCopies(),1)
|
||||||
|
|||||||
Reference in New Issue
Block a user