sixseconds-modules 3.0.3 → 3.0.6
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/dist/index.cjs.js +212 -211
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.es.js +212 -211
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -574,150 +574,6 @@ const ResetPasswordValidationUtil = (t) => Yup.object().shape({
|
|
|
574
574
|
newPassword: commonUtil(t).password.required(t(COMMON_VALIDATION_MASSAGE.password)),
|
|
575
575
|
passwordConfirmation: commonUtil(t).confirmPass
|
|
576
576
|
});
|
|
577
|
-
if (env.VITE_MODULES_SSO_BACKEND_BASE_URL === void 0) {
|
|
578
|
-
throw new Error("env is not set");
|
|
579
|
-
}
|
|
580
|
-
function createAxiosInstance(baseUrl) {
|
|
581
|
-
return axios.create({
|
|
582
|
-
baseURL: urlcat(baseUrl, "/api/"),
|
|
583
|
-
headers: {
|
|
584
|
-
"Content-Type": "application/json"
|
|
585
|
-
},
|
|
586
|
-
withCredentials: true
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
async function req(config) {
|
|
590
|
-
const baseUrl = env.VITE_MODULES_SSO_BACKEND_BASE_URL;
|
|
591
|
-
const axiosInstance = createAxiosInstance(baseUrl);
|
|
592
|
-
try {
|
|
593
|
-
const response = await axiosInstance.request({ ...config });
|
|
594
|
-
return {
|
|
595
|
-
remote: SERVER_STATUS.success,
|
|
596
|
-
data: response?.data?.data
|
|
597
|
-
};
|
|
598
|
-
} catch (error) {
|
|
599
|
-
if (error.response) {
|
|
600
|
-
const axiosError = error;
|
|
601
|
-
const errorMessage = axiosError.response?.data?.message || ALERT_MESSAGES.fallbackError;
|
|
602
|
-
const errorCode = axiosError.response?.status;
|
|
603
|
-
const errorData = axiosError.response?.data?.data || null;
|
|
604
|
-
return {
|
|
605
|
-
status: errorCode,
|
|
606
|
-
remote: SERVER_STATUS.failure,
|
|
607
|
-
error: {
|
|
608
|
-
message: errorMessage,
|
|
609
|
-
data: errorData
|
|
610
|
-
}
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
throw error;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
const transformNotifications = (itm) => {
|
|
617
|
-
return {
|
|
618
|
-
id: itm.id,
|
|
619
|
-
title: itm.title,
|
|
620
|
-
date: formatDateUtil(itm.created_at),
|
|
621
|
-
type: itm.message_type,
|
|
622
|
-
status: itm.app_access,
|
|
623
|
-
source: itm.app_access
|
|
624
|
-
};
|
|
625
|
-
};
|
|
626
|
-
const transformMenuBuilderData = (itm) => {
|
|
627
|
-
return {
|
|
628
|
-
label: itm.name,
|
|
629
|
-
value: itm.route,
|
|
630
|
-
target: itm.target,
|
|
631
|
-
id: itm.id,
|
|
632
|
-
order: itm.order,
|
|
633
|
-
children: itm.children?.length ? itm.children.map((data) => transformMenuBuilderData(data)) : []
|
|
634
|
-
};
|
|
635
|
-
};
|
|
636
|
-
async function getDropDownMenuApi(params) {
|
|
637
|
-
const res = await req({
|
|
638
|
-
url: urlcat("menu/menus", params),
|
|
639
|
-
method: "GET"
|
|
640
|
-
});
|
|
641
|
-
if (res.remote === SERVER_STATUS.success) {
|
|
642
|
-
return {
|
|
643
|
-
remote: SERVER_STATUS.success,
|
|
644
|
-
data: res?.data?.map(transformMenuBuilderData)
|
|
645
|
-
};
|
|
646
|
-
}
|
|
647
|
-
return res;
|
|
648
|
-
}
|
|
649
|
-
async function notificationApi(data) {
|
|
650
|
-
const res = await req({
|
|
651
|
-
url: urlcat("/notification/index", data),
|
|
652
|
-
method: "GET"
|
|
653
|
-
});
|
|
654
|
-
if (res.remote === SERVER_STATUS.success) {
|
|
655
|
-
return {
|
|
656
|
-
remote: SERVER_STATUS.success,
|
|
657
|
-
data: res?.data?.pager
|
|
658
|
-
};
|
|
659
|
-
}
|
|
660
|
-
return res;
|
|
661
|
-
}
|
|
662
|
-
async function changeUserPasswordApi(payload) {
|
|
663
|
-
const res = await req({
|
|
664
|
-
url: `/auth/change-password`,
|
|
665
|
-
method: "POST",
|
|
666
|
-
data: payload
|
|
667
|
-
});
|
|
668
|
-
if (res.remote === SERVER_STATUS.success) {
|
|
669
|
-
return {
|
|
670
|
-
remote: SERVER_STATUS.success,
|
|
671
|
-
data: res?.data?.pager
|
|
672
|
-
};
|
|
673
|
-
}
|
|
674
|
-
return res;
|
|
675
|
-
}
|
|
676
|
-
async function autoLoginApi(id, userDetails) {
|
|
677
|
-
const response = await req({
|
|
678
|
-
url: urlcat("/auto-authenticate/:id", { id }),
|
|
679
|
-
method: "POST"
|
|
680
|
-
});
|
|
681
|
-
if (response.remote === "success") {
|
|
682
|
-
return response;
|
|
683
|
-
}
|
|
684
|
-
return response;
|
|
685
|
-
}
|
|
686
|
-
const useFormikWithDefaultsProps = (props) => {
|
|
687
|
-
return formik.useFormik({
|
|
688
|
-
validateOnChange: false,
|
|
689
|
-
validateOnBlur: false,
|
|
690
|
-
...props
|
|
691
|
-
});
|
|
692
|
-
};
|
|
693
|
-
function useMediaQuery(query) {
|
|
694
|
-
const getMatch = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
|
|
695
|
-
const [matches, setMatches] = React.useState(getMatch);
|
|
696
|
-
React.useEffect(() => {
|
|
697
|
-
if (typeof window === "undefined") return;
|
|
698
|
-
const mql = window.matchMedia(query);
|
|
699
|
-
const onChange = () => setMatches(mql.matches);
|
|
700
|
-
onChange();
|
|
701
|
-
mql.addEventListener("change", onChange);
|
|
702
|
-
return () => mql.removeEventListener("change", onChange);
|
|
703
|
-
}, [query]);
|
|
704
|
-
return matches;
|
|
705
|
-
}
|
|
706
|
-
function useClickAway(ref, onAway, active = true) {
|
|
707
|
-
React.useEffect(() => {
|
|
708
|
-
if (!active || typeof document === "undefined") return;
|
|
709
|
-
const handler = (e) => {
|
|
710
|
-
const el = ref.current;
|
|
711
|
-
if (el && !el.contains(e.target)) onAway();
|
|
712
|
-
};
|
|
713
|
-
document.addEventListener("mousedown", handler);
|
|
714
|
-
document.addEventListener("touchstart", handler);
|
|
715
|
-
return () => {
|
|
716
|
-
document.removeEventListener("mousedown", handler);
|
|
717
|
-
document.removeEventListener("touchstart", handler);
|
|
718
|
-
};
|
|
719
|
-
}, [ref, onAway, active]);
|
|
720
|
-
}
|
|
721
577
|
function Btn({
|
|
722
578
|
variant = "ghost",
|
|
723
579
|
btnTitle,
|
|
@@ -817,6 +673,41 @@ function LabeledInput({ label, required, type = "text", wrapClassName, className
|
|
|
817
673
|
] })
|
|
818
674
|
] });
|
|
819
675
|
}
|
|
676
|
+
const useFormikWithDefaultsProps = (props) => {
|
|
677
|
+
return formik.useFormik({
|
|
678
|
+
validateOnChange: false,
|
|
679
|
+
validateOnBlur: false,
|
|
680
|
+
...props
|
|
681
|
+
});
|
|
682
|
+
};
|
|
683
|
+
function useMediaQuery(query) {
|
|
684
|
+
const getMatch = () => typeof window !== "undefined" ? window.matchMedia(query).matches : false;
|
|
685
|
+
const [matches, setMatches] = React.useState(getMatch);
|
|
686
|
+
React.useEffect(() => {
|
|
687
|
+
if (typeof window === "undefined") return;
|
|
688
|
+
const mql = window.matchMedia(query);
|
|
689
|
+
const onChange = () => setMatches(mql.matches);
|
|
690
|
+
onChange();
|
|
691
|
+
mql.addEventListener("change", onChange);
|
|
692
|
+
return () => mql.removeEventListener("change", onChange);
|
|
693
|
+
}, [query]);
|
|
694
|
+
return matches;
|
|
695
|
+
}
|
|
696
|
+
function useClickAway(ref, onAway, active = true) {
|
|
697
|
+
React.useEffect(() => {
|
|
698
|
+
if (!active || typeof document === "undefined") return;
|
|
699
|
+
const handler = (e) => {
|
|
700
|
+
const el = ref.current;
|
|
701
|
+
if (el && !el.contains(e.target)) onAway();
|
|
702
|
+
};
|
|
703
|
+
document.addEventListener("mousedown", handler);
|
|
704
|
+
document.addEventListener("touchstart", handler);
|
|
705
|
+
return () => {
|
|
706
|
+
document.removeEventListener("mousedown", handler);
|
|
707
|
+
document.removeEventListener("touchstart", handler);
|
|
708
|
+
};
|
|
709
|
+
}, [ref, onAway, active]);
|
|
710
|
+
}
|
|
820
711
|
function Dropdown({ onClose, className, style, children }) {
|
|
821
712
|
const ref = React.useRef(null);
|
|
822
713
|
useClickAway(ref, onClose);
|
|
@@ -943,6 +834,115 @@ function ViewProfileDialog({ userData, setInitialState, isOpen }) {
|
|
|
943
834
|
] })
|
|
944
835
|
] }) }) });
|
|
945
836
|
}
|
|
837
|
+
if (env.VITE_MODULES_SSO_BACKEND_BASE_URL === void 0) {
|
|
838
|
+
throw new Error("env is not set");
|
|
839
|
+
}
|
|
840
|
+
function createAxiosInstance(baseUrl) {
|
|
841
|
+
return axios.create({
|
|
842
|
+
baseURL: urlcat(baseUrl, "/api/"),
|
|
843
|
+
headers: {
|
|
844
|
+
"Content-Type": "application/json"
|
|
845
|
+
},
|
|
846
|
+
withCredentials: true
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
async function req(config) {
|
|
850
|
+
const baseUrl = env.VITE_MODULES_SSO_BACKEND_BASE_URL;
|
|
851
|
+
const axiosInstance = createAxiosInstance(baseUrl);
|
|
852
|
+
try {
|
|
853
|
+
const response = await axiosInstance.request({ ...config });
|
|
854
|
+
return {
|
|
855
|
+
remote: SERVER_STATUS.success,
|
|
856
|
+
data: response?.data?.data
|
|
857
|
+
};
|
|
858
|
+
} catch (error) {
|
|
859
|
+
if (error.response) {
|
|
860
|
+
const axiosError = error;
|
|
861
|
+
const errorMessage = axiosError.response?.data?.message || ALERT_MESSAGES.fallbackError;
|
|
862
|
+
const errorCode = axiosError.response?.status;
|
|
863
|
+
const errorData = axiosError.response?.data?.data || null;
|
|
864
|
+
return {
|
|
865
|
+
status: errorCode,
|
|
866
|
+
remote: SERVER_STATUS.failure,
|
|
867
|
+
error: {
|
|
868
|
+
message: errorMessage,
|
|
869
|
+
data: errorData
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
throw error;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
const transformNotifications = (itm) => {
|
|
877
|
+
return {
|
|
878
|
+
id: itm.id,
|
|
879
|
+
title: itm.title,
|
|
880
|
+
date: formatDateUtil(itm.created_at),
|
|
881
|
+
type: itm.message_type,
|
|
882
|
+
status: itm.app_access,
|
|
883
|
+
source: itm.app_access
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
const transformMenuBuilderData = (itm) => {
|
|
887
|
+
return {
|
|
888
|
+
label: itm.name,
|
|
889
|
+
value: itm.route,
|
|
890
|
+
target: itm.target,
|
|
891
|
+
id: itm.id,
|
|
892
|
+
order: itm.order,
|
|
893
|
+
children: itm.children?.length ? itm.children.map((data) => transformMenuBuilderData(data)) : []
|
|
894
|
+
};
|
|
895
|
+
};
|
|
896
|
+
async function getDropDownMenuApi(params) {
|
|
897
|
+
const res = await req({
|
|
898
|
+
url: urlcat("menu/menus", params),
|
|
899
|
+
method: "GET"
|
|
900
|
+
});
|
|
901
|
+
if (res.remote === SERVER_STATUS.success) {
|
|
902
|
+
return {
|
|
903
|
+
remote: SERVER_STATUS.success,
|
|
904
|
+
data: res?.data?.map(transformMenuBuilderData)
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
return res;
|
|
908
|
+
}
|
|
909
|
+
async function notificationApi(data) {
|
|
910
|
+
const res = await req({
|
|
911
|
+
url: urlcat("/notification/index", data),
|
|
912
|
+
method: "GET"
|
|
913
|
+
});
|
|
914
|
+
if (res.remote === SERVER_STATUS.success) {
|
|
915
|
+
return {
|
|
916
|
+
remote: SERVER_STATUS.success,
|
|
917
|
+
data: res?.data?.pager
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
return res;
|
|
921
|
+
}
|
|
922
|
+
async function changeUserPasswordApi(payload) {
|
|
923
|
+
const res = await req({
|
|
924
|
+
url: `/auth/change-password`,
|
|
925
|
+
method: "POST",
|
|
926
|
+
data: payload
|
|
927
|
+
});
|
|
928
|
+
if (res.remote === SERVER_STATUS.success) {
|
|
929
|
+
return {
|
|
930
|
+
remote: SERVER_STATUS.success,
|
|
931
|
+
data: res?.data?.pager
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
return res;
|
|
935
|
+
}
|
|
936
|
+
async function autoLoginApi(id, userDetails) {
|
|
937
|
+
const response = await req({
|
|
938
|
+
url: urlcat("/auto-authenticate/:id", { id }),
|
|
939
|
+
method: "POST"
|
|
940
|
+
});
|
|
941
|
+
if (response.remote === "success") {
|
|
942
|
+
return response;
|
|
943
|
+
}
|
|
944
|
+
return response;
|
|
945
|
+
}
|
|
946
946
|
function FormikErrorMsg({ fieldName, formik: formik$1 }) {
|
|
947
947
|
const error = formik.getIn(formik$1.errors, fieldName);
|
|
948
948
|
React.useEffect(() => {
|
|
@@ -1007,6 +1007,47 @@ function ChangePasswordDialog({ isOpen, email, t: t2, setInitialState }) {
|
|
|
1007
1007
|
] })
|
|
1008
1008
|
] }) }) });
|
|
1009
1009
|
}
|
|
1010
|
+
function BackArrow({ style, isBack = true, title = "Back" }) {
|
|
1011
|
+
const handleBack = () => {
|
|
1012
|
+
if (isBack) window.history.back();
|
|
1013
|
+
};
|
|
1014
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-back", style, onClick: handleBack, title, children: /* @__PURE__ */ jsxRuntime.jsx(SVG.LeftArrow, {}) });
|
|
1015
|
+
}
|
|
1016
|
+
function Warning({ message }) {
|
|
1017
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ssh-scope ssh-warning", children: [
|
|
1018
|
+
/* @__PURE__ */ jsxRuntime.jsx(SVG.Warning, {}),
|
|
1019
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-warning__text", children: message })
|
|
1020
|
+
] });
|
|
1021
|
+
}
|
|
1022
|
+
function PreviousLoginBanner({ t: t2, router, style }) {
|
|
1023
|
+
const prev = CookiesUtil.get(STORAGE_VALUES.previousLoginBanner) || {};
|
|
1024
|
+
CookiesUtil.set(STORAGE_VALUES.previousLoginBanner, prev);
|
|
1025
|
+
const handleAutoLogin = async () => {
|
|
1026
|
+
try {
|
|
1027
|
+
const res = await autoLoginApi(prev?.id);
|
|
1028
|
+
if (res.remote === "success") {
|
|
1029
|
+
CookiesUtil.remove(STORAGE_VALUES.previousLoginBanner);
|
|
1030
|
+
if (router) {
|
|
1031
|
+
router.reload();
|
|
1032
|
+
router.replace(ROUTES.home);
|
|
1033
|
+
} else {
|
|
1034
|
+
window.location.reload();
|
|
1035
|
+
window.location.href = ROUTES.home;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
} catch {
|
|
1039
|
+
toast.error(t2(ALERT_MESSAGES.fallbackError));
|
|
1040
|
+
}
|
|
1041
|
+
};
|
|
1042
|
+
if (!prev.id || !prev.isAllowToAccess) return null;
|
|
1043
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ssh-scope ssh-banner", style, children: [
|
|
1044
|
+
"Go back to",
|
|
1045
|
+
" ",
|
|
1046
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { className: "ssh-banner__link", onClick: handleAutoLogin, children: prev.name || prev.email || prev.id }),
|
|
1047
|
+
" ",
|
|
1048
|
+
"Profile"
|
|
1049
|
+
] });
|
|
1050
|
+
}
|
|
1010
1051
|
function AppMenus({ menuItems, setInitialState, t: t2, appName, router }) {
|
|
1011
1052
|
const handleRedirection2 = (name, link, type) => {
|
|
1012
1053
|
if (router && name === APP_NAMES.sso && type === "tab") {
|
|
@@ -1019,38 +1060,38 @@ function AppMenus({ menuItems, setInitialState, t: t2, appName, router }) {
|
|
|
1019
1060
|
window.open(`${link}?source=${name}`, "_blank");
|
|
1020
1061
|
}
|
|
1021
1062
|
};
|
|
1022
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1023
|
-
|
|
1063
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dropdown, { onClose: () => handleCloseUtil(setInitialState), className: "ssh-apps ssh-scroll", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ssh-apps__grid", children: menuItems?.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1064
|
+
"button",
|
|
1024
1065
|
{
|
|
1025
|
-
|
|
1026
|
-
className: "ssh-
|
|
1027
|
-
|
|
1028
|
-
children:
|
|
1029
|
-
"
|
|
1030
|
-
{
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
/* @__PURE__ */ jsxRuntime.jsx("img", { className: "ssh-apps__icon", src: item.icon, alt: item.name }),
|
|
1036
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-apps__label", children: t2(item.name) })
|
|
1037
|
-
]
|
|
1038
|
-
},
|
|
1039
|
-
index
|
|
1040
|
-
)) })
|
|
1041
|
-
}
|
|
1042
|
-
);
|
|
1066
|
+
type: "button",
|
|
1067
|
+
className: "ssh-apps__item",
|
|
1068
|
+
onClick: () => handleRedirection2(appName, item.link, item.type),
|
|
1069
|
+
children: [
|
|
1070
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { className: "ssh-apps__icon", src: item.icon, alt: item.name }),
|
|
1071
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-apps__label", children: t2(item.name) })
|
|
1072
|
+
]
|
|
1073
|
+
},
|
|
1074
|
+
index
|
|
1075
|
+
)) }) });
|
|
1043
1076
|
}
|
|
1044
1077
|
function Language({ interFaceLangList, updateInterfaceLang, selectedInterFaceLang, setInitialState, t: t2 }) {
|
|
1045
1078
|
const onPick = (lang) => {
|
|
1046
1079
|
updateInterfaceLang?.(lang);
|
|
1047
1080
|
setInitialState((p) => ({ ...p, toggles: { ...p.toggles, lang: false } }));
|
|
1048
1081
|
};
|
|
1049
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dropdown, { onClose: () => handleCloseUtil(setInitialState), className: "ssh-lang", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ssh-lang__list ssh-scroll", children: interFaceLangList?.length ? interFaceLangList.map((lang, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1082
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Dropdown, { onClose: () => handleCloseUtil(setInitialState), className: "ssh-lang", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ssh-lang__list ssh-scroll", children: interFaceLangList?.length ? interFaceLangList.map((lang, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1083
|
+
"li",
|
|
1084
|
+
{
|
|
1085
|
+
className: `ssh-lang__item${selectedInterFaceLang?.value === lang?.value ? " ssh-lang__item--active" : ""}`,
|
|
1086
|
+
onClick: () => onPick(lang),
|
|
1087
|
+
children: [
|
|
1088
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { className: "ssh-lang__flag", src: lang?.flag || IMAGES.DefaultLang, alt: lang?.label }),
|
|
1089
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-lang__label", children: t2(lang?.label) }),
|
|
1090
|
+
selectedInterFaceLang?.value === lang?.value && /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "ssh-lang__check" })
|
|
1091
|
+
]
|
|
1092
|
+
},
|
|
1093
|
+
i
|
|
1094
|
+
)) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-lang__label", children: t2(ALERT_MESSAGES.dataNoFount) }) }) });
|
|
1054
1095
|
}
|
|
1055
1096
|
function Logo({ style }) {
|
|
1056
1097
|
const base2 = env.VITE_MODULES_SSO_FRONTEND_BASE_URL || "";
|
|
@@ -1407,47 +1448,7 @@ function Header({
|
|
|
1407
1448
|
/* @__PURE__ */ jsxRuntime.jsx(ViewProfileDialog, { isOpen: state.toggles.viewProfile, userData, setInitialState: setState })
|
|
1408
1449
|
] });
|
|
1409
1450
|
}
|
|
1410
|
-
|
|
1411
|
-
const prev = CookiesUtil.get(STORAGE_VALUES.previousLoginBanner) || {};
|
|
1412
|
-
CookiesUtil.set(STORAGE_VALUES.previousLoginBanner, prev);
|
|
1413
|
-
const handleAutoLogin = async () => {
|
|
1414
|
-
try {
|
|
1415
|
-
const res = await autoLoginApi(prev?.id);
|
|
1416
|
-
if (res.remote === "success") {
|
|
1417
|
-
CookiesUtil.remove(STORAGE_VALUES.previousLoginBanner);
|
|
1418
|
-
if (router) {
|
|
1419
|
-
router.reload();
|
|
1420
|
-
router.replace(ROUTES.home);
|
|
1421
|
-
} else {
|
|
1422
|
-
window.location.reload();
|
|
1423
|
-
window.location.href = ROUTES.home;
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
} catch {
|
|
1427
|
-
toast.error(t2(ALERT_MESSAGES.fallbackError));
|
|
1428
|
-
}
|
|
1429
|
-
};
|
|
1430
|
-
if (!prev.id || !prev.isAllowToAccess) return null;
|
|
1431
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ssh-scope ssh-banner", style, children: [
|
|
1432
|
-
"Go back to",
|
|
1433
|
-
" ",
|
|
1434
|
-
/* @__PURE__ */ jsxRuntime.jsx("strong", { className: "ssh-banner__link", onClick: handleAutoLogin, children: prev.name || prev.email || prev.id }),
|
|
1435
|
-
" ",
|
|
1436
|
-
"Profile"
|
|
1437
|
-
] });
|
|
1438
|
-
}
|
|
1439
|
-
function BackArrow({ style, isBack = true, title = "Back" }) {
|
|
1440
|
-
const handleBack = () => {
|
|
1441
|
-
if (isBack) window.history.back();
|
|
1442
|
-
};
|
|
1443
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-back", style, onClick: handleBack, title, children: /* @__PURE__ */ jsxRuntime.jsx(SVG.LeftArrow, {}) });
|
|
1444
|
-
}
|
|
1445
|
-
function Warning({ message }) {
|
|
1446
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ssh-scope ssh-warning", children: [
|
|
1447
|
-
/* @__PURE__ */ jsxRuntime.jsx(SVG.Warning, {}),
|
|
1448
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ssh-warning__text", children: message })
|
|
1449
|
-
] });
|
|
1450
|
-
}
|
|
1451
|
+
exports.APP_NAMES = APP_NAMES;
|
|
1451
1452
|
exports.BackArrow = BackArrow;
|
|
1452
1453
|
exports.ChangePasswordDialog = ChangePasswordDialog;
|
|
1453
1454
|
exports.CookiesUtil = CookiesUtil;
|
|
@@ -1470,7 +1471,7 @@ exports.Warning = Warning;
|
|
|
1470
1471
|
try {
|
|
1471
1472
|
if (typeof document != "undefined") {
|
|
1472
1473
|
var elementStyle = document.createElement("style");
|
|
1473
|
-
elementStyle.appendChild(document.createTextNode('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");\n\n/* ==========================================================================\n SixSeconds Header — raw, namespaced CSS.\n\n Isolation strategy (no MUI, no Shadow DOM):\n - Every class is prefixed `ssh-`, so the host app can never accidentally\n target our elements and our rules can never target the host\'s.\n - `.ssh-scope` (placed on every top-level rendered node) does `all: initial`,\n which resets the INHERITED properties (font, color, line-height, …) that\n would otherwise cascade in from the host — giving our tree a clean baseline.\n Because `.ssh-scope` is a class (0,1,0) it beats a host `div`/element rule\n (0,0,x), so it wins without `!important`.\n - Component rules use single `.ssh-*` classes (0,1,0), which beat any host\n GLOBAL element selector (`button`, `a`, `ul li`, … all 0,0,x) — so host\n resets/normalizes cannot restyle our controls. We set every property we\n care about explicitly, so nothing is left to the host.\n ========================================================================== */\n\n/* ---- scope / boundary reset ------------------------------------------------ */\n.ssh-scope {\n all: initial;\n box-sizing: border-box;\n display: block;\n font-family:\n "Inter",\n system-ui,\n -apple-system,\n "Segoe UI",\n Roboto,\n Helvetica,\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1c1e;\n text-align: left;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.ssh-scope *,\n.ssh-scope *::before,\n.ssh-scope *::after {\n box-sizing: border-box;\n}\n.ssh-scope img,\n.ssh-scope svg {\n max-width: 100%;\n}\n.ssh-scope a {\n color: inherit;\n text-decoration: none;\n}\n.ssh-scope button {\n font-family: inherit;\n}\n\n/* colour + token helpers (kept literal so there is no theme dependency) */\n:root {\n --ssh-brand: #0073b1;\n --ssh-brand-strong: #007fc0;\n --ssh-ink: #1a1c1e;\n --ssh-muted: #5f6368;\n --ssh-line: #e0e0e0;\n --ssh-line-soft: #f1f3f4;\n --ssh-surface: #fff;\n --ssh-hover: #f8f9fa;\n --ssh-danger: #d32f2f;\n}\n\n/* ---- header bar ------------------------------------------------------------ */\n.ssh-header {\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n height: 64px;\n width: 100%;\n background: var(--ssh-surface);\n color: var(--ssh-ink);\n border-bottom: 1px solid var(--ssh-line);\n z-index: 1000;\n display: flex;\n align-items: center;\n}\n.ssh-header__inner {\n width: 100%;\n max-width: 100%;\n padding: 0 24px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.ssh-header__left,\n.ssh-header__center,\n.ssh-header__right {\n display: flex;\n align-items: center;\n}\n.ssh-header__left {\n gap: 8px;\n}\n.ssh-header__right {\n gap: 4px;\n margin: 10px 0;\n}\n.ssh-header__actions {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n\n/* ---- logo ------------------------------------------------------------------ */\n.ssh-logo {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.ssh-logo--full {\n width: 200px;\n max-width: 200px;\n}\n.ssh-logo--full svg,\n.ssh-logo--small svg {\n height: 40px;\n width: auto;\n}\n.ssh-logo--small {\n display: none;\n}\n\n/* ---- primitives: buttons --------------------------------------------------- */\n.ssh-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n font-family: inherit;\n font-size: 14px;\n font-weight: 500;\n line-height: 1.2;\n padding: 10px 16px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--ssh-ink);\n cursor: pointer;\n text-transform: none;\n transition:\n background 0.2s ease,\n color 0.2s ease,\n border-color 0.2s ease;\n -webkit-appearance: none;\n appearance: none;\n}\n.ssh-btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n.ssh-btn--primary {\n background: var(--ssh-brand);\n color: #fff;\n border-color: var(--ssh-brand);\n}\n.ssh-btn--primary:hover:not(:disabled) {\n background: #005a8b;\n border-color: #005a8b;\n}\n.ssh-btn--outline {\n background: transparent;\n color: var(--ssh-muted);\n border-color: var(--ssh-line);\n}\n.ssh-btn--outline:hover:not(:disabled) {\n color: var(--ssh-brand);\n border-color: var(--ssh-brand);\n background: rgba(0, 115, 177, 0.04);\n}\n.ssh-btn--danger {\n background: var(--ssh-danger);\n color: #fff;\n border-color: var(--ssh-danger);\n}\n.ssh-btn--danger:hover:not(:disabled) {\n background: #b71c1c;\n border-color: #b71c1c;\n}\n.ssh-btn--ghost {\n background: transparent;\n color: var(--ssh-muted);\n}\n.ssh-btn--ghost:hover:not(:disabled) {\n background: rgba(0, 115, 177, 0.04);\n}\n.ssh-btn--block {\n width: 100%;\n}\n\n/* ---- primitives: icon trigger --------------------------------------------- */\n.ssh-icon-trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n padding: 6px;\n border: 0;\n background: transparent;\n border-radius: 8px;\n cursor: pointer;\n color: #808080;\n transition: background 0.2s ease;\n}\n.ssh-icon-trigger:hover {\n background: var(--ssh-hover);\n}\n.ssh-icon-trigger svg {\n width: 32px;\n height: 32px;\n color: currentColor;\n}\n\n/* ---- primitives: avatar ---------------------------------------------------- */\n.ssh-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n background: #ccc;\n color: var(--ssh-ink);\n font-weight: 600;\n font-size: 14px;\n flex-shrink: 0;\n}\n.ssh-avatar img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n/* ---- primitives: badge ----------------------------------------------------- */\n.ssh-badge {\n position: relative;\n display: inline-flex;\n}\n.ssh-badge__count {\n position: absolute;\n top: -4px;\n right: -6px;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: var(--ssh-danger);\n color: #fff;\n font-size: 11px;\n font-weight: 600;\n line-height: 18px;\n text-align: center;\n}\n\n/* ---- primitives: dropdown panel ------------------------------------------- */\n.ssh-dropdown {\n position: absolute;\n top: 60px;\n right: 0;\n background: var(--ssh-surface);\n border: 1px solid var(--ssh-line);\n border-radius: 12px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);\n z-index: 1100;\n padding: 16px;\n}\n.ssh-dropdown--profile {\n width: 280px;\n padding: 0;\n overflow: hidden;\n}\n[dir="rtl"] .ssh-dropdown {\n right: auto;\n left: 0;\n}\n\n/* custom scrollbar for scrollable panels */\n.ssh-scroll {\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ssh-scroll::-webkit-scrollbar {\n width: 6px;\n}\n.ssh-scroll::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 10px;\n}\n.ssh-scroll::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 10px;\n}\n.ssh-scroll::-webkit-scrollbar-thumb:hover {\n background: #bbb;\n}\n\n/* ---- desktop nav menu ------------------------------------------------------ */\n.ssh-nav {\n display: flex;\n}\n.ssh-menu {\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ssh-menu__item {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n padding: 0 16px;\n}\n.ssh-menu__link {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px 4px;\n font-size: 14px;\n font-weight: 500;\n color: #2a2a2a;\n transition: color 0.2s ease;\n}\n.ssh-menu__link:hover {\n color: var(--ssh-brand);\n}\n.ssh-menu__caret {\n width: 14px;\n height: 14px;\n transition: transform 0.2s ease;\n}\n.ssh-menu__item:hover .ssh-menu__caret {\n transform: rotate(180deg);\n}\n.ssh-submenu {\n position: absolute;\n top: 150%;\n left: 0;\n width: 220px;\n background: #fff;\n border: 1px solid #e2e8f0;\n border-top: 3px solid var(--ssh-brand);\n border-radius: 4px;\n box-shadow:\n 0 12px 48px rgba(0, 0, 0, 0.12),\n 0 4px 16px rgba(0, 0, 0, 0.08);\n list-style: none;\n margin: 0;\n padding: 8px 0;\n opacity: 0;\n visibility: hidden;\n transform: translateY(12px);\n transition:\n opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),\n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),\n visibility 0.25s;\n z-index: 1000;\n}\n.ssh-menu__item:hover .ssh-submenu {\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n}\n.ssh-submenu li {\n list-style: none;\n}\n.ssh-submenu__link {\n display: block;\n padding: 12px 28px;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: #2a2a2a;\n white-space: normal;\n transition: all 0.2s ease;\n}\n.ssh-submenu__link:hover {\n background: #f0f7fb;\n color: var(--ssh-brand);\n padding-left: 32px;\n}\n\n/* ---- mobile nav menu ------------------------------------------------------- */\n.ssh-mobile-menu {\n position: fixed;\n left: 0;\n top: 64px;\n width: 100%;\n height: 95vh;\n background: #fff;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);\n padding: 8px 20px 12px;\n overflow-y: auto;\n}\n.ssh-mobile-menu__link {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n margin-bottom: 4px;\n font-size: 16px;\n font-weight: 600;\n color: #1a1c1e;\n border-bottom: 1px solid var(--ssh-line-soft);\n}\n.ssh-mobile-submenu {\n list-style: none;\n margin: 0;\n padding-left: 15px;\n background: #fbfbfc;\n}\n.ssh-mobile-submenu__link {\n display: block;\n padding: 12px 32px;\n font-size: 14px;\n font-weight: 400;\n color: #4a4d50;\n}\n\n/* ---- app menu grid --------------------------------------------------------- */\n.ssh-apps {\n padding: 16px;\n background: #fff;\n max-height: 450px;\n min-width: 320px;\n}\n.ssh-apps__grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n}\n.ssh-apps__item {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n padding: 12px 8px;\n border: 0;\n border-radius: 12px;\n background: transparent;\n cursor: pointer;\n text-align: center;\n transition: background 0.2s ease;\n}\n.ssh-apps__item:hover {\n background: var(--ssh-hover);\n}\n.ssh-apps__icon {\n width: 40px;\n height: 40px;\n object-fit: contain;\n}\n.ssh-apps__label {\n font-size: 13px;\n font-weight: 500;\n line-height: 1.2;\n color: var(--ssh-ink);\n word-break: break-word;\n}\n\n/* ---- language dropdown ----------------------------------------------------- */\n.ssh-lang-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n padding: 4px;\n border: 0;\n background: transparent;\n color: #777;\n cursor: pointer;\n}\n.ssh-lang-trigger__flag {\n width: 40px;\n height: auto;\n aspect-ratio: 3 / 2;\n object-fit: cover;\n}\n.ssh-lang {\n max-width: 333px;\n min-width: 333px;\n}\n.ssh-lang__list {\n list-style: none;\n margin: 0;\n padding: 0 16px 0 0;\n max-height: 300px;\n}\n.ssh-lang__item {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 0;\n border-bottom: 1px solid var(--ssh-line-soft);\n cursor: pointer;\n transition: background 0.2s ease;\n}\n.ssh-lang__item:last-child {\n border-bottom: 0;\n}\n.ssh-lang__item:hover {\n background: var(--ssh-hover);\n}\n.ssh-lang__flag {\n width: 40px;\n height: 26px;\n aspect-ratio: 3 / 2;\n object-fit: cover;\n flex-shrink: 0;\n}\n.ssh-lang__label {\n font-size: 16px;\n font-weight: 500;\n margin: 0;\n}\n.ssh-lang__check {\n width: 24px;\n height: 24px;\n color: var(--ssh-brand-strong);\n margin-left: auto;\n}\n\n/* ---- notification dropdown ------------------------------------------------- */\n.ssh-notif {\n min-width: 420px;\n max-width: 460px;\n}\n.ssh-notif__tabs {\n display: flex;\n border-bottom: 1px solid var(--ssh-line);\n margin-bottom: 16px;\n}\n.ssh-notif__tab {\n padding: 8px 20px;\n border: 0;\n border-bottom: 2px solid transparent;\n background: transparent;\n font-size: 14px;\n font-weight: 400;\n color: var(--ssh-muted);\n text-transform: capitalize;\n cursor: pointer;\n white-space: nowrap;\n}\n.ssh-notif__tab:hover {\n background: rgba(0, 115, 177, 0.04);\n}\n.ssh-notif__tab--active {\n font-weight: 600;\n color: var(--ssh-brand);\n border-bottom-color: var(--ssh-brand);\n}\n.ssh-notif__title {\n font-size: 16px;\n font-weight: 500;\n color: #000;\n margin: 4px 0;\n}\n.ssh-notif__list {\n max-height: 300px;\n padding-right: 5px;\n}\n.ssh-notif__item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 16px;\n cursor: pointer;\n}\n.ssh-notif__item:hover {\n background: var(--ssh-hover);\n}\n.ssh-notif__body {\n flex: 1;\n}\n.ssh-notif__name {\n font-size: 16px;\n font-weight: 500;\n color: #000;\n margin: 0;\n}\n.ssh-notif__meta {\n font-size: 14px;\n color: #666;\n}\n.ssh-notif__link {\n color: rgb(25, 118, 210);\n margin-left: 5px;\n cursor: pointer;\n}\n.ssh-notif__empty,\n.ssh-notif__loader {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 12px;\n color: #000;\n}\n\n/* ---- user profile menu ----------------------------------------------------- */\n.ssh-profile {\n position: relative;\n}\n.ssh-profile__trigger {\n display: flex;\n align-items: center;\n gap: 2px;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n.ssh-profile__head {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 16px;\n background: var(--ssh-hover);\n border-bottom: 1px solid var(--ssh-line-soft);\n}\n.ssh-profile__avatar {\n width: 65px;\n height: 65px;\n border: 2px solid #fff;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n font-size: 22px;\n}\n.ssh-profile__id {\n flex: 1;\n min-width: 0;\n}\n.ssh-profile__name {\n font-size: 15px;\n font-weight: 600;\n color: var(--ssh-ink);\n margin: 0;\n}\n.ssh-profile__email {\n font-size: 13px;\n color: var(--ssh-muted);\n margin: 2px 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ssh-profile__role {\n font-size: 11px;\n font-weight: 700;\n color: var(--ssh-brand);\n text-transform: uppercase;\n margin-top: 2px;\n}\n.ssh-profile__menu {\n list-style: none;\n margin: 0;\n padding: 8px 0;\n}\n.ssh-profile__item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px;\n cursor: pointer;\n color: var(--ssh-ink);\n transition:\n background 0.2s ease,\n color 0.2s ease;\n}\n.ssh-profile__item:hover {\n background: var(--ssh-hover);\n color: var(--ssh-brand);\n}\n.ssh-profile__item--danger {\n border-top: 1px solid var(--ssh-line-soft);\n}\n.ssh-profile__item--danger:hover {\n color: var(--ssh-danger);\n}\n.ssh-profile__item-icon {\n width: 25px;\n height: 25px;\n color: currentColor;\n flex-shrink: 0;\n}\n.ssh-profile__item-label {\n font-size: 14px;\n font-weight: 400;\n margin: 0;\n}\n\n/* ---- dialog ---------------------------------------------------------------- */\n.ssh-dialog-overlay {\n position: fixed;\n inset: 0;\n z-index: 1300;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 16px;\n background: rgba(0, 0, 0, 0.5);\n}\n.ssh-dialog {\n width: 100%;\n max-height: calc(100vh - 64px);\n overflow-y: auto;\n background: #fff;\n border-radius: 16px;\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);\n}\n.ssh-dialog--xs {\n max-width: 400px;\n}\n.ssh-dialog--sm {\n max-width: 600px;\n}\n.ssh-dialog--md {\n max-width: 900px;\n}\n.ssh-dialog__close-row {\n display: flex;\n justify-content: flex-end;\n padding: 12px;\n}\n.ssh-dialog__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n border: 0;\n border-radius: 50%;\n background: #f5f5f5;\n color: var(--ssh-muted);\n cursor: pointer;\n}\n.ssh-dialog__close:hover {\n background: #eee;\n color: #111;\n}\n.ssh-dialog__close svg {\n width: 18px;\n height: 18px;\n}\n\n/* danger / confirm dialog */\n.ssh-danger {\n padding: 24px;\n}\n.ssh-danger__icon {\n color: var(--ssh-danger);\n width: 48px;\n height: 48px;\n}\n.ssh-danger__title {\n font-size: 20px;\n font-weight: 600;\n color: var(--ssh-ink);\n margin: 16px 0 0;\n}\n.ssh-danger__desc {\n font-size: 15px;\n font-weight: 400;\n color: var(--ssh-muted);\n margin: 8px 0 0;\n}\n.ssh-danger__actions {\n display: flex;\n align-items: center;\n gap: 16px;\n margin-top: 24px;\n}\n\n/* ---- form field ------------------------------------------------------------ */\n.ssh-field {\n display: block;\n}\n.ssh-field__label {\n display: block;\n padding: 13px 0 4px 1px;\n font-size: 14px;\n font-weight: 500;\n color: #333;\n line-height: normal;\n}\n.ssh-field__req {\n color: var(--ssh-danger);\n margin-left: 2px;\n}\n.ssh-input-wrap {\n position: relative;\n display: flex;\n align-items: center;\n}\n.ssh-input {\n width: 100%;\n height: 40px;\n padding: 0 14px;\n font-family: inherit;\n font-size: 14px;\n color: var(--ssh-ink);\n background: #fff;\n border: 1px solid var(--ssh-line);\n border-radius: 20px;\n outline: none;\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n}\n.ssh-input::placeholder {\n color: #9aa0a6;\n}\n.ssh-input:focus {\n border-color: var(--ssh-brand);\n box-shadow: 0 0 0 3px rgba(0, 115, 177, 0.12);\n}\n.ssh-input:disabled {\n background: #e9e6e6;\n}\n.ssh-input--has-toggle {\n padding-right: 42px;\n}\n.ssh-input__toggle {\n position: absolute;\n right: 12px;\n display: inline-flex;\n align-items: center;\n border: 0;\n background: transparent;\n cursor: pointer;\n color: gray;\n}\n.ssh-input__toggle svg {\n width: 18px;\n height: 18px;\n}\n\n/* ---- view profile dialog --------------------------------------------------- */\n.ssh-vp {\n padding: 0 24px 40px;\n}\n.ssh-vp__grid {\n display: grid;\n grid-template-columns: 5fr 7fr;\n gap: 48px;\n margin-top: 12px;\n}\n.ssh-vp__avatar {\n width: 150px;\n height: 150px;\n border: 4px solid var(--ssh-brand);\n box-shadow: 0 8px 24px rgba(0, 115, 177, 0.15);\n margin-bottom: 32px;\n font-size: 44px;\n}\n.ssh-vp__side {\n display: flex;\n flex-direction: column;\n gap: 20px;\n margin-left: 16px;\n}\n.ssh-vp__section-label {\n font-size: 14px;\n font-weight: 700;\n color: var(--ssh-ink);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin: 0 0 12px;\n}\n.ssh-vp__row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ssh-vp__value {\n font-size: 15px;\n color: var(--ssh-muted);\n}\n.ssh-vp__chips {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.ssh-chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 0 12px;\n border: 1px solid var(--ssh-line);\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n color: var(--ssh-ink);\n}\n.ssh-vp__name {\n font-size: 28px;\n font-weight: 700;\n color: var(--ssh-ink);\n margin: 0;\n}\n.ssh-vp__title {\n font-size: 16px;\n color: var(--ssh-brand);\n font-weight: 600;\n margin: 4px 0 16px;\n}\n.ssh-vp__bio {\n font-size: 15px;\n line-height: 1.7;\n color: var(--ssh-muted);\n}\n.ssh-vp__divider {\n height: 1px;\n background: var(--ssh-line-soft);\n border: 0;\n margin: 20px 0;\n}\n.ssh-vp__link {\n color: var(--ssh-brand);\n font-weight: 500;\n cursor: pointer;\n}\n.ssh-vp__socials {\n display: flex;\n gap: 12px;\n margin-top: 4px;\n}\n.ssh-vp__social {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 42px;\n height: 42px;\n border-radius: 10px;\n background: var(--ssh-brand);\n color: #fff;\n transition:\n background 0.2s ease,\n transform 0.2s ease;\n}\n.ssh-vp__social:hover {\n background: #005a8b;\n transform: translateY(-2px);\n}\n.ssh-vp__social svg {\n width: 18px;\n height: 18px;\n}\n.ssh-vp__facts {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 20px;\n background: #f9fafb;\n border: 1px solid var(--ssh-line-soft);\n border-radius: 12px;\n margin: 24px 0;\n}\n.ssh-vp__fact {\n display: flex;\n gap: 12px;\n}\n.ssh-vp__fact-label {\n font-weight: 600;\n color: var(--ssh-ink);\n min-width: 80px;\n font-size: 15px;\n}\n.ssh-vp__section {\n margin-bottom: 20px;\n}\n\n/* ---- change password (dialog body) ---------------------------------------- */\n.ssh-cp {\n padding: 0 24px 32px;\n}\n.ssh-cp__title {\n font-size: 22px;\n font-weight: 700;\n color: var(--ssh-ink);\n margin: 0 0 20px;\n}\n.ssh-cp__card {\n padding: 24px;\n background: #fff;\n border: 1px solid var(--ssh-line-soft);\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n/* ---- previous-login banner ------------------------------------------------- */\n.ssh-banner {\n width: 100%;\n padding: 6px 12px;\n margin-top: 64px;\n background: var(--ssh-brand-strong);\n color: #fff;\n text-align: center;\n font-size: 14px;\n text-transform: capitalize;\n}\n.ssh-banner__link {\n cursor: pointer;\n text-decoration: underline;\n font-weight: 600;\n}\n\n/* ---- misc elements --------------------------------------------------------- */\n.ssh-warning {\n display: flex;\n gap: 8px;\n margin-top: 16px;\n}\n.ssh-warning__text {\n font-size: 14px;\n color: var(--ssh-muted);\n}\n.ssh-error-msg {\n display: block;\n color: var(--ssh-danger);\n font-size: 13px;\n font-weight: 600;\n margin-top: 4px;\n}\n.ssh-back {\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n margin-right: 8px;\n cursor: pointer;\n}\n.ssh-spin {\n animation: ssh-spin 0.8s linear infinite;\n}\n@keyframes ssh-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* ---- responsive ------------------------------------------------------------ */\n@media (max-width: 1324px) {\n .ssh-nav--desktop {\n display: none;\n }\n}\n@media (min-width: 1325px) {\n .ssh-hamburger {\n display: none;\n }\n}\n@media (max-width: 600px) {\n .ssh-header__inner {\n padding: 0 12px;\n }\n .ssh-logo--full {\n display: none;\n }\n .ssh-logo--small {\n display: flex;\n }\n .ssh-notif,\n .ssh-lang {\n min-width: 280px;\n max-width: 90vw;\n }\n .ssh-dropdown--profile {\n width: 280px;\n }\n .ssh-vp__grid {\n grid-template-columns: 1fr;\n gap: 24px;\n }\n .ssh-icon-trigger svg {\n width: 26px;\n height: 26px;\n }\n}'));
|
|
1474
|
+
elementStyle.appendChild(document.createTextNode('@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");\n\n/* ==========================================================================\n SixSeconds Header — raw, namespaced CSS.\n\n Isolation strategy (no MUI, no Shadow DOM):\n - Every class is prefixed `ssh-`, so the host app can never accidentally\n target our elements and our rules can never target the host\'s.\n - `.ssh-scope` (placed on every top-level rendered node) does `all: initial`,\n which resets the INHERITED properties (font, color, line-height, …) that\n would otherwise cascade in from the host — giving our tree a clean baseline.\n Because `.ssh-scope` is a class (0,1,0) it beats a host `div`/element rule\n (0,0,x), so it wins without `!important`.\n - Component rules use single `.ssh-*` classes (0,1,0), which beat any host\n GLOBAL element selector (`button`, `a`, `ul li`, … all 0,0,x) — so host\n resets/normalizes cannot restyle our controls. We set every property we\n care about explicitly, so nothing is left to the host.\n ========================================================================== */\n\n/* ---- scope / boundary reset ------------------------------------------------ */\n.ssh-scope {\n all: initial;\n box-sizing: border-box;\n display: block;\n font-family:\n "Inter",\n system-ui,\n -apple-system,\n "Segoe UI",\n Roboto,\n Helvetica,\n Arial,\n sans-serif;\n font-size: 14px;\n line-height: 1.5;\n color: #1a1c1e;\n text-align: left;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.ssh-scope *,\n.ssh-scope *::before,\n.ssh-scope *::after {\n box-sizing: border-box;\n}\n.ssh-scope img,\n.ssh-scope svg {\n max-width: 100%;\n}\n.ssh-scope a {\n color: inherit;\n text-decoration: none;\n}\n.ssh-scope button {\n font-family: inherit;\n}\n\n/* colour + token helpers (kept literal so there is no theme dependency) */\n:root {\n --ssh-brand: #0073b1;\n --ssh-brand-strong: #007fc0;\n --ssh-brand-soft: rgba(0, 115, 177, 0.08);\n --ssh-ink: #1a1c1e;\n --ssh-muted: #5f6368;\n --ssh-line: #e0e0e0;\n --ssh-line-soft: #f1f3f4;\n --ssh-surface: #fff;\n --ssh-hover: #f8f9fa;\n --ssh-danger: #d32f2f;\n --ssh-danger-soft: rgba(211, 47, 47, 0.08);\n /* layered elevation for panels + dialogs */\n --ssh-shadow-panel: 0 2px 4px rgba(16, 24, 40, 0.04), 0 12px 32px -8px rgba(16, 24, 40, 0.16);\n --ssh-shadow-dialog: 0 4px 8px rgba(16, 24, 40, 0.06), 0 24px 56px -12px rgba(16, 24, 40, 0.28);\n --ssh-radius: 14px;\n --ssh-ease: cubic-bezier(0.16, 1, 0.3, 1);\n}\n\n/* ---- motion primitives ----------------------------------------------------- */\n@keyframes ssh-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes ssh-pop-in {\n from {\n opacity: 0;\n transform: translateY(-8px) scale(0.97);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes ssh-dialog-in {\n from {\n opacity: 0;\n transform: translateY(12px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .ssh-scope *,\n .ssh-dialog-overlay,\n .ssh-dialog,\n .ssh-dropdown {\n animation-duration: 0.001ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.001ms !important;\n }\n}\n\n/* ---- header bar ------------------------------------------------------------ */\n.ssh-header {\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n height: 64px;\n width: 100%;\n background: var(--ssh-surface);\n color: var(--ssh-ink);\n border-bottom: 1px solid var(--ssh-line);\n z-index: 1000;\n display: flex;\n align-items: center;\n}\n.ssh-header__inner {\n width: 100%;\n max-width: 100%;\n padding: 0 24px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.ssh-header__left,\n.ssh-header__center,\n.ssh-header__right {\n display: flex;\n align-items: center;\n}\n.ssh-header__left {\n gap: 8px;\n}\n.ssh-header__right {\n gap: 4px;\n margin: 10px 0;\n}\n.ssh-header__actions {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n\n/* ---- logo ------------------------------------------------------------------ */\n.ssh-logo {\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.ssh-logo--full {\n width: 200px;\n max-width: 200px;\n}\n.ssh-logo--full svg,\n.ssh-logo--small svg {\n height: 40px;\n width: auto;\n}\n.ssh-logo--small {\n display: none;\n}\n\n/* ---- primitives: buttons --------------------------------------------------- */\n.ssh-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n font-family: inherit;\n font-size: 14px;\n font-weight: 500;\n line-height: 1.2;\n padding: 10px 16px;\n border: 1px solid transparent;\n border-radius: 8px;\n background: transparent;\n color: var(--ssh-ink);\n cursor: pointer;\n text-transform: none;\n transition:\n background 0.2s ease,\n color 0.2s ease,\n border-color 0.2s ease;\n -webkit-appearance: none;\n appearance: none;\n}\n.ssh-btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n.ssh-btn--primary {\n background: var(--ssh-brand);\n color: #fff;\n border-color: var(--ssh-brand);\n}\n.ssh-btn--primary:hover:not(:disabled) {\n background: #005a8b;\n border-color: #005a8b;\n}\n.ssh-btn--outline {\n background: transparent;\n color: var(--ssh-muted);\n border-color: var(--ssh-line);\n}\n.ssh-btn--outline:hover:not(:disabled) {\n color: var(--ssh-brand);\n border-color: var(--ssh-brand);\n background: rgba(0, 115, 177, 0.04);\n}\n.ssh-btn--danger {\n background: var(--ssh-danger);\n color: #fff;\n border-color: var(--ssh-danger);\n}\n.ssh-btn--danger:hover:not(:disabled) {\n background: #b71c1c;\n border-color: #b71c1c;\n}\n.ssh-btn--ghost {\n background: transparent;\n color: var(--ssh-muted);\n}\n.ssh-btn--ghost:hover:not(:disabled) {\n background: rgba(0, 115, 177, 0.04);\n}\n.ssh-btn--block {\n width: 100%;\n}\n\n/* ---- primitives: icon trigger --------------------------------------------- */\n.ssh-icon-trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n padding: 6px;\n border: 0;\n background: transparent;\n border-radius: 8px;\n cursor: pointer;\n color: #808080;\n transition: background 0.2s ease;\n}\n.ssh-icon-trigger:hover {\n background: var(--ssh-hover);\n}\n.ssh-icon-trigger svg {\n width: 32px;\n height: 32px;\n color: currentColor;\n}\n\n/* ---- primitives: avatar ---------------------------------------------------- */\n.ssh-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n overflow: hidden;\n background: #ccc;\n color: var(--ssh-ink);\n font-weight: 600;\n font-size: 14px;\n flex-shrink: 0;\n}\n.ssh-avatar img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n\n/* ---- primitives: badge ----------------------------------------------------- */\n.ssh-badge {\n position: relative;\n display: inline-flex;\n}\n.ssh-badge__count {\n position: absolute;\n top: -4px;\n right: -6px;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: var(--ssh-danger);\n color: #fff;\n font-size: 11px;\n font-weight: 600;\n line-height: 18px;\n text-align: center;\n}\n\n/* ---- primitives: dropdown panel ------------------------------------------- */\n.ssh-dropdown {\n position: absolute;\n top: 60px;\n right: 0;\n background: var(--ssh-surface);\n border: 1px solid var(--ssh-line-soft);\n border-radius: var(--ssh-radius);\n box-shadow: var(--ssh-shadow-panel);\n z-index: 1100;\n padding: 16px;\n transform-origin: top right;\n animation: ssh-pop-in 0.22s var(--ssh-ease);\n}\n[dir="rtl"] .ssh-dropdown {\n transform-origin: top left;\n}\n.ssh-dropdown--profile {\n width: 280px;\n padding: 0;\n overflow: hidden;\n}\n[dir="rtl"] .ssh-dropdown {\n right: auto;\n left: 0;\n}\n\n/* custom scrollbar for scrollable panels */\n.ssh-scroll {\n overflow-y: auto;\n overflow-x: hidden;\n}\n.ssh-scroll::-webkit-scrollbar {\n width: 6px;\n}\n.ssh-scroll::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 10px;\n}\n.ssh-scroll::-webkit-scrollbar-thumb {\n background: #ccc;\n border-radius: 10px;\n}\n.ssh-scroll::-webkit-scrollbar-thumb:hover {\n background: #bbb;\n}\n\n/* ---- desktop nav menu ------------------------------------------------------ */\n.ssh-nav {\n display: flex;\n}\n.ssh-menu {\n display: flex;\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.ssh-menu__item {\n position: relative;\n display: flex;\n align-items: center;\n height: 100%;\n padding: 0 16px;\n}\n.ssh-menu__link {\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px 4px;\n font-size: 14px;\n font-weight: 500;\n color: #2a2a2a;\n transition: color 0.2s ease;\n}\n.ssh-menu__link:hover {\n color: var(--ssh-brand);\n}\n.ssh-menu__caret {\n width: 14px;\n height: 14px;\n transition: transform 0.2s ease;\n}\n.ssh-menu__item:hover .ssh-menu__caret {\n transform: rotate(180deg);\n}\n.ssh-submenu {\n position: absolute;\n top: 150%;\n left: 0;\n width: 220px;\n background: #fff;\n border: 1px solid #e2e8f0;\n border-top: 3px solid var(--ssh-brand);\n border-radius: 4px;\n box-shadow:\n 0 12px 48px rgba(0, 0, 0, 0.12),\n 0 4px 16px rgba(0, 0, 0, 0.08);\n list-style: none;\n margin: 0;\n padding: 8px 0;\n opacity: 0;\n visibility: hidden;\n transform: translateY(12px);\n transition:\n opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),\n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),\n visibility 0.25s;\n z-index: 1000;\n}\n.ssh-menu__item:hover .ssh-submenu {\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n}\n.ssh-submenu li {\n list-style: none;\n}\n.ssh-submenu__link {\n display: block;\n padding: 12px 28px;\n font-size: 14px;\n font-weight: 400;\n line-height: 1.4;\n color: #2a2a2a;\n white-space: normal;\n transition: all 0.2s ease;\n}\n.ssh-submenu__link:hover {\n background: #f0f7fb;\n color: var(--ssh-brand);\n padding-left: 32px;\n}\n\n/* ---- mobile nav menu ------------------------------------------------------- */\n.ssh-mobile-menu {\n position: fixed;\n left: 0;\n top: 64px;\n width: 100%;\n height: 95vh;\n background: #fff;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);\n padding: 8px 20px 12px;\n overflow-y: auto;\n}\n.ssh-mobile-menu__link {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 20px;\n margin-bottom: 4px;\n font-size: 16px;\n font-weight: 600;\n color: #1a1c1e;\n border-bottom: 1px solid var(--ssh-line-soft);\n}\n.ssh-mobile-submenu {\n list-style: none;\n margin: 0;\n padding-left: 15px;\n background: #fbfbfc;\n}\n.ssh-mobile-submenu__link {\n display: block;\n padding: 12px 32px;\n font-size: 14px;\n font-weight: 400;\n color: #4a4d50;\n}\n\n/* ---- app menu grid --------------------------------------------------------- */\n.ssh-apps {\n padding: 16px;\n background: #fff;\n max-height: 450px;\n min-width: 480px;\n}\n.ssh-apps__grid {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 10px;\n}\n.ssh-apps__item {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n gap: 10px;\n padding: 16px 10px;\n min-width: 0;\n border: 1px solid transparent;\n border-radius: 12px;\n background: transparent;\n cursor: pointer;\n text-align: center;\n transition:\n background 0.2s ease,\n border-color 0.2s ease,\n box-shadow 0.2s ease,\n transform 0.2s var(--ssh-ease);\n}\n.ssh-apps__item:hover {\n background: var(--ssh-surface);\n border-color: var(--ssh-line-soft);\n box-shadow: var(--ssh-shadow-panel);\n transform: translateY(-3px);\n}\n.ssh-apps__icon {\n width: 40px;\n height: 40px;\n object-fit: contain;\n transition: transform 0.2s var(--ssh-ease);\n}\n.ssh-apps__item:hover .ssh-apps__icon {\n transform: scale(1.08);\n}\n.ssh-apps__label {\n font-size: 13px;\n font-weight: 500;\n line-height: 1.3;\n color: var(--ssh-ink);\n /* wrap only between whole words — never split a word mid-character */\n word-break: normal;\n overflow-wrap: normal;\n hyphens: none;\n}\n\n/* ---- language dropdown ----------------------------------------------------- */\n.ssh-lang-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n padding: 4px;\n border: 0;\n background: transparent;\n color: #777;\n cursor: pointer;\n}\n.ssh-lang-trigger__flag {\n width: 40px;\n height: auto;\n aspect-ratio: 3 / 2;\n object-fit: cover;\n}\n.ssh-lang {\n max-width: 333px;\n min-width: 333px;\n padding: 8px;\n}\n.ssh-lang__list {\n list-style: none;\n margin: 0;\n padding: 0 4px 0 0;\n max-height: 320px;\n}\n.ssh-lang__item {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 10px 12px;\n border-radius: 10px;\n cursor: pointer;\n transition:\n background 0.18s ease,\n color 0.18s ease;\n}\n.ssh-lang__item:hover {\n background: var(--ssh-brand-soft);\n}\n.ssh-lang__item:hover .ssh-lang__label {\n color: var(--ssh-brand);\n}\n.ssh-lang__item--active {\n background: var(--ssh-brand-soft);\n}\n.ssh-lang__item--active .ssh-lang__label {\n color: var(--ssh-brand);\n font-weight: 600;\n}\n.ssh-lang__flag {\n width: 40px;\n height: 26px;\n aspect-ratio: 3 / 2;\n object-fit: cover;\n border-radius: 4px;\n box-shadow: 0 0 0 1px var(--ssh-line-soft);\n flex-shrink: 0;\n}\n.ssh-lang__label {\n font-size: 15px;\n font-weight: 500;\n margin: 0;\n transition: color 0.18s ease;\n}\n.ssh-lang__check {\n width: 22px;\n height: 22px;\n color: var(--ssh-brand-strong);\n margin-left: auto;\n}\n\n/* ---- notification dropdown ------------------------------------------------- */\n.ssh-notif {\n min-width: 420px;\n max-width: 460px;\n}\n.ssh-notif__tabs {\n display: flex;\n border-bottom: 1px solid var(--ssh-line);\n margin-bottom: 16px;\n}\n.ssh-notif__tab {\n padding: 8px 20px;\n border: 0;\n border-bottom: 2px solid transparent;\n background: transparent;\n font-size: 14px;\n font-weight: 400;\n color: var(--ssh-muted);\n text-transform: capitalize;\n cursor: pointer;\n white-space: nowrap;\n}\n.ssh-notif__tab:hover {\n background: rgba(0, 115, 177, 0.04);\n}\n.ssh-notif__tab--active {\n font-weight: 600;\n color: var(--ssh-brand);\n border-bottom-color: var(--ssh-brand);\n}\n.ssh-notif__title {\n font-size: 16px;\n font-weight: 500;\n color: #000;\n margin: 4px 0;\n}\n.ssh-notif__list {\n max-height: 300px;\n padding-right: 5px;\n}\n.ssh-notif__item {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 16px;\n cursor: pointer;\n}\n.ssh-notif__item:hover {\n background: var(--ssh-hover);\n}\n.ssh-notif__body {\n flex: 1;\n}\n.ssh-notif__name {\n font-size: 16px;\n font-weight: 500;\n color: #000;\n margin: 0;\n}\n.ssh-notif__meta {\n font-size: 14px;\n color: #666;\n}\n.ssh-notif__link {\n color: rgb(25, 118, 210);\n margin-left: 5px;\n cursor: pointer;\n}\n.ssh-notif__empty,\n.ssh-notif__loader {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 12px;\n color: #000;\n}\n\n/* ---- user profile menu ----------------------------------------------------- */\n.ssh-profile {\n position: relative;\n}\n.ssh-profile__trigger {\n display: flex;\n align-items: center;\n gap: 2px;\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n.ssh-profile__head {\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 20px 16px;\n background: linear-gradient(135deg, rgba(0, 115, 177, 0.1), rgba(0, 127, 192, 0.02));\n border-bottom: 1px solid var(--ssh-line-soft);\n}\n.ssh-profile__avatar {\n width: 64px;\n height: 64px;\n border: 3px solid #fff;\n box-shadow:\n 0 0 0 1px var(--ssh-line-soft),\n 0 4px 12px rgba(0, 115, 177, 0.2);\n font-size: 22px;\n}\n.ssh-profile__id {\n flex: 1;\n min-width: 0;\n}\n.ssh-profile__name {\n font-size: 15px;\n font-weight: 600;\n color: var(--ssh-ink);\n margin: 0;\n}\n.ssh-profile__email {\n font-size: 13px;\n color: var(--ssh-muted);\n margin: 2px 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.ssh-profile__role {\n font-size: 11px;\n font-weight: 700;\n color: var(--ssh-brand);\n text-transform: uppercase;\n margin-top: 2px;\n}\n.ssh-profile__menu {\n list-style: none;\n margin: 0;\n padding: 8px;\n}\n.ssh-profile__item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 11px 12px;\n border-radius: 10px;\n cursor: pointer;\n color: var(--ssh-ink);\n transition:\n background 0.18s ease,\n color 0.18s ease;\n}\n.ssh-profile__item:hover {\n background: var(--ssh-brand-soft);\n color: var(--ssh-brand);\n}\n.ssh-profile__item--danger {\n margin-top: 6px;\n position: relative;\n}\n.ssh-profile__item--danger::before {\n content: "";\n position: absolute;\n top: -3px;\n left: 12px;\n right: 12px;\n height: 1px;\n background: var(--ssh-line-soft);\n}\n.ssh-profile__item--danger:hover {\n background: var(--ssh-danger-soft);\n color: var(--ssh-danger);\n}\n.ssh-profile__item-icon {\n width: 25px;\n height: 25px;\n color: currentColor;\n flex-shrink: 0;\n}\n.ssh-profile__item-label {\n font-size: 14px;\n font-weight: 400;\n margin: 0;\n}\n\n/* ---- dialog ---------------------------------------------------------------- */\n.ssh-dialog-overlay {\n position: fixed;\n inset: 0;\n z-index: 1300;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 16px;\n background: rgba(16, 24, 40, 0.5);\n -webkit-backdrop-filter: blur(4px);\n backdrop-filter: blur(4px);\n animation: ssh-fade-in 0.2s ease;\n}\n.ssh-dialog {\n position: relative;\n width: 100%;\n max-height: calc(100vh - 64px);\n overflow-y: auto;\n background: #fff;\n border-radius: 18px;\n box-shadow: var(--ssh-shadow-dialog);\n animation: ssh-dialog-in 0.28s var(--ssh-ease);\n}\n.ssh-dialog--xs {\n max-width: 400px;\n}\n.ssh-dialog--sm {\n max-width: 600px;\n}\n.ssh-dialog--md {\n max-width: 900px;\n}\n.ssh-dialog__close-row {\n position: sticky;\n top: 0;\n display: flex;\n justify-content: flex-end;\n padding: 12px;\n z-index: 1;\n}\n.ssh-dialog__close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n border: 0;\n border-radius: 50%;\n background: #f2f4f7;\n color: var(--ssh-muted);\n cursor: pointer;\n transition:\n background 0.18s ease,\n color 0.18s ease,\n transform 0.18s ease;\n}\n.ssh-dialog__close:hover {\n background: #e4e7ec;\n color: #111;\n transform: rotate(90deg);\n}\n.ssh-dialog__close svg {\n width: 18px;\n height: 18px;\n}\n\n/* danger / confirm dialog */\n.ssh-danger {\n padding: 8px 28px 28px;\n text-align: center;\n}\n.ssh-danger__icon {\n color: var(--ssh-danger);\n width: 40px;\n height: 40px;\n padding: 14px;\n border-radius: 50%;\n background: var(--ssh-danger-soft);\n box-sizing: content-box;\n}\n.ssh-danger__title {\n font-size: 20px;\n font-weight: 600;\n color: var(--ssh-ink);\n margin: 16px 0 0;\n}\n.ssh-danger__desc {\n font-size: 15px;\n font-weight: 400;\n color: var(--ssh-muted);\n margin: 8px 0 0;\n}\n.ssh-danger__actions {\n display: flex;\n align-items: center;\n gap: 16px;\n margin-top: 24px;\n}\n\n/* ---- form field ------------------------------------------------------------ */\n.ssh-field {\n display: block;\n}\n.ssh-field__label {\n display: block;\n padding: 13px 0 4px 1px;\n font-size: 14px;\n font-weight: 500;\n color: #333;\n line-height: normal;\n}\n.ssh-field__req {\n color: var(--ssh-danger);\n margin-left: 2px;\n}\n.ssh-input-wrap {\n position: relative;\n display: flex;\n align-items: center;\n}\n.ssh-input {\n width: 100%;\n height: 40px;\n padding: 0 14px;\n font-family: inherit;\n font-size: 14px;\n color: var(--ssh-ink);\n background: #fff;\n border: 1px solid var(--ssh-line);\n border-radius: 20px;\n outline: none;\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n}\n.ssh-input::placeholder {\n color: #9aa0a6;\n}\n.ssh-input:focus {\n border-color: var(--ssh-brand);\n box-shadow: 0 0 0 3px rgba(0, 115, 177, 0.12);\n}\n.ssh-input:disabled {\n background: #e9e6e6;\n}\n.ssh-input--has-toggle {\n padding-right: 42px;\n}\n.ssh-input__toggle {\n position: absolute;\n right: 12px;\n display: inline-flex;\n align-items: center;\n border: 0;\n background: transparent;\n cursor: pointer;\n color: gray;\n}\n.ssh-input__toggle svg {\n width: 18px;\n height: 18px;\n}\n\n/* ---- view profile dialog --------------------------------------------------- */\n.ssh-vp {\n padding: 0 24px 40px;\n}\n.ssh-vp__grid {\n display: grid;\n grid-template-columns: 5fr 7fr;\n gap: 48px;\n margin-top: 12px;\n}\n.ssh-vp__avatar {\n width: 150px;\n height: 150px;\n border: 4px solid var(--ssh-brand);\n box-shadow: 0 8px 24px rgba(0, 115, 177, 0.15);\n margin-bottom: 32px;\n font-size: 44px;\n}\n.ssh-vp__side {\n display: flex;\n flex-direction: column;\n gap: 20px;\n margin-left: 16px;\n}\n.ssh-vp__section-label {\n font-size: 14px;\n font-weight: 700;\n color: var(--ssh-ink);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin: 0 0 12px;\n}\n.ssh-vp__row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ssh-vp__value {\n font-size: 15px;\n color: var(--ssh-muted);\n}\n.ssh-vp__chips {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.ssh-chip {\n display: inline-flex;\n align-items: center;\n height: 30px;\n padding: 0 12px;\n border: 1px solid var(--ssh-line);\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n color: var(--ssh-ink);\n}\n.ssh-vp__name {\n font-size: 28px;\n font-weight: 700;\n color: var(--ssh-ink);\n margin: 0;\n}\n.ssh-vp__title {\n font-size: 16px;\n color: var(--ssh-brand);\n font-weight: 600;\n margin: 4px 0 16px;\n}\n.ssh-vp__bio {\n font-size: 15px;\n line-height: 1.7;\n color: var(--ssh-muted);\n}\n.ssh-vp__divider {\n height: 1px;\n background: var(--ssh-line-soft);\n border: 0;\n margin: 20px 0;\n}\n.ssh-vp__link {\n color: var(--ssh-brand);\n font-weight: 500;\n cursor: pointer;\n}\n.ssh-vp__socials {\n display: flex;\n gap: 12px;\n margin-top: 4px;\n}\n.ssh-vp__social {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 42px;\n height: 42px;\n border-radius: 10px;\n background: var(--ssh-brand);\n color: #fff;\n transition:\n background 0.2s ease,\n transform 0.2s ease;\n}\n.ssh-vp__social:hover {\n background: #005a8b;\n transform: translateY(-2px);\n}\n.ssh-vp__social svg {\n width: 18px;\n height: 18px;\n}\n.ssh-vp__facts {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 20px;\n background: #f9fafb;\n border: 1px solid var(--ssh-line-soft);\n border-radius: 12px;\n margin: 24px 0;\n}\n.ssh-vp__fact {\n display: flex;\n gap: 12px;\n}\n.ssh-vp__fact-label {\n font-weight: 600;\n color: var(--ssh-ink);\n min-width: 80px;\n font-size: 15px;\n}\n.ssh-vp__section {\n margin-bottom: 20px;\n}\n\n/* ---- change password (dialog body) ---------------------------------------- */\n.ssh-cp {\n padding: 0 24px 32px;\n}\n.ssh-cp__title {\n font-size: 22px;\n font-weight: 700;\n color: var(--ssh-ink);\n margin: 0 0 20px;\n}\n.ssh-cp__card {\n padding: 24px;\n background: #fff;\n border: 1px solid var(--ssh-line-soft);\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n/* ---- previous-login banner ------------------------------------------------- */\n.ssh-banner {\n width: 100%;\n padding: 6px 12px;\n margin-top: 64px;\n background: var(--ssh-brand-strong);\n color: #fff;\n text-align: center;\n font-size: 14px;\n text-transform: capitalize;\n}\n.ssh-banner__link {\n cursor: pointer;\n text-decoration: underline;\n font-weight: 600;\n}\n\n/* ---- misc elements --------------------------------------------------------- */\n.ssh-warning {\n display: flex;\n gap: 8px;\n margin-top: 16px;\n}\n.ssh-warning__text {\n font-size: 14px;\n color: var(--ssh-muted);\n}\n.ssh-error-msg {\n display: block;\n color: var(--ssh-danger);\n font-size: 13px;\n font-weight: 600;\n margin-top: 4px;\n}\n.ssh-back {\n display: inline-flex;\n align-items: center;\n justify-content: flex-start;\n margin-right: 8px;\n cursor: pointer;\n}\n.ssh-spin {\n animation: ssh-spin 0.8s linear infinite;\n}\n@keyframes ssh-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n/* ---- responsive ------------------------------------------------------------ */\n@media (max-width: 1324px) {\n .ssh-nav--desktop {\n display: none;\n }\n}\n@media (min-width: 1325px) {\n .ssh-hamburger {\n display: none;\n }\n}\n@media (max-width: 600px) {\n .ssh-header__inner {\n padding: 0 12px;\n }\n .ssh-logo--full {\n display: none;\n }\n .ssh-logo--small {\n display: flex;\n }\n .ssh-notif,\n .ssh-lang {\n min-width: 280px;\n max-width: 90vw;\n }\n .ssh-apps {\n min-width: 300px;\n max-width: 92vw;\n }\n .ssh-dropdown--profile {\n width: 280px;\n }\n .ssh-vp__grid {\n grid-template-columns: 1fr;\n gap: 24px;\n }\n .ssh-icon-trigger svg {\n width: 26px;\n height: 26px;\n }\n}'));
|
|
1474
1475
|
document.head.appendChild(elementStyle);
|
|
1475
1476
|
}
|
|
1476
1477
|
} catch (e) {
|