Releases: wobsoriano/vue-clerk
Releases · wobsoriano/vue-clerk
[email protected]
Patch Changes
- 4e7d66e: Remove
@clerk/shared
dependency in nuxt module
[email protected]
Patch Changes
- 0f1bf29: Bump
@clerk/types
to 4.21.0 and@clerk/shared
to 2.8.1
[email protected]
Patch Changes
- 4a22b11: Add custom
<UserProfileLink />
to<UserButton />
[email protected]
Patch Changes
-
4ebc2cc: Support roles and permissions in Nuxt middleware
Examples:
Allow users that have the
org:invoices:create
permissiondefinePageMeta({ middleware: "auth", auth: { permission: "org:invoices:create", }, });
Allow users with the
org:billing
roledefinePageMeta({ middleware: "auth", auth: { role: "org:billing", }, });
v0.6.0
Minor changes
-
6c77ccb: Introduce Nuxt module
Usage:
export default defineNuxtConfig({ modules: ["vue-clerk/nuxt"], });
<script setup> const { data: user } = await useCurrentUser() </script> <template> <SignedIn> <h1>Hello, {{ user?.fullName }}</h1> <UserButton /> </SignedIn> <SignedOut> <SignInButton mode="modal" /> </SignedOut> </template>
// server/api/me.ts import { clerkClient, getAuth } from '#clerk' export default eventHandler((event) => { const { userId } = getAuth(event); if (!userId) { setResponseStatus(event, 403); return; } return clerkClient(event).users.getUser(userId); });
[email protected]
[email protected]
Minor Changes
-
7863158: Add custom pages and links to
<UserProfile />
componentUsage:
<script setup> import { UserProfile } from "vue-clerk"; </script> <template> <UserProfile> <UserProfile.Page label="Custom page" url="custom"> <template #labelIcon> <CustomIcon /> </template> <CustomPage /> </UserProfile.Page> </UserProfile> </template>
-
4c5fcd8: Add custom page support in
<UserButton />
and improve menu items renderingUsage:
<script setup> import { UserButton } from "vue-clerk"; </script> <template> <UserButton> <UserButton.MenuItems> <UserButton.Action label="Help" open="help"> <template #labelIcon> <HelpIcon /> </template> </UserButton.Action> </UserButton.MenuItems> <UserButton.UserProfilePage label="Help" url="help"> <template #labelIcon> <HelpIcon /> </template> <div> <h1>Help Page</h1> <p>This is the custom help page</p> </div> </UserButton.UserProfilePage> </UserButton> </template>
-
f84f404: Add custom pages and links to
<OrganizationProfile />
componentUsage:
<script setup> import { OrganizationProfile } from "vue-clerk"; </script> <template> <OrganizationProfile> <OrganizationProfile.Page label="Custom page" url="custom"> <template #labelIcon> <CustomIcon /> </template> <CustomPage /> </OrganizationProfile.Page> </OrganizationProfile> </template>
[email protected]
Patch Changes
-
562f4e9: Add helper function to update Clerk options
Usage:
import { updateClerkOptions } from "vue-clerk"; import { frFR } from "@clerk/localizations"; updateClerkOptions({ localization: frFR, appearance: { elements: { formButtonPrimary: "bg-slate-500 hover:bg-slate-400 text-sm", }, }, });
[email protected]
Patch Changes
- b1bc743: Improve calls to
addListener
in user-level