25 changed files with 975 additions and 655 deletions
@ -1,3 +1,5 @@ |
|||||
export { default as WorkbenchHeader } from './workbench-header.vue'; |
export { default as WorkbenchHeader } from './workbench-header.vue'; |
||||
export { default as WorkbenchProject } from './workbench-project.vue'; |
export { default as WorkbenchProject } from './workbench-project.vue'; |
||||
export { default as WorkbenchQuickNav } from './workbench-quick-nav.vue'; |
export { default as WorkbenchQuickNav } from './workbench-quick-nav.vue'; |
||||
|
export { default as WorkbenchTodo } from './workbench-todo.vue'; |
||||
|
export { default as WorkbenchTrends } from './workbench-trends.vue'; |
||||
|
|||||
@ -0,0 +1,63 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
import type { WorkbenchTodoItem } from '../typing'; |
||||
|
|
||||
|
import { |
||||
|
Card, |
||||
|
CardContent, |
||||
|
CardHeader, |
||||
|
CardTitle, |
||||
|
VbenCheckbox, |
||||
|
} from '@vben-core/shadcn-ui'; |
||||
|
|
||||
|
interface Props { |
||||
|
items: WorkbenchTodoItem[]; |
||||
|
title: string; |
||||
|
} |
||||
|
|
||||
|
defineOptions({ |
||||
|
name: 'WorkbenchTodo', |
||||
|
}); |
||||
|
|
||||
|
withDefaults(defineProps<Props>(), { |
||||
|
items: () => [], |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<Card> |
||||
|
<CardHeader class="py-4"> |
||||
|
<CardTitle class="text-lg">{{ title }}</CardTitle> |
||||
|
</CardHeader> |
||||
|
<CardContent class="flex flex-wrap p-5 pt-0"> |
||||
|
<ul class="divide-border w-full divide-y" role="list"> |
||||
|
<li |
||||
|
v-for="item in items" |
||||
|
:key="item.title" |
||||
|
:class="{ |
||||
|
'select-none line-through opacity-60': item.completed, |
||||
|
}" |
||||
|
class="flex cursor-pointer justify-between gap-x-6 py-5" |
||||
|
> |
||||
|
<div class="flex min-w-0 items-center gap-x-4"> |
||||
|
<VbenCheckbox v-model:checked="item.completed" name="completed" /> |
||||
|
<div class="min-w-0 flex-auto"> |
||||
|
<p class="text-foreground text-sm font-semibold leading-6"> |
||||
|
{{ item.title }} |
||||
|
</p> |
||||
|
<!-- eslint-disable vue/no-v-html --> |
||||
|
<p |
||||
|
class="text-foreground/80 *:text-primary mt-1 truncate text-xs leading-5" |
||||
|
v-html="item.content" |
||||
|
></p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="hidden h-full shrink-0 sm:flex sm:flex-col sm:items-end"> |
||||
|
<span class="text-foreground/80 mt-6 text-xs leading-6"> |
||||
|
{{ item.date }} |
||||
|
</span> |
||||
|
</div> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</CardContent> |
||||
|
</Card> |
||||
|
</template> |
||||
@ -0,0 +1,64 @@ |
|||||
|
<script setup lang="ts"> |
||||
|
import type { WorkbenchTrendItem } from '../typing'; |
||||
|
|
||||
|
import { |
||||
|
Card, |
||||
|
CardContent, |
||||
|
CardHeader, |
||||
|
CardTitle, |
||||
|
VbenIcon, |
||||
|
} from '@vben-core/shadcn-ui'; |
||||
|
|
||||
|
interface Props { |
||||
|
items: WorkbenchTrendItem[]; |
||||
|
title: string; |
||||
|
} |
||||
|
|
||||
|
defineOptions({ |
||||
|
name: 'WorkbenchTrends', |
||||
|
}); |
||||
|
|
||||
|
withDefaults(defineProps<Props>(), { |
||||
|
items: () => [], |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
<template> |
||||
|
<Card> |
||||
|
<CardHeader class="py-4"> |
||||
|
<CardTitle class="text-lg">{{ title }}</CardTitle> |
||||
|
</CardHeader> |
||||
|
<CardContent class="flex flex-wrap p-5 pt-0"> |
||||
|
<ul class="divide-border w-full divide-y" role="list"> |
||||
|
<li |
||||
|
v-for="item in items" |
||||
|
:key="item.title" |
||||
|
class="flex justify-between gap-x-6 py-5" |
||||
|
> |
||||
|
<div class="flex min-w-0 items-center gap-x-4"> |
||||
|
<VbenIcon |
||||
|
:icon="item.avatar" |
||||
|
alt="" |
||||
|
class="size-10 flex-none rounded-full" |
||||
|
/> |
||||
|
<div class="min-w-0 flex-auto"> |
||||
|
<p class="text-foreground text-sm font-semibold leading-6"> |
||||
|
{{ item.title }} |
||||
|
</p> |
||||
|
<!-- eslint-disable vue/no-v-html --> |
||||
|
<p |
||||
|
class="text-foreground/80 *:text-primary mt-1 truncate text-xs leading-5" |
||||
|
v-html="item.content" |
||||
|
></p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="hidden h-full shrink-0 sm:flex sm:flex-col sm:items-end"> |
||||
|
<span class="text-foreground/80 mt-6 text-xs leading-6"> |
||||
|
{{ item.date }} |
||||
|
</span> |
||||
|
</div> |
||||
|
</li> |
||||
|
</ul> |
||||
|
</CardContent> |
||||
|
</Card> |
||||
|
</template> |
||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 22 KiB |
File diff suppressed because it is too large
Loading…
Reference in new issue