mirror of
https://github.com/anomalyco/opencode.git
synced 2026-02-01 22:48:16 +00:00
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)
|
||||
})
|
||||
|
||||
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 {
|
||||
if (typeof event !== "object" || event === null) return undefined
|
||||
if (!("draggable" in event)) return undefined
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
[data-component="dialog"] {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
margin-left: var(--dialog-left-margin);
|
||||
z-index: 50;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user