@steedos/webapp 3.0.14-beta.2 → 3.0.14-beta.3
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./index-
|
|
1
|
+
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from "./index-CIm_G2BR.js";
|
|
2
2
|
function _mergeNamespaces(n, m) {
|
|
3
3
|
for (var i = 0; i < m.length; i++) {
|
|
4
4
|
const e = m[i];
|
|
@@ -40473,9 +40473,10 @@ class Card extends reactExports.Component {
|
|
|
40473
40473
|
}
|
|
40474
40474
|
render() {
|
|
40475
40475
|
const { platform: platform2 = {} } = this.props.settings;
|
|
40476
|
+
const isOem = platform2.is_oem === true || platform2.is_oem === "true";
|
|
40476
40477
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex sm:items-center justify-center mx-auto overflow-auto md:p-10 h-full", children: [
|
|
40477
40478
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative rounded p-10 sm:shadow-md bg-white w-screen max-w-md steedos-auth-card", children: this.props.children }),
|
|
40478
|
-
|
|
40479
|
+
!isOem && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "absolute bottom-0 left-0 right-0 text-center pb-6 text-gray-400 text-xs tracking-wide", children: [
|
|
40479
40480
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
40480
40481
|
FormattedMessage,
|
|
40481
40482
|
{
|
|
@@ -40488,6 +40489,7 @@ class Card extends reactExports.Component {
|
|
|
40488
40489
|
"a",
|
|
40489
40490
|
{
|
|
40490
40491
|
className: "text-xs text-gray-400 hover:text-gray-600 hover:underline transition-colors duration-200",
|
|
40492
|
+
title: "privacy",
|
|
40491
40493
|
href: "javascript:void(0)",
|
|
40492
40494
|
onClick: this.openPrivacyPage,
|
|
40493
40495
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -40514,16 +40516,22 @@ function mapStateToProps$d(state) {
|
|
|
40514
40516
|
};
|
|
40515
40517
|
}
|
|
40516
40518
|
const Card$1 = connect(mapStateToProps$d)(Card);
|
|
40517
|
-
const Logo = ({ tenant,
|
|
40519
|
+
const Logo = ({ tenant, settings: settings2 }) => {
|
|
40520
|
+
const platform2 = settings2?.platform || {};
|
|
40521
|
+
const isOem = platform2?.is_oem === true || platform2?.is_oem === "true";
|
|
40522
|
+
const tenantConfig = settings2?.tenant || {};
|
|
40518
40523
|
let logoUrl = `${localizeMessage("accounts.logoURL")}`;
|
|
40519
|
-
if (tenant
|
|
40524
|
+
if (isOem && (tenant?.logo_url || tenantConfig?.logo_url)) {
|
|
40525
|
+
logoUrl = tenant?.logo_url || tenantConfig?.logo_url;
|
|
40526
|
+
} else if (tenant?.logo_url) {
|
|
40520
40527
|
logoUrl = tenant.logo_url;
|
|
40521
40528
|
}
|
|
40522
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logoUrl, className: "h-10" }) });
|
|
40529
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: logoUrl, className: "h-10", alt: "logo" }) });
|
|
40523
40530
|
};
|
|
40524
40531
|
function mapStateToProps$c(state) {
|
|
40525
40532
|
return {
|
|
40526
|
-
tenant: getTenant(state)
|
|
40533
|
+
tenant: getTenant(state),
|
|
40534
|
+
settings: getSettings(state)
|
|
40527
40535
|
};
|
|
40528
40536
|
}
|
|
40529
40537
|
const Logo$1 = connect(mapStateToProps$c)(Logo);
|
|
@@ -49831,6 +49839,23 @@ class Login extends React$1.Component {
|
|
|
49831
49839
|
};
|
|
49832
49840
|
componentDidMount() {
|
|
49833
49841
|
this.initGeetest();
|
|
49842
|
+
const platform2 = this.props.settings?.platform || {};
|
|
49843
|
+
const tenant = this.props.tenant || {};
|
|
49844
|
+
const isOem = platform2.is_oem === true || platform2.is_oem === "true";
|
|
49845
|
+
const faviconUrl = tenant.favicon_url || this.props.settings?.tenant?.favicon_url;
|
|
49846
|
+
if (isOem && faviconUrl) {
|
|
49847
|
+
const faviconLink = document.querySelector('link[rel*="icon"], link[rel*="shortcut"]');
|
|
49848
|
+
if (faviconLink) {
|
|
49849
|
+
if (faviconLink.href !== faviconUrl) {
|
|
49850
|
+
faviconLink.href = faviconUrl;
|
|
49851
|
+
}
|
|
49852
|
+
} else {
|
|
49853
|
+
const newFaviconLink = document.createElement("link");
|
|
49854
|
+
newFaviconLink.rel = "icon";
|
|
49855
|
+
newFaviconLink.href = faviconUrl;
|
|
49856
|
+
document.head.appendChild(newFaviconLink);
|
|
49857
|
+
}
|
|
49858
|
+
}
|
|
49834
49859
|
}
|
|
49835
49860
|
render() {
|
|
49836
49861
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
@@ -54622,6 +54647,23 @@ const AppView = () => {
|
|
|
54622
54647
|
}, [appId, navigate]);
|
|
54623
54648
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {});
|
|
54624
54649
|
};
|
|
54650
|
+
const isTrueValue = (value2) => value2 === true || value2 === "true";
|
|
54651
|
+
const setBrowserFavicon = (faviconUrl) => {
|
|
54652
|
+
if (!faviconUrl) {
|
|
54653
|
+
return;
|
|
54654
|
+
}
|
|
54655
|
+
const faviconLink = document.querySelector('link[rel*="icon"], link[rel*="shortcut"]');
|
|
54656
|
+
if (faviconLink) {
|
|
54657
|
+
if (faviconLink.href !== faviconUrl) {
|
|
54658
|
+
faviconLink.href = faviconUrl;
|
|
54659
|
+
}
|
|
54660
|
+
return;
|
|
54661
|
+
}
|
|
54662
|
+
const newFaviconLink = document.createElement("link");
|
|
54663
|
+
newFaviconLink.rel = "icon";
|
|
54664
|
+
newFaviconLink.href = faviconUrl;
|
|
54665
|
+
document.head.appendChild(newFaviconLink);
|
|
54666
|
+
};
|
|
54625
54667
|
const getHeaderSchema = (props) => {
|
|
54626
54668
|
const { logoSrc, customButtons, className } = props;
|
|
54627
54669
|
const isMobile = window.innerWidth <= 768;
|
|
@@ -54787,9 +54829,24 @@ const AppHeader = () => {
|
|
|
54787
54829
|
const location2 = useLocation();
|
|
54788
54830
|
const searchParams = new URLSearchParams(location2.search);
|
|
54789
54831
|
const params = useParams();
|
|
54790
|
-
let { appId = null
|
|
54832
|
+
let { appId = null } = params;
|
|
54791
54833
|
const isMobile = window.innerWidth < 1024;
|
|
54792
54834
|
let [app, setApp] = reactExports.useState(null);
|
|
54835
|
+
const isOem = isTrueValue(Builder$1.settings?.platform?.is_oem);
|
|
54836
|
+
const oemSpaceAvatar = Builder$1.settings?.context?.user?.space?.avatar;
|
|
54837
|
+
const oemSpaceFavicon = Builder$1.settings?.context?.user?.space?.favicon;
|
|
54838
|
+
reactExports.useEffect(() => {
|
|
54839
|
+
if (isOem) {
|
|
54840
|
+
document.body.classList.add("is-oem");
|
|
54841
|
+
} else {
|
|
54842
|
+
document.body.classList.remove("is-oem");
|
|
54843
|
+
}
|
|
54844
|
+
}, [isOem]);
|
|
54845
|
+
reactExports.useEffect(() => {
|
|
54846
|
+
if (isOem && oemSpaceFavicon) {
|
|
54847
|
+
setBrowserFavicon(`/api/v6/files/cfs.avatars.filerecord/${oemSpaceFavicon}`);
|
|
54848
|
+
}
|
|
54849
|
+
}, [isOem, oemSpaceFavicon]);
|
|
54793
54850
|
reactExports.useEffect(() => {
|
|
54794
54851
|
const fetchApp = async () => {
|
|
54795
54852
|
if (appId === "-" || appId == null) {
|
|
@@ -54862,21 +54919,8 @@ const AppHeader = () => {
|
|
|
54862
54919
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
|
|
54863
54920
|
}
|
|
54864
54921
|
let logoSrc = "/images/logo.svg";
|
|
54865
|
-
if (
|
|
54866
|
-
logoSrc = "/api/v6/files/cfs.avatars.filerecord/" +
|
|
54867
|
-
}
|
|
54868
|
-
const faviconLink = document.querySelector('link[rel*="icon"], link[rel*="shortcut"]');
|
|
54869
|
-
let favicon = "/images/logo.svg";
|
|
54870
|
-
if (Builder$1.settings?.platform?.is_oem && Builder$1.settings?.context?.user?.space?.favicon) {
|
|
54871
|
-
favicon = "/api/v6/files/cfs.avatars.filerecord/" + Builder$1.settings.context.user.space.favicon;
|
|
54872
|
-
}
|
|
54873
|
-
if (faviconLink) {
|
|
54874
|
-
faviconLink.href = favicon;
|
|
54875
|
-
} else {
|
|
54876
|
-
const newFaviconLink = document.createElement("link");
|
|
54877
|
-
newFaviconLink.rel = "icon";
|
|
54878
|
-
newFaviconLink.href = favicon;
|
|
54879
|
-
document.head.appendChild(newFaviconLink);
|
|
54922
|
+
if (isOem && oemSpaceAvatar) {
|
|
54923
|
+
logoSrc = "/api/v6/files/cfs.avatars.filerecord/" + oemSpaceAvatar;
|
|
54880
54924
|
}
|
|
54881
54925
|
const headerSchema = getHeaderSchema({ logoSrc });
|
|
54882
54926
|
const schema = {
|
|
@@ -80670,6 +80714,22 @@ if (_window["Steedos"]) {
|
|
|
80670
80714
|
}
|
|
80671
80715
|
const Root = (props) => {
|
|
80672
80716
|
const [configLoaded, setConfigLoaded] = reactExports.useState(false);
|
|
80717
|
+
const setBrowserFavicon2 = (faviconUrl) => {
|
|
80718
|
+
if (!faviconUrl) {
|
|
80719
|
+
return;
|
|
80720
|
+
}
|
|
80721
|
+
const faviconLink = document.querySelector('link[rel*="icon"], link[rel*="shortcut"]');
|
|
80722
|
+
if (faviconLink) {
|
|
80723
|
+
if (faviconLink.href !== faviconUrl) {
|
|
80724
|
+
faviconLink.href = faviconUrl;
|
|
80725
|
+
}
|
|
80726
|
+
return;
|
|
80727
|
+
}
|
|
80728
|
+
const newFaviconLink = document.createElement("link");
|
|
80729
|
+
newFaviconLink.rel = "icon";
|
|
80730
|
+
newFaviconLink.href = faviconUrl;
|
|
80731
|
+
document.head.appendChild(newFaviconLink);
|
|
80732
|
+
};
|
|
80673
80733
|
reactExports.useEffect(() => {
|
|
80674
80734
|
const uid2 = new URLSearchParams(window.location.search).get("uid");
|
|
80675
80735
|
if (uid2) {
|
|
@@ -80688,12 +80748,19 @@ const Root = (props) => {
|
|
|
80688
80748
|
}, []);
|
|
80689
80749
|
reactExports.useEffect(() => {
|
|
80690
80750
|
if (props.tenant && props.tenant.favicon_url) {
|
|
80691
|
-
|
|
80692
|
-
|
|
80693
|
-
|
|
80751
|
+
setBrowserFavicon2(props.tenant.favicon_url);
|
|
80752
|
+
try {
|
|
80753
|
+
localStorage.setItem("steedos_favicon_url", props.tenant.favicon_url);
|
|
80754
|
+
} catch (e) {
|
|
80694
80755
|
}
|
|
80695
80756
|
}
|
|
80696
|
-
|
|
80757
|
+
const isOem = props.settings?.platform?.is_oem === true || props.settings?.platform?.is_oem === "true";
|
|
80758
|
+
if (isOem) {
|
|
80759
|
+
document.body.classList.add("is-oem");
|
|
80760
|
+
} else {
|
|
80761
|
+
document.body.classList.remove("is-oem");
|
|
80762
|
+
}
|
|
80763
|
+
}, [props.tenant, props.settings]);
|
|
80697
80764
|
if (!configLoaded) {
|
|
80698
80765
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {});
|
|
80699
80766
|
}
|
|
@@ -81383,7 +81450,7 @@ if (typeof ActiveXObject === "function") {
|
|
|
81383
81450
|
if (typeof fetchApi !== "function") fetchApi = void 0;
|
|
81384
81451
|
if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
|
|
81385
81452
|
try {
|
|
81386
|
-
__vitePreload(() => import("./browser-ponyfill-
|
|
81453
|
+
__vitePreload(() => import("./browser-ponyfill-D1ntEuu8.js").then((n) => n.b), true ? [] : void 0).then(function(mod) {
|
|
81387
81454
|
fetchApi = mod.default;
|
|
81388
81455
|
}).catch(function() {
|
|
81389
81456
|
});
|
package/dist/customize.css
CHANGED
|
@@ -29,6 +29,18 @@ html {
|
|
|
29
29
|
display: none;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/* OEM 模式下隐藏右上角“关于/帮助”入口 */
|
|
33
|
+
body.is-oem [data-item-id="about"],
|
|
34
|
+
body.is-oem [data-item-id="help"],
|
|
35
|
+
body.is-oem [data-key="about"],
|
|
36
|
+
body.is-oem [data-key="help"],
|
|
37
|
+
body.is-oem [title="关于"],
|
|
38
|
+
body.is-oem [title="帮助"],
|
|
39
|
+
body.is-oem [title="About"],
|
|
40
|
+
body.is-oem [title="Help"] {
|
|
41
|
+
display: none !important;
|
|
42
|
+
}
|
|
43
|
+
|
|
32
44
|
/* :root {
|
|
33
45
|
--body-bg: rgb(225, 239, 254);
|
|
34
46
|
} */
|
package/dist/index.html
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<link rel="shortcut icon" href="/images/logo.svg" />
|
|
6
|
+
<script>try{var f=localStorage.getItem('steedos_favicon_url');if(f){document.querySelector('link[rel*="icon"]').href=f;}}catch(e){}</script>
|
|
6
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
8
|
<title>Steedos</title>
|
|
8
9
|
|
|
@@ -65,7 +66,7 @@
|
|
|
65
66
|
<link rel="stylesheet" href="https://unpkg.com/@steedos-widgets/amis@6.3.0-patch.8/lib/themes/antd.css">
|
|
66
67
|
<link rel="stylesheet" href="https://unpkg.com/@steedos-widgets/amis@6.3.0-patch.8/lib/helper.css">
|
|
67
68
|
<link rel="stylesheet" href="https://unpkg.com/@steedos-widgets/amis@6.3.0-patch.8/sdk/iconfont.css">
|
|
68
|
-
<script type="module" crossorigin src="/assets/index-
|
|
69
|
+
<script type="module" crossorigin src="/assets/index-CIm_G2BR.js"></script>
|
|
69
70
|
<link rel="stylesheet" crossorigin href="/assets/index-Np5NzHbA.css">
|
|
70
71
|
</head>
|
|
71
72
|
<body class="skin-blue-light fixed steedos sidebar-mini three-columns" >
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/webapp",
|
|
3
|
-
"version": "3.0.14-beta.
|
|
3
|
+
"version": "3.0.14-beta.3",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
77
|
"repository": "https://github.com/steedos/app-builder/tree/master/apps/accounts",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "67cf8eaa2ab8b8ea7a4cbc360b4c5a3f009274d3",
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@steedos-widgets/amis-object": "^6.10.53-beta.
|
|
80
|
+
"@steedos-widgets/amis-object": "^6.10.53-beta.3",
|
|
81
81
|
"autoprefixer": "^10.4.23"
|
|
82
82
|
}
|
|
83
83
|
}
|