Skip to content

Commit

Permalink
fix workspace color picker issue (#5043)
Browse files Browse the repository at this point in the history
  • Loading branch information
alpetric authored Jan 10, 2025
1 parent 7b808c3 commit 6d934dd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
import Toggle from '$lib/components/Toggle.svelte'
let colorEnabled = false
let workspaceColor = $usersWorkspaceStore?.workspaces.find(w => w.id === $workspaceStore)?.color
export let open = false
$: workspaceColor = $usersWorkspaceStore?.workspaces.find(w => w.id === $workspaceStore)?.color
$: colorEnabled = !!workspaceColor
$: colorEnabled && !workspaceColor && generateRandomColor()
$: workspaceColor
$: if (colorEnabled && !workspaceColor) generateRandomColor()
function generateRandomColor() {
const randomColor =
Expand All @@ -34,6 +35,7 @@
})
usersWorkspaceStore.set(await WorkspaceService.listUserWorkspaces())
workspaceColor = colorToSave
sendUserToast(`Workspace color updated.`)
}
Expand Down

0 comments on commit 6d934dd

Please sign in to comment.