-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
252 additions
and
35 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
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 @@ | ||
export * from './model' |
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 @@ | ||
export * from './workspace.store' |
27 changes: 27 additions & 0 deletions
27
core/client/src/entities/workspace/model/workspace.store.ts
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,27 @@ | ||
import { ref } from 'vue' | ||
import { defineStore } from 'pinia' | ||
import type { User } from '@/entities/user' | ||
|
||
interface BaseTestWorkspace { | ||
_id: string | ||
name: string | ||
img: string | Blob | ||
link: string | ||
status: 'active' | 'archive' | ||
members: User[] | ||
} | ||
|
||
export const useWorkspaceStore = defineStore('workspace', () => { | ||
const workspace = ref({ | ||
_id: '0', | ||
name: 'Example.io', | ||
img: 'https://avatars.githubusercontent.com/u/185750893?s=100&v=4', | ||
link: 'https://jenda-app-mnenie.com/example.io', | ||
status: 'active', | ||
members: [], | ||
} as BaseTestWorkspace) | ||
|
||
return { | ||
workspace, | ||
} | ||
}) |
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,15 @@ | ||
<script setup lang="ts"> | ||
import { PopoverRoot, useForwardPropsEmits } from 'radix-vue' | ||
import type { PopoverRootEmits, PopoverRootProps } from 'radix-vue' | ||
const props = defineProps<PopoverRootProps>() | ||
const emits = defineEmits<PopoverRootEmits>() | ||
const forwarded = useForwardPropsEmits(props, emits) | ||
</script> | ||
|
||
<template> | ||
<PopoverRoot v-bind="forwarded"> | ||
<slot /> | ||
</PopoverRoot> | ||
</template> |
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,48 @@ | ||
<script setup lang="ts"> | ||
import { computed, type HTMLAttributes } from 'vue' | ||
import { | ||
PopoverContent, | ||
type PopoverContentEmits, | ||
type PopoverContentProps, | ||
PopoverPortal, | ||
useForwardPropsEmits, | ||
} from 'radix-vue' | ||
import { cn } from '@/shared/libs/shadcn/utils' | ||
defineOptions({ | ||
inheritAttrs: false, | ||
}) | ||
const props = withDefaults( | ||
defineProps<PopoverContentProps & { class?: HTMLAttributes['class'] }>(), | ||
{ | ||
align: 'center', | ||
sideOffset: 4, | ||
}, | ||
) | ||
const emits = defineEmits<PopoverContentEmits>() | ||
const delegatedProps = computed(() => { | ||
const { class: _, ...delegated } = props | ||
return delegated | ||
}) | ||
const forwarded = useForwardPropsEmits(delegatedProps, emits) | ||
</script> | ||
|
||
<template> | ||
<PopoverPortal> | ||
<PopoverContent | ||
v-bind="{ ...forwarded, ...$attrs }" | ||
:class=" | ||
cn( | ||
'z-50 w-72 rounded-md border border-neutral-200 bg-white p-2 px-3 text-neutral-950 shadow outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:(border-neutral-700 bg-neutral-800 text-neutral-50)', | ||
props.class, | ||
) | ||
" | ||
> | ||
<slot /> | ||
</PopoverContent> | ||
</PopoverPortal> | ||
</template> |
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,11 @@ | ||
<script setup lang="ts"> | ||
import { PopoverTrigger, type PopoverTriggerProps } from 'radix-vue' | ||
const props = defineProps<PopoverTriggerProps>() | ||
</script> | ||
|
||
<template> | ||
<PopoverTrigger v-bind="props"> | ||
<slot /> | ||
</PopoverTrigger> | ||
</template> |
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,4 @@ | ||
export { default as UiPopover } from './UiPopover.vue' | ||
export { default as UiPopoverContent } from './UiPopoverContent.vue' | ||
export { default as UiPopoverTrigger } from './UiPopoverTrigger.vue' | ||
export { PopoverAnchor } from 'radix-vue' |
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
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
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 @@ | ||
export * from './ui' |
Oops, something went wrong.