payload-zitadel-plugin 0.5.11 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { usePathname } from 'next/navigation.js';
|
|
4
|
+
import { formatAdminURL } from 'payload/shared';
|
|
4
5
|
import { useAuth, useConfig } from '@payloadcms/ui';
|
|
5
6
|
import { DefaultAccountIcon } from '@payloadcms/ui/graphics/Account/Default';
|
|
6
|
-
import { formatAdminURL } from '@payloadcms/ui/utilities/formatAdminURL';
|
|
7
7
|
export const Avatar = ({ imageFieldName })=>{
|
|
8
8
|
const { config: { admin: { routes: { account: accountRoute } }, routes: { admin: adminRoute } } } = useConfig();
|
|
9
9
|
const { user } = useAuth();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/client/Avatar/index.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport {usePathname} from 'next/navigation.js'\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/client/Avatar/index.tsx"],"sourcesContent":["'use client'\n\nimport React from 'react'\nimport {usePathname} from 'next/navigation.js'\nimport {formatAdminURL} from 'payload/shared'\nimport {useAuth, useConfig} from '@payloadcms/ui'\nimport {DefaultAccountIcon} from '@payloadcms/ui/graphics/Account/Default'\nimport type {ZitadelAvatarProps} from '../../../types.js'\n\nexport const Avatar = ({imageFieldName}: ZitadelAvatarProps) => {\n\n const {\n config: {\n admin: {\n routes: {account: accountRoute}\n },\n routes: {admin: adminRoute}\n }\n } = useConfig()\n\n const {user} = useAuth()\n\n const pathname = usePathname()\n const isOnAccountPage = pathname === formatAdminURL({adminRoute, path: accountRoute})\n\n return (\n user && user[imageFieldName] ?\n <>\n <style>{'zitadel-avatar:hover { filter: brightness(1.2); }'}</style>\n <img className=\"zitadel-avatar\" src={user[imageFieldName]} height={25} width={25} alt=\"Profile Picture\"\n style={{\n borderRadius: '100%',\n ...(isOnAccountPage ? {filter: 'brightness(.8)'} : {})\n }}/>\n </> :\n <DefaultAccountIcon active={isOnAccountPage}/>\n )\n\n}\n"],"names":["React","usePathname","formatAdminURL","useAuth","useConfig","DefaultAccountIcon","Avatar","imageFieldName","config","admin","routes","account","accountRoute","adminRoute","user","pathname","isOnAccountPage","path","style","img","className","src","height","width","alt","borderRadius","filter","active"],"mappings":"AAAA;AAEA,OAAOA,WAAW,QAAO;AACzB,SAAQC,WAAW,QAAO,qBAAoB;AAC9C,SAAQC,cAAc,QAAO,iBAAgB;AAC7C,SAAQC,OAAO,EAAEC,SAAS,QAAO,iBAAgB;AACjD,SAAQC,kBAAkB,QAAO,0CAAyC;AAG1E,OAAO,MAAMC,SAAS,CAAC,EAACC,cAAc,EAAqB;IAEvD,MAAM,EACFC,QAAQ,EACJC,OAAO,EACHC,QAAQ,EAACC,SAASC,YAAY,EAAC,EAClC,EACDF,QAAQ,EAACD,OAAOI,UAAU,EAAC,EAC9B,EACJ,GAAGT;IAEJ,MAAM,EAACU,IAAI,EAAC,GAAGX;IAEf,MAAMY,WAAWd;IACjB,MAAMe,kBAAkBD,aAAab,eAAe;QAACW;QAAYI,MAAML;IAAY;IAEnF,OACIE,QAAQA,IAAI,CAACP,eAAe,iBACxB,wDACI,oBAACW,eAAO,oEACR,oBAACC;QAAIC,WAAU;QAAiBC,KAAKP,IAAI,CAACP,eAAe;QAAEe,QAAQ;QAAIC,OAAO;QAAIC,KAAI;QACjFN,OAAO;YACHO,cAAc;YACd,GAAIT,kBAAkB;gBAACU,QAAQ;YAAgB,IAAI,CAAC,CAAC;QACzD;wBAET,oBAACrB;QAAmBsB,QAAQX;;AAGxC,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload-zitadel-plugin",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"description": "plugin for Payload CMS, which enables authentication via Zitadel IdP",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@payloadcms/next": "^3.
|
|
40
|
-
"@payloadcms/translations": "^3.
|
|
41
|
-
"@payloadcms/ui": "^3.
|
|
39
|
+
"@payloadcms/next": "^3.68.5",
|
|
40
|
+
"@payloadcms/translations": "^3.68.5",
|
|
41
|
+
"@payloadcms/ui": "^3.68.5",
|
|
42
42
|
"jose": "^6.1.3",
|
|
43
|
-
"next": "^16.0
|
|
44
|
-
"payload": "^3.
|
|
45
|
-
"react": "^19.2.
|
|
46
|
-
"react-dom": "^19.2.
|
|
43
|
+
"next": "^16.1.0",
|
|
44
|
+
"payload": "^3.68.5",
|
|
45
|
+
"react": "^19.2.3",
|
|
46
|
+
"react-dom": "^19.2.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@swc/cli": "^0.7.9",
|
|
50
|
-
"@swc/core": "^1.15.
|
|
51
|
-
"@types/node": "^
|
|
50
|
+
"@swc/core": "^1.15.7",
|
|
51
|
+
"@types/node": "^25.0.3",
|
|
52
52
|
"@types/react": "^19.2.7",
|
|
53
53
|
"@types/react-dom": "^19.2.3",
|
|
54
54
|
"rimraf": "^6.1.2",
|