-
Notifications
You must be signed in to change notification settings - Fork 625
chore: sync shadcn components #963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <template> | ||
| <div class="space-y-4"> | ||
| <ButtonGroup class="w-full"> | ||
| <Button variant="ghost" size="sm" class="flex-1">Day</Button> | ||
| <Button size="sm" class="flex-1">Week</Button> | ||
| <ButtonGroupSeparator /> | ||
| <Button variant="ghost" size="sm" class="flex-1">Month</Button> | ||
| <Button variant="ghost" size="sm" class="flex-1">Year</Button> | ||
| </ButtonGroup> | ||
|
|
||
| <ButtonGroup orientation="vertical" class="w-full"> | ||
| <ButtonGroupText class="justify-between"> | ||
| <span class="text-xs uppercase tracking-wide text-muted-foreground">Team access</span> | ||
| <span class="text-xs text-muted-foreground">4 members</span> | ||
| </ButtonGroupText> | ||
| <Button variant="ghost" class="justify-between"> | ||
| <span>Marketing</span> | ||
| <span class="text-xs text-muted-foreground">Owner</span> | ||
| </Button> | ||
| <Button variant="ghost" class="justify-between"> | ||
| <span>Engineering</span> | ||
| <span class="text-xs text-muted-foreground">Can edit</span> | ||
| </Button> | ||
| <Button variant="ghost" class="justify-between"> | ||
| <span>Support</span> | ||
| <span class="text-xs text-muted-foreground">Can view</span> | ||
| </Button> | ||
| </ButtonGroup> | ||
| </div> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { Button } from '@shadcn/components/ui/button' | ||
| import { | ||
| ButtonGroup, | ||
| ButtonGroupSeparator, | ||
| ButtonGroupText | ||
| } from '@shadcn/components/ui/button-group' | ||
| </script> | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <template> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Empty class="border border-dashed border-muted-foreground/40 bg-muted/20"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <EmptyMedia> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Icon icon="lucide:inbox" class="w-10 h-10 text-muted-foreground" /> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </EmptyMedia> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <EmptyHeader> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <EmptyTitle>No conversations yet</EmptyTitle> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <EmptyDescription> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Start a new thread to keep track of customer questions and follow-ups. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </EmptyDescription> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </EmptyHeader> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <EmptyContent class="flex flex-col sm:flex-row gap-2"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button>New conversation</Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <Button variant="outline">Import history</Button> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+7
to
+14
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace hardcoded UI text with i18n keys. Lines 7-14 contain hardcoded user-facing text including the title "No conversations yet", the description, and button labels "New conversation" and "Import history". Per coding guidelines, all user-visible strings in As per coding guidelines. Apply this diff: +import { useI18n } from 'vue-i18n'
+
+const { t } = useI18n()Then update the template: <EmptyHeader>
- <EmptyTitle>No conversations yet</EmptyTitle>
+ <EmptyTitle>{{ t('playground.empty.noConversations') }}</EmptyTitle>
<EmptyDescription>
- Start a new thread to keep track of customer questions and follow-ups.
+ {{ t('playground.empty.description') }}
</EmptyDescription>
</EmptyHeader>
<EmptyContent class="flex flex-col sm:flex-row gap-2">
- <Button>New conversation</Button>
- <Button variant="outline">Import history</Button>
+ <Button>{{ t('playground.empty.newConversation') }}</Button>
+ <Button variant="outline">{{ t('playground.empty.importHistory') }}</Button>
</EmptyContent>Add corresponding keys to your i18n locale files. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </EmptyContent> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </Empty> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </template> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <script setup lang="ts"> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { Icon } from '@iconify/vue' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { Button } from '@shadcn/components/ui/button' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Empty, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EmptyContent, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EmptyDescription, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EmptyHeader, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EmptyMedia, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EmptyTitle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } from '@shadcn/components/ui/empty' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| </script> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace all hardcoded UI text with i18n keys.
The template contains numerous hardcoded user-facing strings (button labels "Day", "Week", "Month", "Year", section headers "Team access", "4 members", team names, and role labels). Per coding guidelines, all user-visible strings in
src/renderer/src/**/*must use vue-i18n translation keys.As per coding guidelines.
Apply this diff to the script section:
Then update all hardcoded strings in the template to use
{{ t('key') }}pattern. For example:Apply similar changes to all other user-facing strings and add corresponding keys to your i18n locale files.
🤖 Prompt for AI Agents