Skip to content

Commit cea7694

Browse files
committed
Merge branch 'master' of https://github.com/ryoldash/module-zero-core-template into u-samet
2 parents 3cefc6b + eac62e3 commit cea7694

File tree

74 files changed

+1769
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1769
-284
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"App": {
66
"ServerRootAddress": "http://localhost:21021/",
77
"ClientRootAddress": "http://localhost:4200/",
8-
"CorsOrigins": "http://localhost:4200,http://localhost:8080,http://localhost:8081"
8+
"CorsOrigins": "http://localhost:4200,http://localhost:8080,http://localhost:8081,http://localhost:3000"
99
},
1010
"Authentication": {
1111
"JwtBearer": {

reactjs/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REACT_APP_API_URL="http://www.ryoldash.com/"

reactjs/.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REACT_APP_API_URL="http://localhost:21021/api/"

reactjs/.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
REACT_APP_API_URL="http://www.ryoldash.com/"

reactjs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# misc
1313
.DS_Store
14+
.env.development
1415
.env.local
1516
.env.development.local
1617
.env.test.local

reactjs/.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
**/*.md
2+
**/*.svg
3+
**/*.ejs
4+
**/*.html
5+
package.json

reactjs/.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5",
4+
"printWidth": 150,
5+
"overrides": [{
6+
"files": ".prettierrc",
7+
"options": {
8+
"parser": "json"
9+
}
10+
}]
11+
}

reactjs/src/App.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
1-
import * as React from "react";
2-
import "./App.css";
1+
import * as React from 'react';
2+
import './App.css';
33

4-
import * as abpUserConfiguration from "./services/abpUserConfigurationService";
5-
import { withRouter } from "react-router-dom";
6-
import Layout from "./scenes/Layout";
4+
import * as abpUserConfiguration from './services/abpUserConfigurationService';
5+
import { withRouter, Switch, Route } from 'react-router-dom';
6+
import Layout from './scenes/Layout';
7+
8+
import Login from "./scenes/Login"
79
class App extends React.Component {
810
componentDidMount() {
911
console.log(abpUserConfiguration.initialize());
1012
}
1113
public render() {
1214
return (
13-
<Layout />
14-
);
15+
<Switch>
16+
<Route path="/dashboard" component={Layout} />
17+
<Route path="/users" component={Layout} />
18+
<Route path="/tenants" component={Layout} />
19+
<Route path="/roles" component={Layout} />
20+
<Route path="/about" component={Layout} />
21+
<Route path="/login" component={Login } />
22+
<Route path="/" component={Login } />
23+
</Switch>
24+
)
1525
}
1626
}
1727

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as React from 'react';
2+
import AppConsts from 'src/lib/appconst';
3+
4+
class AppComponentBase<P = {}, S = {}, SS = any> extends React.Component<P, S, SS> {
5+
localizationSourceName = AppConsts.localization.defaultLocalizationSourceName;
6+
7+
L(key: string, sourceName?: string): string {
8+
return abp.localization.localize(key, sourceName ? sourceName : this.localizationSourceName);
9+
}
10+
11+
isGranted(permissionName: string): boolean {
12+
return abp.auth.isGranted(permissionName);
13+
}
14+
}
15+
16+
export default AppComponentBase;
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import * as React from 'react';
2+
import { Col, Icon, Layout, Avatar, Menu, Dropdown, Badge } from 'antd';
3+
import { Link } from 'react-router-dom';
4+
5+
export interface LayoutHeaderProps {
6+
collapsed?: any;
7+
toggle?: any;
8+
}
9+
10+
const userDropdownMenu = (
11+
<Menu>
12+
<Menu.Item key="2">
13+
<Icon type="logout" />
14+
<span> <Link to="/login">Logout</Link></span>
15+
</Menu.Item>
16+
</Menu>
17+
);
18+
19+
const languageMenu = (
20+
<Menu>
21+
<Menu.Item key="1">
22+
<span>English</span>
23+
</Menu.Item>
24+
<Menu.Item key="2">
25+
<span>Deutsch</span>
26+
</Menu.Item>
27+
<Menu.Item key="3">
28+
<span>Türkçe</span>
29+
</Menu.Item>
30+
</Menu>
31+
);
32+
33+
export class LayoutHeader extends React.Component<LayoutHeaderProps> {
34+
render() {
35+
return (
36+
<Layout.Header style={{ background: '#fff', minHeight: 83, padding: 0 }}>
37+
<Col style={{ textAlign: 'left' }} span={12}>
38+
<Icon
39+
style={{ marginTop: 10, marginRight: 10, textAlign: 'left' }}
40+
className="trigger"
41+
type={this.props.collapsed ? 'menu-unfold' : 'menu-fold'}
42+
onClick={this.props.toggle}
43+
/>
44+
</Col>
45+
<Col style={{ margin: 15, marginLeft: 10, textAlign: 'right' }}>
46+
<Dropdown overlay={languageMenu} trigger={['click']}>
47+
<Icon style={{ margin: 20 }} type="global" />
48+
</Dropdown>
49+
<Dropdown overlay={userDropdownMenu} trigger={['click']}>
50+
<Badge style={{ margin: 10 }} count={3}>
51+
<Avatar style={{ margin: 10 }} size={48} alt={'profile'} src="https://sametkabay.com/images/smtkby/smtkby240.png" />
52+
</Badge>
53+
</Dropdown>
54+
</Col>
55+
</Layout.Header>
56+
);
57+
}
58+
}
59+
60+
export default LayoutHeader;

0 commit comments

Comments
 (0)