mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Change routes in store
This commit is contained in:
parent
336612904b
commit
164b3415ae
@ -32,7 +32,7 @@ class ConnectedAppCard extends React.Component {
|
|||||||
|
|
||||||
const description = (
|
const description = (
|
||||||
<div className="appCard">
|
<div className="appCard">
|
||||||
<Link to={"/store/"+app.deviceType+"/" + release.uuid}>
|
<Link to={"/store/"+app.deviceType+"/apps/" + release.uuid}>
|
||||||
<Row className="release">
|
<Row className="release">
|
||||||
<Col span={24} className="release-icon">
|
<Col span={24} className="release-icon">
|
||||||
<img src={release.iconPath} alt="icon"/>
|
<img src={release.iconPath} alt="icon"/>
|
||||||
|
|||||||
@ -101,10 +101,10 @@ class ReleaseView extends React.Component {
|
|||||||
<img src={release.iconPath} alt="icon"/>
|
<img src={release.iconPath} alt="icon"/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col xl={10} sm={11} className="release-title">
|
<Col xl={10} sm={11} className="release-title">
|
||||||
<Title level={2}>App Name</Title>
|
<Title level={2}>{app.name}</Title>
|
||||||
<Text>Version : {release.version}</Text><br/><br/>
|
<Text>Version : {release.version}</Text><br/><br/>
|
||||||
<StarRatings
|
<StarRatings
|
||||||
rating={release.rating}
|
rating={app.rating}
|
||||||
starRatedColor="#777"
|
starRatedColor="#777"
|
||||||
starDimension="20px"
|
starDimension="20px"
|
||||||
starSpacing="2px"
|
starSpacing="2px"
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import Login from "./pages/Login";
|
|||||||
import Dashboard from "./pages/dashboard/Dashboard";
|
import Dashboard from "./pages/dashboard/Dashboard";
|
||||||
import Apps from "./pages/dashboard/apps/Apps";
|
import Apps from "./pages/dashboard/apps/Apps";
|
||||||
import Release from "./pages/dashboard/apps/release/Release";
|
import Release from "./pages/dashboard/apps/release/Release";
|
||||||
import AddNewApp from "./pages/dashboard/add-new-app/AddNewApp";
|
|
||||||
import './index.css';
|
import './index.css';
|
||||||
import store from "./js/store/index";
|
import store from "./js/store/index";
|
||||||
import {Provider} from "react-redux";
|
import {Provider} from "react-redux";
|
||||||
@ -24,17 +23,12 @@ const routes = [
|
|||||||
component: Dashboard,
|
component: Dashboard,
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
path: '/store/android',
|
path: '/store/:deviceType',
|
||||||
component: Apps,
|
component: Apps,
|
||||||
exact: true
|
exact: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/store/apps/new-app',
|
path: '/store/:deviceType/apps/:uuid',
|
||||||
component: AddNewApp,
|
|
||||||
exact: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/store/android/:uuid',
|
|
||||||
exact: true,
|
exact: true,
|
||||||
component: Release
|
component: Release
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,9 @@ class Dashboard extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const {deviceType} = this.props.match.params;
|
||||||
|
console.log(this.props.match.params);
|
||||||
|
console.log(deviceType);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Layout className="layout">
|
<Layout className="layout">
|
||||||
@ -28,12 +31,12 @@ class Dashboard extends React.Component {
|
|||||||
<Menu
|
<Menu
|
||||||
theme="light"
|
theme="light"
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
defaultSelectedKeys={['1']}
|
defaultSelectedKeys={["android"]}
|
||||||
style={{lineHeight: '64px'}}
|
style={{lineHeight: '64px'}}
|
||||||
>
|
>
|
||||||
<Menu.Item key="1"><Link to="/store/android"><Icon type="android" theme="filled"/>Android</Link></Menu.Item>
|
<Menu.Item key="android"><Link to="/store/android"><Icon type="android" theme="filled"/>Android</Link></Menu.Item>
|
||||||
<Menu.Item key="2"><Link to="/store/apps"><Icon type="apple" theme="filled"/>iOS</Link></Menu.Item>
|
<Menu.Item key="ios"><Link to="/store/ios"><Icon type="apple" theme="filled"/>iOS</Link></Menu.Item>
|
||||||
<Menu.Item key="3"><Link to="/store/apps/new-app"><Icon type="upload"/>Web Clips</Link></Menu.Item>
|
<Menu.Item key="webclip"><Link to="/store/webclips"><Icon type="upload"/>Web Clips</Link></Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
</Header>
|
</Header>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@ -26,6 +26,7 @@ class Release extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prevProps, prevState, snapshot) {
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
||||||
|
const {uuid} = this.props.match.params;
|
||||||
if (prevProps !== this.props) {
|
if (prevProps !== this.props) {
|
||||||
this.fetchData(uuid);
|
this.fetchData(uuid);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user