@dashadmin/dash-admin 1.3.53 → 1.3.55
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.
|
@@ -38,7 +38,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
40
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
41
|
-
import { Avatar, useMediaQuery, useTheme } from "@mui/material";
|
|
41
|
+
import { Avatar, MenuList, useMediaQuery, useTheme } from "@mui/material";
|
|
42
42
|
import { useEffect, useState, useRef } from "react";
|
|
43
43
|
import { IconMenuItem } from "mui-nested-menu";
|
|
44
44
|
import ReactDOM from "react-dom";
|
|
@@ -230,31 +230,33 @@ const AvatarComponent = ({ sidebarPosition = "left" }) => {
|
|
|
230
230
|
},
|
|
231
231
|
children: [
|
|
232
232
|
/* @__PURE__ */ jsx("span", { className: "dash-user-name", style: { padding: "8px 16px", display: "block" }, children: getUserDisplayName() }),
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
e
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
233
|
+
/* @__PURE__ */ jsxs(MenuList, { children: [
|
|
234
|
+
/* @__PURE__ */ jsx(
|
|
235
|
+
IconMenuItem,
|
|
236
|
+
{
|
|
237
|
+
onClick: (e) => {
|
|
238
|
+
e.preventDefault();
|
|
239
|
+
setOpen(false);
|
|
240
|
+
handleProfileRedirect();
|
|
241
|
+
},
|
|
242
|
+
leftIcon: /* @__PURE__ */ jsx("span", { className: "dash-user-icon", children: /* @__PURE__ */ jsx(AccountCircleIcon, {}) }),
|
|
243
|
+
label: translate("ra.auth.user_menu", { _: "Perfil" }),
|
|
244
|
+
className: "dash-icon-button-color dash-icon-button-bg"
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ jsx(
|
|
248
|
+
IconMenuItem,
|
|
249
|
+
{
|
|
250
|
+
onClick: (e) => {
|
|
251
|
+
setOpen(false);
|
|
252
|
+
handleLogout(e);
|
|
253
|
+
},
|
|
254
|
+
leftIcon: /* @__PURE__ */ jsx("span", { className: "dash-user-icon", children: /* @__PURE__ */ jsx(LogoutIcon, {}) }),
|
|
255
|
+
label: translate("ra.auth.logout", { _: "Cerrar sesi\xF3n" }),
|
|
256
|
+
className: "dash-icon-button-color dash-icon-button-bg"
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
] })
|
|
258
260
|
]
|
|
259
261
|
}
|
|
260
262
|
)
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Avatar, CircularProgress, Menu, useMediaQuery, useTheme } from '@mui/material';
|
|
1
|
+
import { Avatar, CircularProgress, Menu, MenuList, useMediaQuery, useTheme } from '@mui/material';
|
|
2
2
|
import { useEffect, useState, useRef, useCallback } from 'react';
|
|
3
3
|
import { IconMenuItem } from 'mui-nested-menu';
|
|
4
4
|
import ReactDOM from 'react-dom';
|
|
@@ -261,33 +261,35 @@ useEffect(() => {
|
|
|
261
261
|
<span className='dash-user-name' style={{ padding: '8px 16px', display: 'block' }}>
|
|
262
262
|
{getUserDisplayName()}
|
|
263
263
|
</span>
|
|
264
|
-
<
|
|
265
|
-
|
|
266
|
-
e
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
<
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
<
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
264
|
+
<MenuList>
|
|
265
|
+
<IconMenuItem
|
|
266
|
+
onClick={(e) => {
|
|
267
|
+
e.preventDefault();
|
|
268
|
+
setOpen(false);
|
|
269
|
+
handleProfileRedirect();
|
|
270
|
+
}}
|
|
271
|
+
leftIcon={
|
|
272
|
+
<span className='dash-user-icon'>
|
|
273
|
+
<AccountCircleIcon />
|
|
274
|
+
</span>
|
|
275
|
+
}
|
|
276
|
+
label={translate('ra.auth.user_menu', { _: 'Perfil' })}
|
|
277
|
+
className='dash-icon-button-color dash-icon-button-bg'
|
|
278
|
+
/>
|
|
279
|
+
<IconMenuItem
|
|
280
|
+
onClick={(e) => {
|
|
281
|
+
setOpen(false);
|
|
282
|
+
handleLogout(e);
|
|
283
|
+
}}
|
|
284
|
+
leftIcon={
|
|
285
|
+
<span className='dash-user-icon'>
|
|
286
|
+
<LogoutIcon />
|
|
287
|
+
</span>
|
|
288
|
+
}
|
|
289
|
+
label={translate('ra.auth.logout', { _: 'Cerrar sesión' })}
|
|
290
|
+
className='dash-icon-button-color dash-icon-button-bg'
|
|
291
|
+
/>
|
|
292
|
+
</MenuList>
|
|
291
293
|
</div>
|
|
292
294
|
</div>,
|
|
293
295
|
document.body
|