mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-29 17:27:02 +00:00
chore: refactoring and tests, splitting up files (#12495)
This commit is contained in:
11
packages/app/src/pages/layout/sidebar-project-helpers.ts
Normal file
11
packages/app/src/pages/layout/sidebar-project-helpers.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export const projectSelected = (currentDir: string, worktree: string, sandboxes?: string[]) =>
|
||||
worktree === currentDir || sandboxes?.includes(currentDir) === true
|
||||
|
||||
export const projectTileActive = (args: {
|
||||
menu: boolean
|
||||
preview: boolean
|
||||
open: boolean
|
||||
overlay: boolean
|
||||
hoverProject?: string
|
||||
worktree: string
|
||||
}) => args.menu || (args.preview ? args.open : args.overlay && args.hoverProject === args.worktree)
|
||||
Reference in New Issue
Block a user