Skip to content

Commit 7189a53

Browse files
authored
Merge pull request #561 from huseyingoztok/upgrading-ant-design-library-to-version-4
Antd has been upgraded to version 4.6.4
2 parents 565f1cd + b2bb2db commit 7189a53

File tree

22 files changed

+16988
-1056
lines changed

22 files changed

+16988
-1056
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Application/Roles/Dto/CreateRoleDto.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,10 @@ public class CreateRoleDto
2121
public string Description { get; set; }
2222

2323
public List<string> GrantedPermissions { get; set; }
24+
25+
public CreateRoleDto()
26+
{
27+
GrantedPermissions = new List<string>();
28+
}
2429
}
2530
}

reactjs/package-lock.json

Lines changed: 16222 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reactjs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"version": "4.7.1",
44
"private": true,
55
"dependencies": {
6+
"@ant-design/icons": "^4.2.2",
67
"@aspnet/signalr": "^1.1.4",
78
"@craco/craco": "^5.6.2",
89
"abp-web-resources": "^5.1.1",
9-
"antd": "^3.26.0",
10+
"antd": "^4.6.4",
1011
"axios": "^0.19.0",
1112
"classnames": "^2.2.6",
1213
"craco-antd": "^1.14.1",
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +0,0 @@
1-
.footer {
2-
position: sticky;
3-
left: 0;
4-
margin-top: 16px;
5-
bottom: 64px;
6-
width: 100%;
7-
text-align: center;
8-
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import * as React from 'react';
2-
import { Col } from 'antd';
2+
import { Layout } from 'antd';
33
import './index.less';
4-
54
const Footer = () => {
5+
66
return (
7-
<Col className={"footer"}>
7+
<Layout.Footer className={'footer'} style={{ textAlign: 'center' }}>
88
Asp.Net Boilerplate - React © 2018 <a href="https://github.com/ryoldash/module-zero-core-template">Github Page</a>
9-
</Col>
9+
</Layout.Footer>
1010
);
1111
};
1212
export default Footer;

reactjs/src/components/Header/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import './index.less';
22

33
import * as React from 'react';
44

5-
import { Avatar, Badge, Col, Dropdown, Icon, Menu, Row } from 'antd';
5+
import { Avatar, Badge, Col, Dropdown, Menu, Row } from 'antd';
6+
import { MenuUnfoldOutlined, MenuFoldOutlined, LogoutOutlined } from '@ant-design/icons';
67

78
import { L } from '../../lib/abpUtility';
89
import LanguageSelect from '../LanguageSelect';
@@ -19,7 +20,7 @@ const userDropdownMenu = (
1920
<Menu>
2021
<Menu.Item key="2">
2122
<Link to="/logout">
22-
<Icon type="logout" />
23+
<LogoutOutlined />
2324
<span> {L('Logout')}</span>
2425
</Link>
2526
</Menu.Item>
@@ -31,13 +32,17 @@ export class Header extends React.Component<IHeaderProps> {
3132
return (
3233
<Row className={'header-container'}>
3334
<Col style={{ textAlign: 'left' }} span={12}>
34-
<Icon className="trigger" type={this.props.collapsed ? 'menu-unfold' : 'menu-fold'} onClick={this.props.toggle} />
35+
{this.props.collapsed ? (
36+
<MenuUnfoldOutlined className="trigger" onClick={this.props.toggle} />
37+
) : (
38+
<MenuFoldOutlined className="trigger" onClick={this.props.toggle} />
39+
)}
3540
</Col>
3641
<Col style={{ padding: '0px 15px 0px 15px', textAlign: 'right' }} span={12}>
3742
<LanguageSelect /> {' '}
3843
<Dropdown overlay={userDropdownMenu} trigger={['click']}>
3944
<Badge style={{}} count={3}>
40-
<Avatar style={{height:24, width:24}} shape="circle" alt={'profile'} src={profilePicture} />
45+
<Avatar style={{ height: 24, width: 24 }} shape="circle" alt={'profile'} src={profilePicture} />
4146
</Badge>
4247
</Dropdown>
4348
</Col>

reactjs/src/components/LanguageSelect/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import 'famfamfam-flags/dist/sprite/famfamfam-flags.css';
33

44
import * as React from 'react';
55

6-
import { Dropdown, Icon, Menu } from 'antd';
6+
import { Dropdown, Menu } from 'antd';
7+
import { GlobalOutlined } from '@ant-design/icons';
78

89
import { L } from '../../lib/abpUtility';
910
import Stores from '../../stores/storeIdentifier';
@@ -55,7 +56,7 @@ class LanguageSelect extends React.Component<ILanguageSelectProps> {
5556

5657
return (
5758
<Dropdown overlay={langMenu} placement="bottomRight">
58-
<Icon type="global" className={classNames('dropDown', 'className')} title={L('Languages')} />
59+
<GlobalOutlined className={classNames('dropDown', 'className')} title={L('Languages')} />
5960
</Dropdown>
6061
);
6162
}

reactjs/src/components/Layout/AppLayout.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,13 @@ class AppLayout extends React.Component<any> {
5757
exact
5858
key={index}
5959
path={route.path}
60-
render={props => <ProtectedRoute component={route.component} permission={route.permission} />}
60+
render={(props) => <ProtectedRoute component={route.component} permission={route.permission} />}
6161
/>
6262
))}
6363
{pathname !== '/' && <NotFoundRoute />}
6464
</Switch>
6565
</Content>
66-
<Layout.Footer style={{ textAlign: 'center' }}>
67-
<Footer />
68-
</Layout.Footer>
66+
<Footer />
6967
</Layout>
7068
</Layout>
7169
);

reactjs/src/components/Layout/UserLayout.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,20 @@ class UserLayout extends React.Component<any> {
2020
return (
2121
<DocumentTitle title={utils.getPageTitle(pathname)}>
2222
<Col className="container">
23-
<div className={'lang'}>
24-
<LanguageSelect />
25-
</div>
26-
<Switch>
27-
{userRouter
28-
.filter((item: any) => !item.isLayout)
29-
.map((item: any, index: number) => (
30-
<Route key={index} path={item.path} component={item.component} exact={item.exact} />
31-
))}
23+
<div style={{ height: 'calc(100vh - 55px)' }}>
24+
<div className={'lang'}>
25+
<LanguageSelect />
26+
</div>
27+
<Switch>
28+
{userRouter
29+
.filter((item: any) => !item.isLayout)
30+
.map((item: any, index: number) => (
31+
<Route key={index} path={item.path} component={item.component} exact={item.exact} />
32+
))}
3233

33-
<Redirect from="/user" to="/user/login" />
34-
</Switch>
34+
<Redirect from="/user" to="/user/login" />
35+
</Switch>
36+
</div>
3537
<Footer />
3638
</Col>
3739
</DocumentTitle>

reactjs/src/components/Router/router.config.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import LoadableComponent from './../Loadable/index';
2+
import { HomeOutlined, UserOutlined, TagsOutlined, AppstoreOutlined, InfoCircleOutlined } from '@ant-design/icons';
23

34
export const userRouter: any = [
45
{
@@ -25,7 +26,6 @@ export const appRouters: any = [
2526
name: 'home',
2627
permission: '',
2728
title: 'Home',
28-
icon: 'home',
2929
component: LoadableComponent(() => import('../../components/Layout/AppLayout')),
3030
isLayout: true,
3131
showInMenu: false,
@@ -35,7 +35,7 @@ export const appRouters: any = [
3535
name: 'dashboard',
3636
permission: '',
3737
title: 'Dashboard',
38-
icon: 'home',
38+
icon: HomeOutlined,
3939
showInMenu: true,
4040
component: LoadableComponent(() => import('../../scenes/Dashboard')),
4141
},
@@ -44,7 +44,7 @@ export const appRouters: any = [
4444
permission: 'Pages.Users',
4545
title: 'Users',
4646
name: 'user',
47-
icon: 'user',
47+
icon: UserOutlined,
4848
showInMenu: true,
4949
component: LoadableComponent(() => import('../../scenes/Users')),
5050
},
@@ -53,7 +53,7 @@ export const appRouters: any = [
5353
permission: 'Pages.Roles',
5454
title: 'Roles',
5555
name: 'role',
56-
icon: 'tags',
56+
icon: TagsOutlined,
5757
showInMenu: true,
5858
component: LoadableComponent(() => import('../../scenes/Roles')),
5959
},
@@ -62,7 +62,7 @@ export const appRouters: any = [
6262
permission: 'Pages.Tenants',
6363
title: 'Tenants',
6464
name: 'tenant',
65-
icon: 'appstore',
65+
icon: AppstoreOutlined,
6666
showInMenu: true,
6767
component: LoadableComponent(() => import('../../scenes/Tenants')),
6868
},
@@ -71,7 +71,7 @@ export const appRouters: any = [
7171
permission: '',
7272
title: 'About',
7373
name: 'about',
74-
icon: 'info-circle',
74+
icon: InfoCircleOutlined,
7575
showInMenu: true,
7676
component: LoadableComponent(() => import('../../scenes/About')),
7777
},
@@ -80,7 +80,6 @@ export const appRouters: any = [
8080
permission: '',
8181
title: 'Logout',
8282
name: 'logout',
83-
icon: 'info-circle',
8483
showInMenu: false,
8584
component: LoadableComponent(() => import('../../components/Logout')),
8685
},
@@ -89,7 +88,6 @@ export const appRouters: any = [
8988
permission: '',
9089
title: 'exception',
9190
name: 'exception',
92-
icon: 'info-circle',
9391
showInMenu: false,
9492
component: LoadableComponent(() => import('../../scenes/Exception')),
9593
},

0 commit comments

Comments
 (0)