mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-25 00:01:55 +00:00
fix workspace color picker issue (#5043)
This commit is contained in:
@@ -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 =
|
||||
@@ -34,6 +35,7 @@
|
||||
})
|
||||
|
||||
usersWorkspaceStore.set(await WorkspaceService.listUserWorkspaces())
|
||||
workspaceColor = colorToSave
|
||||
|
||||
sendUserToast(`Workspace color updated.`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user