From 362a2d1d3229eba0385d92fe9197ea2c84e67a4c Mon Sep 17 00:00:00 2001 From: sinthuja Date: Fri, 6 Oct 2017 15:21:49 +0530 Subject: [PATCH] Adding user login option. --- .../public/themes/default/default-theme.css | 2 +- .../src/main/resources/store/src/App.jsx | 1 + .../store/src/common/configuration.js | 1 + .../components/AppStoreBase/BaseLayout.jsx | 12 +++-- .../Application/ApplicationListing.jsx | 1 + .../UIComponents/UserOptions/UserOptions.jsx | 45 ++++++++++--------- .../UIComponents/UserOptions/user-options.css | 45 +++++++++++++++++++ .../src/main/resources/store/src/index.js | 2 +- .../main/resources/store/webpack.config.js | 1 - 9 files changed, 84 insertions(+), 26 deletions(-) create mode 100644 components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/UIComponents/UserOptions/user-options.css diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/themes/default/default-theme.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/themes/default/default-theme.css index 0afbb7ba5f8..2b7f80bffaa 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/themes/default/default-theme.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/public/themes/default/default-theme.css @@ -87,7 +87,7 @@ body { .btn-header { margin-top: 15px; - margin-right: 20px; + margin-right: 100px; color: white; } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx index f1084e1993b..e00894e3eb0 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx @@ -63,6 +63,7 @@ class Base extends Component { } render() { + console.log('came here/////'); if (this.state.user !== null) { return (
diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/common/configuration.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/common/configuration.js index 61adb30f010..77d90dc444e 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/common/configuration.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/common/configuration.js @@ -36,6 +36,7 @@ class Configuration { let thisObject = this; axios.get(thisObject.hostConstants.baseURL + '/' + thisObject.hostConstants.appContext + "/config.json"). then(function (response) { + console.log('succesfully loadedd....'); thisObject.serverConfig = response.data.config; thisObject.themeConfig = response.data.theme; Constants.load(); diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/AppStoreBase/BaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/AppStoreBase/BaseLayout.jsx index de64011fe00..6e46e5fda8c 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/AppStoreBase/BaseLayout.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/AppStoreBase/BaseLayout.jsx @@ -36,10 +36,12 @@ class BaseLayout extends Component { this.state = { notifications: 0, user: 'Admin', - openModal: false + openModal: false, + userOptions : false }; this.logout = this.logout.bind(this); this.closeModal = this.closeModal.bind(this); + this.handleUserOptionsOnClick = this.handleUserOptionsOnClick.bind(this); } handleApplicationClick() { @@ -62,6 +64,10 @@ class BaseLayout extends Component { this.setState({openModal: false}); } + handleUserOptionsOnClick() { + this.setState({userOptions : true}); + } + render() { return ( @@ -72,8 +78,8 @@ class BaseLayout extends Component {
- - + +