fix(app): center dialog on page instead of session
This commit is contained in:
@@ -902,15 +902,6 @@ export default function Layout(props: ParentProps) {
|
|||||||
globalSync.project.loadSessions(project.worktree)
|
globalSync.project.loadSessions(project.worktree)
|
||||||
})
|
})
|
||||||
|
|
||||||
createEffect(() => {
|
|
||||||
if (isLargeViewport()) {
|
|
||||||
const sidebarWidth = layout.sidebar.opened() ? layout.sidebar.width() : 64
|
|
||||||
document.documentElement.style.setProperty("--dialog-left-margin", `${sidebarWidth}px`)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
document.documentElement.style.setProperty("--dialog-left-margin", "0px")
|
|
||||||
})
|
|
||||||
|
|
||||||
function getDraggableId(event: unknown): string | undefined {
|
function getDraggableId(event: unknown): string | undefined {
|
||||||
if (typeof event !== "object" || event === null) return undefined
|
if (typeof event !== "object" || event === null) return undefined
|
||||||
if (!("draggable" in event)) return undefined
|
if (!("draggable" in event)) return undefined
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
[data-component="dialog"] {
|
[data-component="dialog"] {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
margin-left: var(--dialog-left-margin);
|
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user