From b8c8df080bc7ca481fac333fdc1ad1984a6d55b9 Mon Sep 17 00:00:00 2001 From: Guilhem Date: Thu, 8 Jan 2026 06:26:32 +0000 Subject: [PATCH] fix(frontend): improve centered page overflow (#7515) * center page top when needed * remove debug message --- .../src/lib/components/CenteredModal.svelte | 59 ++- .../workspaceSettings/CreateWorkspace.svelte | 4 +- .../(user)/instance_settings/+page.svelte | 2 +- .../user/(user)/workspaces/+page.svelte | 411 +++++++++--------- .../(root)/(logged)/user/cli/+page.svelte | 4 +- .../[job]/[resume]/[hmac]/+page.svelte | 162 +++---- 6 files changed, 338 insertions(+), 304 deletions(-) diff --git a/frontend/src/lib/components/CenteredModal.svelte b/frontend/src/lib/components/CenteredModal.svelte index e1732c931b..3fd388887e 100644 --- a/frontend/src/lib/components/CenteredModal.svelte +++ b/frontend/src/lib/components/CenteredModal.svelte @@ -4,41 +4,60 @@ import WindmillIcon from './icons/WindmillIcon.svelte' import LoginPageHeader from './LoginPageHeader.svelte' - export let subtitle: string | undefined = undefined - export let title = 'Windmill' - export let disableLogo = false - export let large = false + interface Props { + subtitle?: string | undefined + title?: string + disableLogo?: boolean + large?: boolean + centerVertically?: boolean + children?: import('svelte').Snippet + } + + let { + subtitle = undefined, + title = 'Windmill', + disableLogo = false, + large = false, + centerVertically = true, + children + }: Props = $props() setLicense() -
-
+
+
{#if (!disableLogo && !$enterpriseLicense) || !$whitelabelNameStore} + {:else} +
{/if} +
+

+ {title} +

+ {#if subtitle} +

+ {subtitle} +

+ {/if} +
+
-
-

- {title} -

- {#if subtitle} -

- {subtitle} -

- {/if} -
- + {@render children?.()}
diff --git a/frontend/src/lib/components/workspaceSettings/CreateWorkspace.svelte b/frontend/src/lib/components/workspaceSettings/CreateWorkspace.svelte index 232a6cf262..684cd7f9b4 100644 --- a/frontend/src/lib/components/workspaceSettings/CreateWorkspace.svelte +++ b/frontend/src/lib/components/workspaceSettings/CreateWorkspace.svelte @@ -344,7 +344,7 @@ let domain = $derived($usersWorkspaceStore?.email.split('@')[1]) - +
{#if isFork}
@@ -593,7 +593,7 @@ {/if}
{/if} -
+
- {/if} -
- {/if} -
- - {#if $superadmin} -
- -
- {/if} - - {#if workspaces && $usersWorkspaceStore} - {#if workspaces.length == 0} -

- You are not a member of any workspace yet. Accept an invitation {#if createWorkspace}or - create your own{/if} - workspace. -

- {:else} - { - if (list_all_as_super_admin) { - loadWorkspacesAsAdmin() - } else { - loadWorkspaces() - } - }} - bind:searchFilter={workspaceSearchFilter} - bind:allExpanded={workspaceAllExpanded} - bind:hasForks={workspaceHasForks} - bind:this={workspaceTreeView} - /> - {/if} - {:else} - {#each new Array(3) as _, i (i)} - - {/each} - {/if} - - {#if createWorkspace} -
- -
- {/if} - + {@const nonForkInvites = invites.filter((invite) => invite.parent_workspace_id == undefined)} +
+
+

+ Workspaces{#if loading}{/if} +

-
-

Invites to join a Workspace

- {#if workspaces} - - {/if} -
- -
- - {#if nonForkInvites.length == 0} -

You don't have new invites at the moment.

- {/if} - - {#each nonForkInvites as invite} -
-
- {invite.workspace_id} - {#if invite.is_admin} - as an admin - {:else if invite.operator} - as an operator - {/if} -
-
- - - -
+ {#if allWorkspaces.length > 1} +
+
+ + +
+ {#if workspaceHasForks} + + {/if} +
+ {/if}
- {/each} - {#if showAllForks} - {@const allWorkspacesList = workspaces || []} - {@const filteredInvites = invites.filter((invite) => invite.parent_workspace_id)} + {#if $superadmin} +
+ +
+ {/if} + + {#if workspaces && $usersWorkspaceStore} + {#if workspaces.length == 0} +

+ You are not a member of any workspace yet. Accept an invitation {#if createWorkspace}or + create your own{/if} + workspace. +

+ {:else} + { + if (list_all_as_super_admin) { + loadWorkspacesAsAdmin() + } else { + loadWorkspaces() + } + }} + bind:searchFilter={workspaceSearchFilter} + bind:allExpanded={workspaceAllExpanded} + bind:hasForks={workspaceHasForks} + bind:this={workspaceTreeView} + /> + {/if} + {:else} + {#each new Array(3) as _, i (i)} + + {/each} + {/if} + + {#if createWorkspace} +
+ +
+ {/if} + +
+

Invites to join a Workspace

+ {#if workspaces} + + {/if} +
- {#if filteredInvites.length == 0} -

There are no invites to join the forks of any workspace you're in.

- {:else} - Forks of the workspaces you're in + + {#if nonForkInvites.length == 0} +

You don't have new invites at the moment.

{/if} - {#each filteredInvites as invite} - {@const inviteWorkspace = allWorkspacesList.find((w) => w.id === invite.workspace_id)} + {#each nonForkInvites as invite}
-
- {#if inviteWorkspace?.parent_workspace_id} - - {/if} - {invite.workspace_id} -
+ {invite.workspace_id} {#if invite.is_admin} as an admin {:else if invite.operator} as an operator {/if} - {#if invite.parent_workspace_id} -
- Fork of {invite.parent_workspace_id} -
- {/if}
{/each} - {/if} -
- {#if $superadmin} - - {:else} - + {#if showAllForks} + {@const allWorkspacesList = workspaces || []} + {@const filteredInvites = invites.filter((invite) => invite.parent_workspace_id)} + +
+ {#if filteredInvites.length == 0} +

There are no invites to join the forks of any workspace you're in.

+ {:else} + Forks of the workspaces you're in + {/if} + + {#each filteredInvites as invite} + {@const inviteWorkspace = allWorkspacesList.find((w) => w.id === invite.workspace_id)} +
+
+
+ {#if inviteWorkspace?.parent_workspace_id} + + {/if} + {invite.workspace_id} +
+ {#if invite.is_admin} + as an admin + {:else if invite.operator} + as an operator + {/if} + {#if invite.parent_workspace_id} +
+ Fork of {invite.parent_workspace_id} +
+ {/if} +
+
+ + + +
+
+ {/each} {/if} - +
+ {#if $superadmin} + + {:else} + + {/if} + + +