bam32bittheme
Advanced tools
Comparing version 2.1.69 to 2.1.70
@@ -9,3 +9,5 @@ "use strict"; | ||
exports.default = void 0; | ||
require("core-js/modules/es.array.includes.js"); | ||
require("core-js/modules/es.regexp.exec.js"); | ||
require("core-js/modules/es.string.includes.js"); | ||
require("core-js/modules/es.string.replace.js"); | ||
@@ -22,2 +24,6 @@ require("core-js/modules/web.dom-collections.iterator.js"); | ||
var _reactRouterDom = require("react-router-dom"); | ||
var _VerifiedUserRounded = _interopRequireDefault(require("@mui/icons-material/VerifiedUserRounded")); | ||
var _reactCookie = require("react-cookie"); | ||
var _ModalComponent = _interopRequireDefault(require("../components/ModalComponent")); | ||
var _axios = _interopRequireDefault(require("axios")); | ||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | ||
@@ -44,2 +50,5 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | ||
} = _ref; | ||
const [collapseHeight, setCollapseHeight] = (0, _react.useState)(0); | ||
const [open, setOpen] = (0, _react.useState)(false); | ||
const [qrCodeData, setQrCodeData] = (0, _react.useState)(null); | ||
const { | ||
@@ -51,3 +60,3 @@ $t: t | ||
const refUserSection = (0, _react.useRef)(); | ||
const [collapseHeight, setCollapseHeight] = (0, _react.useState)(0); | ||
const [cookies, setCookie] = (0, _reactCookie.useCookies)(['deviceGuid']); | ||
const isMobile = (0, _material.useMediaQuery)(theme.breakpoints.down('md')); | ||
@@ -124,2 +133,16 @@ const sidebarCollapsed = (0, _react.useMemo)(() => { | ||
}, []); | ||
const getQrCode = () => { | ||
_axios.default.post("".concat(window.location.origin.includes('localhost') ? 'https://easyflowtest.32bit.com.tr' : window.location.origin, "/portal/api/twofa"), { | ||
kullaniciAdi: localStorage.getItem('userId'), | ||
twoFactorAktif: false | ||
}, { | ||
headers: { | ||
Authorization: "Bearer ".concat(localStorage.getItem('token')) | ||
} | ||
}).then(response => { | ||
setQrCodeData(response.data); | ||
}).catch(error => { | ||
console.error('Error fetching QR code:', error); | ||
}); | ||
}; | ||
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.Box, { | ||
@@ -184,3 +207,15 @@ sx: { | ||
}) | ||
}, /*#__PURE__*/_react.default.createElement(_material.Typography, { | ||
}, /*#__PURE__*/_react.default.createElement(_material.Stack, { | ||
justifyContent: "center", | ||
alignItems: "center", | ||
sx: { | ||
opacity: sidebarCollapsed && 0 | ||
} | ||
}, /*#__PURE__*/_react.default.createElement(_material.Box, null, /*#__PURE__*/_react.default.createElement(_material.IconButton, { | ||
"aria-label": t({ | ||
id: 'common.verify' | ||
}), | ||
color: "error", | ||
onClick: () => getQrCode() | ||
}, /*#__PURE__*/_react.default.createElement(_VerifiedUserRounded.default, null)))), /*#__PURE__*/_react.default.createElement(_material.Typography, { | ||
lineHeight: 1 | ||
@@ -284,3 +319,26 @@ }, name), /*#__PURE__*/_react.default.createElement(_material.Link, { | ||
}) | ||
}, item.label))))))), /*#__PURE__*/_react.default.createElement(_material.Backdrop, { | ||
}, item.label))))), /*#__PURE__*/_react.default.createElement(_ModalComponent.default, { | ||
handleClose: () => setOpen(false), | ||
open: Boolean(open), | ||
modalText: t({ | ||
id: 'verify.modalText' | ||
}), | ||
boxProps: { | ||
sx: { | ||
width: '80%' | ||
} | ||
} | ||
}, /*#__PURE__*/_react.default.createElement(_material.Box, { | ||
p: 2 | ||
}, /*#__PURE__*/_react.default.createElement(_material.Stack, null, qrCodeData && /*#__PURE__*/_react.default.createElement(_material.Box, { | ||
component: "img", | ||
src: "".concat(qrCodeData), | ||
alt: "Base64 Image", | ||
sx: { | ||
maxWidth: '100%', | ||
// Görüntüyü ekran genişliğine göre ayarlar | ||
height: 'auto', | ||
borderRadius: '8px' // Köşeleri yuvarlar | ||
} | ||
})))))), /*#__PURE__*/_react.default.createElement(_material.Backdrop, { | ||
open: isMobile && showMobileMenu, | ||
@@ -287,0 +345,0 @@ sx: { |
{ | ||
"name": "bam32bittheme", | ||
"version": "2.1.69", | ||
"version": "2.1.70", | ||
"private": false, | ||
@@ -13,2 +13,4 @@ "description": "32bit Theme for Material UI v5.x", | ||
"dependencies": { | ||
"axios": "^1.7.7", | ||
"react-cookie": "^7.2.0", | ||
"react-intl": "^6.6.1", | ||
@@ -15,0 +17,0 @@ "react-number-format": "^5.3.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1561378
5101
6
+ Addedaxios@^1.7.7
+ Addedreact-cookie@^7.2.0
+ Added@types/cookie@0.6.0(transitive)
+ Added@types/react@19.0.4(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaxios@1.7.9(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcookie@0.7.2(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
+ Addedreact-cookie@7.2.2(transitive)
+ Addeduniversal-cookie@7.2.2(transitive)