Skip to content

Commit

Permalink
custom baseUrl fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Sep 9, 2024
1 parent 6b43d7e commit 05a6590
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion frontend/src/lib/components/sidebar/MenuLink.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { classNames } from '$lib/utils'
import { navigating, page } from '$app/stores'
import Popover from '../Popover.svelte'
import { base } from '$app/paths'
export let label: string
export let href: string
Expand All @@ -13,7 +14,7 @@
let isSelected = false
navigating.subscribe(() => {
if (href === '/') {
if (href === `${base}/`) {
isSelected = $page.url.pathname === href
} else {
isSelected = $page.url.pathname.includes(href)
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/lib/components/sidebar/WorkspaceMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@
if ($page.url.searchParams.get('workspace')) {
$page.url.searchParams.set('workspace', id)
}
goto($page.url.toString())
} else {
await goto('/')
switchWorkspace(id)
await goto('/')
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import ToggleButton from '$lib/components/common/toggleButton-v2/ToggleButton.svelte'
import DropdownV2 from '$lib/components/DropdownV2.svelte'
import { goto } from '$app/navigation'
import { base } from '$app/paths'
let jobs: Job[] | undefined
let selectedIds: string[] = []
Expand Down Expand Up @@ -293,7 +294,7 @@
let newPath = path ? `/${path}` : ''
let newUrl = `/runs${newPath}?${searchParams.toString()}`
let newUrl = `${base}/runs${newPath}?${searchParams.toString()}`
if (
$page.url.searchParams.toString() != searchParams.toString() ||
$page.url.pathname != newUrl.split('?')[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@
<div class="relative overflow-x-auto w-full">
<Button
wrapperClasses="absolute top-2 right-2 z-20"
on:click={() => copyToClipboard(script.lock)}
on:click={() => copyToClipboard(script?.lock)}
color="light"
size="xs2"
startIcon={{
Expand Down

0 comments on commit 05a6590

Please sign in to comment.