Skip to content

Commit 0ed9e29

Browse files
author
FalkWolsky
committed
Introducing Mobile Publishing Service
1 parent edea409 commit 0ed9e29

File tree

8 files changed

+139
-6
lines changed

8 files changed

+139
-6
lines changed

client/packages/lowcoder-design/src/icons/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export { ReactComponent as HomeCardIcon } from "./v1/icon-application-card.svg";
129129
export { ReactComponent as APIDocsIcon } from "./remix/instance-line.svg";
130130
export { ReactComponent as SubscriptionIcon } from "./remix/award-fill.svg";
131131
export { ReactComponent as SupportIcon } from "./remix/user-heart-line.svg";
132+
export { ReactComponent as MobileAppPublishingIcon } from "./remix/smartphone-line.svg";
132133
// export { ReactComponent as AllAppIcon } from "./v1/icon-all-app.svg";
133134

134135

client/packages/lowcoder/src/app.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
ORG_AUTH_FORGOT_PASSWORD_URL,
3030
ORG_AUTH_RESET_PASSWORD_URL,
3131
ADMIN_AUTH_URL,
32+
PUBLISHMOBILE_URL,
3233
} from "constants/routesURL";
3334
import React from "react";
3435
import { createRoot } from "react-dom/client";
@@ -328,7 +329,8 @@ class AppIndex extends React.Component<AppIndexProps, any> {
328329
TRASH_URL,
329330
SETTING_URL,
330331
MARKETPLACE_URL,
331-
ADMIN_APP_URL
332+
ADMIN_APP_URL,
333+
PUBLISHMOBILE_URL,
332334
]}
333335
// component={ApplicationListPage}
334336
component={LazyApplicationHome}

client/packages/lowcoder/src/constants/routesURL.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const FOLDER_URL_PREFIX = `/folder`;
4747
export const FOLDER_URL = `${FOLDER_URL_PREFIX}/:folderId`;
4848
export const FOLDERS_URL = `/folders`;
4949
export const TRASH_URL = `/trash`;
50+
export const PUBLISHMOBILE_URL = `/publish-your-mobile-app`;
5051
export const IMPORT_APP_FROM_TEMPLATE_URL = `${ALL_APPLICATIONS_URL}/template-import/:templateId`;
5152
export const APP_EDITOR_URL = `${ALL_APPLICATIONS_URL}/:applicationId/:viewMode/:appPageId?`;
5253

