frontend profile browser: cover devtools sidebar with profile sidebar, add try/catch for localStorage override
This commit is contained in:
parent
f5993e8ad8
commit
73b8c64ba4
@ -82,7 +82,7 @@ export class BrowserProfilesNew extends LiteElement {
|
|||||||
</btrix-alert>
|
</btrix-alert>
|
||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
<div class="lg:flex bg-white">
|
<div class="lg:flex bg-white relative">
|
||||||
<div class="grow lg:rounded-l overflow-hidden">
|
<div class="grow lg:rounded-l overflow-hidden">
|
||||||
${this.browserUrl
|
${this.browserUrl
|
||||||
? this.renderBrowser()
|
? this.renderBrowser()
|
||||||
@ -95,7 +95,7 @@ export class BrowserProfilesNew extends LiteElement {
|
|||||||
`}
|
`}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="rounded-b lg:rounded-b-none lg:rounded-r border p-2 shadow-inner"
|
class="rounded-b lg:rounded-b-none lg:rounded-r border p-2 shadow-inner bg-white absolute h-full right-0"
|
||||||
>
|
>
|
||||||
${document.fullscreenEnabled
|
${document.fullscreenEnabled
|
||||||
? html`
|
? html`
|
||||||
@ -300,13 +300,18 @@ export class BrowserProfilesNew extends LiteElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onIframeRef(el: HTMLIFrameElement) {
|
private onIframeRef(el: HTMLIFrameElement) {
|
||||||
|
if (!el) return;
|
||||||
|
|
||||||
el.addEventListener("load", () => {
|
el.addEventListener("load", () => {
|
||||||
// TODO see if we can make this work locally without CORs errors
|
// TODO see if we can make this work locally without CORs errors
|
||||||
el.contentWindow?.localStorage.setItem("uiTheme", '"default"');
|
try {
|
||||||
el.contentWindow?.localStorage.setItem(
|
//el.style.width = "132%";
|
||||||
"InspectorView.screencastSplitViewState",
|
el.contentWindow?.localStorage.setItem("uiTheme", '"default"');
|
||||||
'{"vertical":{"size":241}}'
|
el.contentWindow?.localStorage.setItem(
|
||||||
);
|
"InspectorView.screencastSplitViewState",
|
||||||
|
'{"vertical":{"size":241}}'
|
||||||
|
);
|
||||||
|
} catch (e) {}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user