diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/components/ReviewContainer/componets/Reviews/components/Review/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/components/ReviewContainer/componets/Reviews/components/Review/index.js
index 3dac70cf558..2d3ec681d99 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/components/ReviewContainer/componets/Reviews/components/Review/index.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/components/ReviewContainer/componets/Reviews/components/Review/index.js
@@ -170,7 +170,7 @@ class Review extends React.Component {
);
return (
-
+
-
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/index.js
index fcdafd75512..fa6307d6b0b 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/index.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/components/ReleaseView/index.js
@@ -17,6 +17,7 @@
*/
import React from 'react';
+import { DownOutlined } from '@ant-design/icons';
import {
Divider,
Row,
@@ -26,7 +27,6 @@ import {
Dropdown,
notification,
Menu,
- Icon,
Tabs,
Tag,
} from 'antd';
@@ -216,13 +216,13 @@ class ReleaseView extends React.Component {
yes={
- Subscribe
+ Subscribe
}
no={
- Subscribe
+ Subscribe
}
/>
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/index.js
index 7c8b1683865..787236598e2 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/index.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Home/scenes/Apps/scenes/Release/components/ReleasePage/index.js
@@ -18,7 +18,8 @@
import React from 'react';
import '../../../../../../../../App.css';
-import { Skeleton, Typography, Row, Col, Card, Breadcrumb, Icon } from 'antd';
+import { HomeOutlined } from '@ant-design/icons';
+import { Skeleton, Typography, Row, Col, Card, Breadcrumb } from 'antd';
import ReleaseView from './components/ReleaseView';
import axios from 'axios';
import { withConfigContext } from '../../../../../../../../components/context/ConfigContext';
@@ -110,7 +111,7 @@ class ReleasePage extends React.Component {
- {deviceType + ' apps'}{' '}
+ {deviceType + ' apps'}{' '}
{appName}
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Login/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Login/index.js
index b6e9b2ad497..3d0f11d4a88 100644
--- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Login/index.js
+++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/react-app/src/scenes/Login/index.js
@@ -17,14 +17,14 @@
*/
import React from 'react';
+import { LockOutlined, UserOutlined } from '@ant-design/icons';
import {
Typography,
Row,
Col,
- Form,
- Icon,
Input,
Button,
+ Form,
Checkbox,
notification,
} from 'antd';
@@ -36,6 +36,62 @@ const { Title } = Typography;
const { Text } = Typography;
class Login extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ inValid: false,
+ loading: false,
+ };
+ }
+
+ handleSubmit = values => {
+ this.setState({
+ loading: true,
+ inValid: false,
+ });
+ const parameters = {
+ username: values.username,
+ password: values.password,
+ platform: 'store',
+ };
+
+ const request = Object.keys(parameters)
+ .map(key => key + '=' + parameters[key])
+ .join('&');
+
+ axios
+ .post(window.location.origin + '/store-ui-request-handler/login', request)
+ .then(res => {
+ if (res.status === 200) {
+ let redirectUrl = window.location.origin + '/store';
+ const searchParams = new URLSearchParams(window.location.search);
+ if (searchParams.has('redirect')) {
+ redirectUrl = searchParams.get('redirect');
+ }
+ window.location = redirectUrl;
+ } else {
+ throw new Error();
+ }
+ })
+ .catch(error => {
+ if (error.hasOwnProperty('response') && error.response.status === 401) {
+ this.setState({
+ loading: false,
+ inValid: true,
+ });
+ } else {
+ notification.error({
+ message: 'There was a problem',
+ duration: 10,
+ description: '',
+ });
+ this.setState({
+ loading: false,
+ inValid: false,
+ });
+ }
+ });
+ };
render() {
const config = this.props.context;
return (
@@ -46,7 +102,13 @@ class Login extends React.Component {
-
+
Login
-
+
+
+ }
+ placeholder="Username"
+ />
+
+
+
+ }
+ placeholder="Password"
+ />
+
+ {this.state.loading && Loading..}
+ {this.state.inValid && (
+ Invalid Login Details
+ )}
+
+ Forgot password
+
+ Remember me
+
+
+
+ Log in
+
+
+
@@ -69,140 +182,4 @@ class Login extends React.Component {
}
}
-class NormalLoginForm extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- inValid: false,
- loading: false,
- };
- }
-
- handleSubmit = e => {
- const thisForm = this;
- const config = this.props.context;
-
- e.preventDefault();
- this.props.form.validateFields((err, values) => {
- thisForm.setState({
- inValid: false,
- });
- if (!err) {
- thisForm.setState({
- loading: true,
- });
- const parameters = {
- username: values.username,
- password: values.password,
- platform: 'store',
- };
-
- const request = Object.keys(parameters)
- .map(key => key + '=' + parameters[key])
- .join('&');
-
- axios
- .post(window.location.origin + config.serverConfig.loginUri, request)
- .then(res => {
- if (res.status === 200) {
- let redirectUrl = window.location.origin + '/store';
- const searchParams = new URLSearchParams(window.location.search);
- if (searchParams.has('redirect')) {
- redirectUrl = searchParams.get('redirect');
- }
- window.location = redirectUrl;
- }
- })
- .catch(function(error) {
- if (
- error.hasOwnProperty('response') &&
- error.response.status === 401
- ) {
- thisForm.setState({
- loading: false,
- inValid: true,
- });
- } else {
- notification.error({
- message: 'There was a problem',
- duration: 10,
- description: '',
- });
- thisForm.setState({
- loading: false,
- inValid: false,
- });
- }
- });
- }
- });
- };
-
- render() {
- const { getFieldDecorator } = this.props.form;
- let errorMsg = '';
- if (this.state.inValid) {
- errorMsg = Invalid Login Details;
- }
- let loading = '';
- if (this.state.loading) {
- loading = Loading..;
- }
- return (
-
- {getFieldDecorator('username', {
- rules: [{ required: true, message: 'Please input your username!' }],
- })(
- }
- placeholder="Username"
- />,
- )}
-
-
- {getFieldDecorator('password', {
- rules: [{ required: true, message: 'Please input your Password!' }],
- })(
- }
- type="password"
- placeholder="Password"
- />,
- )}
-
- {loading}
- {errorMsg}
-
- {getFieldDecorator('remember', {
- valuePropName: 'checked',
- initialValue: true,
- })(Remember me)}
-
-
- Forgot password
-
-
- Log in
-
-
-
- );
- }
-}
-
-const WrappedNormalLoginForm = withConfigContext(
- Form.create({ name: 'normal_login' })(NormalLoginForm),
-);
-
export default withConfigContext(Login);