client/packages/lowcoder/src/i18n/locales/de.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,6 +3232,9 @@ export const de = {
32323232
"createNavigation": "Navigation erstellen",
32333233
"howToUseAPI": "Verwendung der Open Rest API",
32343234
"support": "Unterstützung",
3235+
"mobileVersion" : "Mobile App erstellen",
3236+
"PublishMobile" : "Publish your App as native Mobile App",
3237+
"PublishMobileLoading" : "Loading from Service Vendor..."
32353238
},
32363239
"support": {
32373240
...en.support,

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3266,6 +3266,7 @@ export const en = {
32663266
"createNavigation": "Create Navigation",
32673267
"howToUseAPI": "How to use the Open Rest API",
32683268
"support": "Support",
3269+
"mobileVersion" : "Publish Mobile App"
32693270
},
32703271

32713272
"support" : {
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import styled from "styled-components";
2+
import { trans } from "../../i18n";
3+
import { default as Divider } from "antd/es/divider";
4+
5+
import { Card } from "antd";
6+
7+
const Wrapper = styled.div`
8+
display: flex;
9+
flex-direction: column;
10+
width: 100%;
11+
height: 100%;
12+
`;
13+
14+
const HeaderWrapper = styled.div`
15+
height: 84px;
16+
width: 100%;
17+
display: flex;
18+
padding: 0 36px;
19+
align-items: center;
20+
flex-shrink: 0;
21+
@media screen and (max-width: 500px) {
22+
padding: 0 24px;
23+
}
24+
`;
25+
26+
const ContentWrapper = styled.div`
27+
position: relative;
28+
`;
29+
30+
31+
const PublishMobileView = styled.div`
32+
font-size: 14px;
33+
color: #8b8fa3;
34+
flex-grow: 1;
35+
padding-top: 0px;
36+
padding-left: 40px;
37+
max-width: 95%;
38+
`;
39+
40+
const StylePublishMobileCover = styled.div`
41+
background: rgb(2,0,36);
42+
background: -moz-linear-gradient(39deg, rgba(2,0,36,1) 0%, rgba(104,9,121,1) 35%, rgba(255,83,0,1) 100%);
43+
background: -webkit-linear-gradient(39deg, rgba(2,0,36,1) 0%, rgba(104,9,121,1) 35%, rgba(255,83,0,1) 100%);
44+
background: linear-gradient(39deg, rgba(2,0,36,1) 0%, rgba(104,9,121,1) 35%, rgba(255,83,0,1) 100%);
45+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#020024",endColorstr="#ff5300",GradientType=1);
46+
padding: 25px;
47+
height: 120px;
48+
border-radius:10px 10px 0 0;
49+
`;
50+
51+
const StylePublishMobileContent = styled.div`
52+
position: relative;
53+
margin-top:-50px;
54+
display: flex;
55+
align-items: end;
56+
gap: 20px;
57+
58+
.subtitle {
59+
color: #8b8fa3;
60+
}
61+
62+
.button-end {
63+
margin-left: auto;
64+
}
65+
66+
svg {
67+
margin-right: 5px;
68+
vertical-align: middle;
69+
}
70+
`;
71+
72+
var PublishMobileLink = "https://www.wesetupyourwebviewapp.com/order-form-lowcoder.php";
73+
74+
export function PublishMobileLayout() {
75+
76+
return (
77+
<Wrapper>
78+
<HeaderWrapper></HeaderWrapper>
79+
80+
<ContentWrapper>
81+
<PublishMobileView>
82+
<StylePublishMobileCover>
83+
<h1 style={{color: "#ffffff", marginTop : "12px"}}>Lowcoder {trans("home.PublishMobile")}</h1>
84+
</StylePublishMobileCover>
85+
<Card style={{ marginBottom: "20px", minHeight : "800px" }}>
86+
<h4>{trans("home.PublishMobileLoading")}</h4>
87+
<iframe
88+
style={{ border: "none" }}
89+
title="Lowcoder PublishMobile"
90+
width="100%"
91+
height="800px"
92+
src={PublishMobileLink}
93+
/>
94+
<Divider />
95+
96+
</Card>
97+
98+
</PublishMobileView>
99+
</ContentWrapper>
100+
</Wrapper>
101+
);
102+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Helmet } from "react-helmet";
2+
import { PublishMobileLayout } from "./PublishMobileAppLayout";
3+
import { trans } from "i18n";
4+
5+
export function PublishMobileAppView() {
6+
7+
return (
8+
<><Helmet>
9+
{<title>{trans("home.PublishMobile")}</title>}
10+
</Helmet>
11+
<PublishMobileLayout />
12+
</>
13+
);
14+
15+
};

client/packages/lowcoder/src/pages/ApplicationV2/index.tsx

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
ALL_APPLICATIONS_URL,
44
DATASOURCE_URL,
55
FOLDER_URL,
6-
FOLDER_URL_PREFIX,
76
FOLDERS_URL,
87
MARKETPLACE_URL,
98
QUERY_LIBRARY_URL,
@@ -12,6 +11,7 @@ import {
1211
TRASH_URL,
1312
NEWS_URL,
1413
ORG_HOME_URL,
14+
PUBLISHMOBILE_URL,
1515
} from "constants/routesURL";
1616
import { getUser, isFetchingUser } from "redux/selectors/usersSelectors";
1717
import { useDispatch, useSelector } from "react-redux";
@@ -33,6 +33,7 @@ import {
3333
AppsIcon,
3434
EnterpriseIcon,
3535
UserIcon,
36+
MobileAppPublishingIcon,
3637
} from "lowcoder-design";
3738
import React, { useCallback, useEffect, useState, useMemo } from "react";
3839
import { fetchAllApplications, fetchHomeData } from "redux/reduxActions/applicationActions";
@@ -52,6 +53,7 @@ import styled, { css } from "styled-components";
5253
import { FolderView } from "./FolderView";
5354
import { TrashView } from "./TrashView";
5455
import { MarketplaceView } from "./MarketplaceView";
56+
import { PublishMobileAppView } from "./PublishMobileAppView";
5557
// import { SideBarItemType } from "../../components/layout/SideBarSection";
5658
import { RootFolderListView } from "./RootFolderListView";
5759
// import InviteDialog from "../common/inviteDialog";
@@ -73,7 +75,7 @@ import AppEditor from "../editor/AppEditor";
7375
import { fetchDeploymentIdAction } from "@lowcoder-ee/redux/reduxActions/configActions";
7476
import { getDeploymentId } from "@lowcoder-ee/redux/selectors/configSelectors";
7577
import { SimpleSubscriptionContextProvider } from '@lowcoder-ee/util/context/SimpleSubscriptionContext';
76-
import {LoadingBarHideTrigger} from "@lowcoder-ee/util/hideLoading";
78+
7779
const TabLabel = styled.div`
7880
font-weight: 500;
7981
`;
@@ -222,7 +224,6 @@ export default function ApplicationHome() {
222224

223225
return (
224226
<DivStyled>
225-
<LoadingBarHideTrigger />
226227
<SimpleSubscriptionContextProvider>
227228
<Layout
228229
sections={[
@@ -262,18 +263,25 @@ export default function ApplicationHome() {
262263

263264
{
264265
items: [
265-
{
266+
/* {
266267
text: <MoreFoldersWrapper>{trans("home.allFolders")}</MoreFoldersWrapper>,
267268
routePath: FOLDERS_URL,
268269
routeComp: RootFolderListView,
269270
icon: ({ selected, ...otherProps }) => selected ? <FolderIcon {...otherProps} width={"24px"}/> : <FolderIcon {...otherProps} width={"24px"}/>,
270-
},
271+
}, */
271272
{
272273
text: <TabLabel>{trans("home.allApplications")}</TabLabel>,
273274
routePath: ALL_APPLICATIONS_URL,
274275
routeComp: HomeView,
275276
icon: ({ selected, ...otherProps }) => selected ? <AppsIcon {...otherProps} width={"24px"}/> : <AppsIcon {...otherProps} width={"24px"}/>,
276277
},
278+
{
279+
text: <TabLabel>{trans("home.mobileVersion")}</TabLabel>,
280+
routePath: PUBLISHMOBILE_URL,
281+
routeComp: PublishMobileAppView,
282+
icon: ({ selected, ...otherProps }) => selected ? <MobileAppPublishingIcon {...otherProps} width={"24px"}/> : <MobileAppPublishingIcon {...otherProps} width={"24px"}/>,
283+
visible: ({ user }) => user.orgDev,
284+
},
277285
],
278286
},
279287

0 commit comments

Comments
 (0)