dev
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { BadgeCheck, Bell, ChevronsUpDown, CreditCard, LogOut, Sparkles } from "lucide-vue-next";
|
||||
import { Bell, ChevronsUpDown, LogOut } from "lucide-vue-next";
|
||||
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import {
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
SidebarMenuItem,
|
||||
useSidebar,
|
||||
} from "@/components/ui/sidebar";
|
||||
import { useDnfHelperStore } from "@/stores/dnfhelper";
|
||||
|
||||
const props = defineProps<{
|
||||
user: {
|
||||
@@ -29,6 +30,8 @@ const props = defineProps<{
|
||||
const { user } = toRefs(props);
|
||||
|
||||
const { isMobile } = useSidebar();
|
||||
|
||||
const helperStore = useDnfHelperStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -41,8 +44,8 @@ const { isMobile } = useSidebar();
|
||||
class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
|
||||
>
|
||||
<Avatar class="h-8 w-8 rounded-lg">
|
||||
<AvatarImage :src="user.avatar" :alt="user.name" />
|
||||
<AvatarFallback class="rounded-lg"> Dcalc </AvatarFallback>
|
||||
<AvatarImage :src="user.avatar" :alt="user.id" />
|
||||
<AvatarFallback class="rounded-lg"> DNF </AvatarFallback>
|
||||
</Avatar>
|
||||
<div class="grid flex-1 text-left text-sm leading-tight">
|
||||
<span class="truncate font-medium">{{ user.name }}</span>
|
||||
@@ -61,7 +64,7 @@ const { isMobile } = useSidebar();
|
||||
<div class="flex items-center gap-2 px-1 py-1.5 text-left text-sm">
|
||||
<Avatar class="h-8 w-8 rounded-lg">
|
||||
<AvatarImage :src="user.avatar" :alt="user.name" />
|
||||
<AvatarFallback class="rounded-lg"> Dcalc </AvatarFallback>
|
||||
<AvatarFallback class="rounded-lg"> DNF </AvatarFallback>
|
||||
</Avatar>
|
||||
<div class="grid flex-1 text-left text-sm leading-tight">
|
||||
<span class="truncate font-medium">{{ user.name }}</span>
|
||||
@@ -69,32 +72,35 @@ const { isMobile } = useSidebar();
|
||||
</div>
|
||||
</div>
|
||||
</DropdownMenuLabel>
|
||||
<DropdownMenuSeparator />
|
||||
<!-- <DropdownMenuSeparator />
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuItem>
|
||||
<DropdownMenuItem :disabled="!helperStore.helperInfo">
|
||||
<Sparkles />
|
||||
Upgrade to Pro
|
||||
切换绑定
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
</DropdownMenuGroup> -->
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuGroup>
|
||||
<DropdownMenuItem>
|
||||
<!-- <DropdownMenuItem>
|
||||
<BadgeCheck />
|
||||
Account
|
||||
反馈
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem>
|
||||
<CreditCard />
|
||||
Billing
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuItem> -->
|
||||
<DropdownMenuItem>
|
||||
<Bell />
|
||||
Notifications
|
||||
反馈
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
<DropdownMenuSeparator />
|
||||
<DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
:disabled="!helperStore.helperInfo"
|
||||
@click="helperStore.helperInfo = null"
|
||||
>
|
||||
<LogOut />
|
||||
Log out
|
||||
取消绑定
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
|
||||
Reference in New Issue
Block a user