-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2014 from undb-io/release/v1.0.0-67
Release version v1.0.0-67
- Loading branch information
Showing
9 changed files
with
198 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# Changelog | ||
|
||
|
||
## v1.0.0-67 | ||
|
||
## v1.0.0-66 | ||
|
||
## v1.0.0-65 | ||
|
16 changes: 16 additions & 0 deletions
16
apps/frontend/src/lib/components/blocks/kanban-view/select-kanban-collapsed-lane.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script lang="ts"> | ||
import type { IOption } from "@undb/table" | ||
import Option from "../option/option.svelte" | ||
import { ChevronRightIcon } from "lucide-svelte" | ||
import { kanbanStore } from "$lib/store/kanban.store" | ||
export let option: IOption | ||
export let viewId: string | ||
</script> | ||
|
||
<div class="flex h-full w-full flex-1 flex-col items-center"> | ||
<button on:click={() => kanbanStore.toggleLane(viewId, option.id)}> | ||
<ChevronRightIcon class="text-muted-foreground h-4 w-4" /> | ||
</button> | ||
<Option class="translate-y-8 -rotate-90 text-nowrap" {option} /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { persisted } from "svelte-persisted-store" | ||
import { derived } from "svelte/store" | ||
|
||
interface ICollapsedLanes { | ||
[key: string]: { | ||
[key: string]: boolean | ||
} | ||
} | ||
|
||
export const createKanbanStore = () => { | ||
const store = persisted("undb_kanban", { | ||
collapsedLanes: {} as ICollapsedLanes, | ||
}) | ||
|
||
const { subscribe, set, update } = store | ||
|
||
const toggleLane = (viewId: string, laneId: string) => { | ||
update((state) => { | ||
if (!state.collapsedLanes[viewId]) { | ||
state.collapsedLanes[viewId] = {} | ||
} | ||
state.collapsedLanes[viewId][laneId] = !state.collapsedLanes[viewId][laneId] | ||
return state | ||
}) | ||
} | ||
|
||
const getIsLaneCollapsed = derived( | ||
store, | ||
($store) => (viewId: string, laneId: string) => $store.collapsedLanes[viewId]?.[laneId] ?? false, | ||
) | ||
|
||
return { | ||
subscribe, | ||
set, | ||
update, | ||
|
||
getIsLaneCollapsed, | ||
toggleLane, | ||
} | ||
} | ||
|
||
export const kanbanStore = createKanbanStore() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.