Skip to content

Commit 2950fca

Browse files
author
FalkWolsky
committed
New Icons & Better Org & Home Page Display - small fixes and translation
1 parent 4a78975 commit 2950fca

File tree

7 files changed

+56
-11
lines changed

7 files changed

+56
-11
lines changed

client/packages/lowcoder/src/api/userApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class UserApi extends Api {
151151
}
152152

153153
static resetLostPassword(request: ResetLostPasswordPayload): AxiosPromise<ApiResponse> {
154-
console.log(request);
154+
// console.log(request);
155155
return Api.post(UserApi.resetLostPasswordURL, request);
156156
}
157157

client/packages/lowcoder/src/comps/comps/tourComp/tourComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let TourBasicComp = (function() {
3939
let target = undefined;
4040
const compListItem = compMap.find((compItem) => compItem.children.name.getView() === targetName);
4141
if (compListItem) {
42-
console.log(`setting selected comp to ${compListItem}`);
42+
// console.log(`setting selected comp to ${compListItem}`);
4343
try {
4444
target = ((compListItem as MultiBaseComp).children.comp as GridItemComp).getRef?.();
4545
} catch (e) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2937,6 +2937,7 @@ export const en = {
29372937
"rootFolder": "Root",
29382938
"import": "Import",
29392939
"export": "Export to JSON",
2940+
"show": "Show",
29402941
"inviteUser": "Invite members",
29412942
"createFolder": "Create Folder",
29422943
"createFolderSubTitle": "Folder name:",

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

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,27 @@ import { default as Divider } from "antd/es/divider";
44
import { useLocation } from "react-router-dom";
55
import { useSelector } from "react-redux";
66
import { getHomeOrg } from "redux/selectors/applicationSelector";
7+
import { getUser } from "redux/selectors/usersSelectors";
8+
import { normalAppListSelector } from "../../redux/selectors/applicationSelector";
79
import history from "util/history";
810
import { ALL_APPLICATIONS_URL, ORG_HOME_URL } from "constants/routesURL";
911
import { default as AntdBreadcrumb } from "antd/es/breadcrumb";
1012
import { ArrowIcon } from "lowcoder-design";
11-
import { Card } from "antd";
13+
import { Avatar, Button, Card, Col, Row, Space, Typography, Select, Tooltip } from "antd";
1214
import { useRef } from "react";
1315
import { LowcoderAppView } from "appView/LowcoderAppView";
16+
import CountUp from 'react-countup';
17+
import {
18+
ApplicationDocIcon,
19+
ModuleDocIcon,
20+
AvatarGroupCompIcon,
21+
} from "lowcoder-design";
1422

1523
import { SERVER_HOST } from "constants/apiConstants";
1624
import { sdkConfig } from "constants/sdkConfig";
1725

26+
const { Text, Title, Link } = Typography;
27+
1828
const Wrapper = styled.div`
1929
display: flex;
2030
flex-direction: column;
@@ -103,6 +113,10 @@ const BreadcrumbItem = styled.div`
103113
cursor: pointer;
104114
`;
105115

116+
const BgSuccess = styled.div`
117+
background-color: #f0f2f5;
118+
`;
119+
106120
const isSelfHost = window.location.host !== 'app.lowcoder.cloud';
107121

108122
export type OrgLayoutBreadcrumbType = { text: string; path: string };
@@ -137,6 +151,8 @@ export function OrgLayout(props: OrgLayoutLayoutProps) {
137151
}))
138152
];
139153

154+
const user = useSelector(getUser);
155+
const apps = useSelector(normalAppListSelector);
140156
const currentOrg = useSelector(getHomeOrg);
141157
const appRef = useRef();
142158
const baseURL = sdkConfig.baseURL || SERVER_HOST;
@@ -178,7 +194,37 @@ export function OrgLayout(props: OrgLayoutLayoutProps) {
178194
baseUrl={baseURL}
179195
/>
180196
:
181-
<div>Keine Default Homepage</div>
197+
198+
<Card style={{ marginBottom: "20px" }}>
199+
<Title level={4}>{trans("home.allApplications")}</Title>
200+
<Space direction="horizontal" size={10}>
201+
<Row gutter={[12,12]}>
202+
<Col xs={12} sm={12} xl={12} style={{marginBottom: "20px", minWidth: "350px"}} span={8}>
203+
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>{trans("home.show")}</a>}>
204+
<div style={{ display: "flex", justifyContent: "space-between" }}>
205+
<div>
206+
<p style={{ textTransform: "uppercase", fontSize: "13px" }}>
207+
{trans("profile.sharedApps")}
208+
</p>
209+
<h4 style={{ fontSize: "22px" }}>
210+
<span data-target={apps.filter(app => app.createBy !== user.username && app.applicationType == 1).length}>
211+
<CountUp start={0} end={apps.filter(app => app.createBy !== user.username && app.applicationType == 1).length} duration={2} />
212+
</span>
213+
</h4>
214+
<div style={{ display: "flex", alignItems: "center" }}>
215+
<h5 style={{ color: "#55c27f", marginRight: "50px" }}></h5>
216+
</div>
217+
</div>
218+
<BgSuccess style={{ padding: '6px', width: '48px', height: '48px', borderRadius: '4px', display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
219+
<ApplicationDocIcon width={"42px"}/>
220+
</BgSuccess>
221+
</div>
222+
</Card>
223+
</Col>
224+
</Row>
225+
</Space>
226+
</Card>
227+
182228
}
183229

184230
</Card>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
323323
<Space direction="horizontal" size={10}>
324324
<Row gutter={[24,24]}>
325325
<Col xs={24} sm={12} xl={6} style={{marginBottom: "20px", minWidth: "350px"}} span={8}>
326-
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>Show</a>}>
326+
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>{trans("home.show")}</a>}>
327327
<div style={{ display: "flex", justifyContent: "space-between" }}>
328328
<div>
329329
<p style={{ textTransform: "uppercase", fontSize: "13px" }}>
@@ -345,7 +345,7 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
345345
</Card>
346346
</Col>
347347
<Col xs={24} sm={12} xl={6} style={{marginBottom: "20px", minWidth: "350px"}} flex="auto" span={8}>
348-
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>Show</a>}>
348+
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>{trans("home.show")}</a>}>
349349
<div style={{ display: "flex", justifyContent: "space-between" }}>
350350
<div>
351351
<p style={{ textTransform: "uppercase", fontSize: "13px" }}>
@@ -368,7 +368,7 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
368368
</Col>
369369

370370
<Col xs={24} sm={12} xl={6} style={{marginBottom: "20px", minWidth: "350px"}} span={8}>
371-
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>Show</a>}>
371+
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>{trans("home.show")}</a>}>
372372
<div style={{ display: "flex", justifyContent: "space-between" }}>
373373
<div>
374374
<p style={{ textTransform: "uppercase", fontSize: "13px" }}>
@@ -390,7 +390,7 @@ export function UserProfileLayout(props: UserProfileLayoutProps) {
390390
</Card>
391391
</Col>
392392
<Col xs={24} sm={12} xl={6} style={{marginBottom: "20px", minWidth: "350px"}} flex="auto" span={8}>
393-
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>Show</a>}>
393+
<Card hoverable extra={<a href="#" onClick={() => history.replace(ALL_APPLICATIONS_URL)}>{trans("home.show")}</a>}>
394394
<div style={{ display: "flex", justifyContent: "space-between" }}>
395395
<div>
396396
<p style={{ textTransform: "uppercase", fontSize: "13px" }}>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,6 @@ export default function ApplicationHome() {
347347
};
348348
}
349349

350-
console.log("user", user);
351-
352350
return (
353351
<DivStyled>
354352
<Layout

client/packages/lowcoder/src/pages/setting/idSource/OAuthForms/GeneralOAuthForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function GeneralOAuthForm(props: GeneralOAuthFormProp) {
5252

5353
const handleSave = () => {
5454
form1.validateFields().then(values => {
55-
console.log(values);
55+
// console.log(values);
5656
saveAuthProvider(values);
5757
});
5858
}

0 commit comments

Comments
 (0)