Change Legacy Icons to antd's v3 icons in APPM publisher

revert-70ac1926
anjula-sack 4 years ago
parent 4f8d29456b
commit 111e32e97d

@ -20,6 +20,7 @@
"babel-eslint": "^9.0.0",
"d3": "^5.9.7",
"dagre": "^0.8.4",
"entgra-icons-react": "^1.0.0",
"eslint": "^5.16.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
@ -59,6 +60,7 @@
"chai": "^4.1.2",
"cross-env": "^7.0.0",
"css-loader": "^0.28.11",
"entgra-icons": "^1.4.0",
"eslint": "^5.16.0",
"eslint-config-prettier": "4.3.0",
"eslint-plugin-babel": "5.3.0",

@ -18,73 +18,69 @@
},
"defaultPlatformIcons": {
"default": {
"icon": "global",
"color": "#535c68",
"theme": "outlined"
"icon": "fw-globe",
"color": "#535c68"
},
"android": {
"icon": "android",
"color": "#7db343",
"theme": "filled"
"icon": "fw-android",
"color": "#7db343"
},
"ios": {
"icon": "apple",
"color": "#535c68",
"theme": "filled"
"icon": "fw-apple",
"color": "#535c68"
},
"windows": {
"icon": "windows",
"color": "#008cc4",
"theme": "filled"
"icon": "fw-windows",
"color": "#008cc4"
}
},
"lifecycle": {
"CREATED": {
"title": "Created",
"text": "The initial most state of an application.\n You can only proceed to one of the following states:",
"icon": "file-text",
"icon": "fw-document",
"step": 0
},
"IN-REVIEW": {
"title": "In-Review",
"text": "In this state the application is being reviewed by approvers. You can move from this state to APPROVED state if it is approved by reviewers. Otherwise, you can move the application into either REJECTED state or CREATED state based on the feedback getting by reviewers.",
"icon": "audit",
"icon": "fw-throttling-policy",
"step": 1
},
"APPROVED": {
"title": "Approved",
"text": "The approved state is a compulsory state prior to publishing the application.\n You can only proceed to one of the following states:",
"icon": "file-done",
"icon": "fw-check",
"step": 2
},
"PUBLISHED": {
"title": "Published",
"text": "The state which is applied for applications which are qualified for your Corporate App Store. Only the applications of Published state can be installed to your corporate devices.\n You can only proceed to one of the following states:",
"icon": "global",
"icon": "fw-globe",
"step": 3
},
"BLOCKED": {
"title": "Blocked",
"text": "This state allows you to block your application either to publish or deprecate at a future date.\n You can only proceed to one of the following states:",
"icon": "exception",
"icon": "fw-lock",
"step": 4
},
"DEPRECATED": {
"title": "Deprecated",
"text": "The applications which are outdated and no longer suit your app store.\n You can only proceed to one of the following states:",
"icon": "file-excel",
"icon": "fw-warning",
"step": 5
},
"REJECTED": {
"title": "Rejected",
"text": "The Approvers can reject an application due to a faulty of the app or not being in compliance with company policies.\n You can only proceed to one of the following states:",
"icon": "frown",
"icon": "fw-error",
"step": 6
},
"RETIRED": {
"title": "Retired",
"text": "The final state of an application, where no transition of states will be allowed after this.",
"icon": "rest",
"icon": "fw-delete",
"step": 7
}
},

@ -25,9 +25,10 @@ import {
PlusOutlined,
SettingOutlined,
UserOutlined,
MenuFoldOutlined,
MenuUnfoldOutlined,
} from '@ant-design/icons';
import { Icon as LegacyIcon } from '@ant-design/compatible';
import { Layout, Menu, Drawer, Button } from 'antd';
import { Switch, Link } from 'react-router-dom';
import RouteWithSubRoutes from '../../components/RouteWithSubRoutes';
@ -167,10 +168,11 @@ class Dashboard extends React.Component {
<Layout className="mobile-layout">
<div className="mobile-menu-button">
<Button type="link" onClick={this.showMobileNavigationBar}>
<LegacyIcon
type={this.state.collapsed ? 'menu-fold' : 'menu-unfold'}
className="bar-icon"
/>
{this.state.collapsed ? (
<MenuFoldOutlined />
) : (
<MenuUnfoldOutlined />
)}
</Button>
</div>
</Layout>

@ -17,7 +17,6 @@
*/
import React from 'react';
import { Icon as LegacyIcon } from '@ant-design/compatible';
import {
Drawer,
Select,
@ -52,6 +51,9 @@ import {
CheckCircleOutlined,
EditOutlined,
MoreOutlined,
StarOutlined,
UploadOutlined,
CheckOutlined,
} from '@ant-design/icons';
import DeleteApp from './components/DeleteApp';
import RetireApp from './components/RetireApp';
@ -60,13 +62,6 @@ const { Meta } = Card;
const { Text, Title } = Typography;
const { Option } = Select;
const IconText = ({ type, text }) => (
<span>
<LegacyIcon type={type} style={{ marginRight: 8 }} />
{text}
</span>
);
const modules = {
toolbar: [
['bold', 'italic', 'underline', 'strike', 'blockquote'],
@ -636,24 +631,15 @@ class AppDetailsDrawer extends React.Component {
description={
<div
style={{
fontSize: '0.7em',
fontSize: '0.8em',
}}
className="description-view"
>
<IconText
type="check"
text={release.currentStatus}
/>
<CheckOutlined /> {release.currentStatus}
<Divider type="vertical" />
<IconText
type="upload"
text={release.releaseType}
/>
<UploadOutlined /> {release.releaseType}
<Divider type="vertical" />
<IconText
type="star-o"
text={release.rating.toFixed(1)}
/>
<StarOutlined /> {release.rating.toFixed(1)}
</div>
}
/>

@ -18,7 +18,6 @@
import React from 'react';
import { CheckCircleOutlined } from '@ant-design/icons';
import { Icon as LegacyIcon } from '@ant-design/compatible';
import { Avatar, Table, Tag, Badge, Alert, Tooltip } from 'antd';
import axios from 'axios';
import pSBC from 'shade-blend-color';
@ -26,6 +25,7 @@ import './styles.css';
import { withConfigContext } from '../../../../../../../../components/ConfigContext';
import AppDetailsDrawer from './AppDetailsDrawer';
import { handleApiError } from '../../../../../../../../services/utils/errorHandler';
import { EntgraIcon } from 'entgra-icons-react';
let config = null;
@ -140,15 +140,13 @@ const columns = [
const defaultPlatformIcons = config.defaultPlatformIcons;
let icon = defaultPlatformIcons.default.icon;
let color = defaultPlatformIcons.default.color;
let theme = defaultPlatformIcons.default.theme;
if (defaultPlatformIcons.hasOwnProperty(platform)) {
icon = defaultPlatformIcons[platform].icon;
color = defaultPlatformIcons[platform].color;
theme = defaultPlatformIcons[platform].theme;
}
return (
<span style={{ fontSize: 20, color: color, textAlign: 'center' }}>
<LegacyIcon type={icon} theme={theme} />
<EntgraIcon type={icon} />
</span>
);
},

@ -17,7 +17,6 @@
*/
import React from 'react';
import { Icon as LegacyIcon } from '@ant-design/compatible';
import {
Typography,
Tag,
@ -36,7 +35,7 @@ import './styles.css';
import { withConfigContext } from '../../../../../../../../components/ConfigContext';
import { handleApiError } from '../../../../../../../../services/utils/errorHandler';
import LifeCycleHistory from './components/LifeCycleHistory';
import { EntgraIcon } from 'entgra-icons-react';
const { Text, Title, Paragraph } = Typography;
const { TabPane } = Tabs;
@ -216,7 +215,6 @@ class LifeCycle extends React.Component {
) {
proceedingStates = lifecycle[currentStatus].proceedingStates;
}
return (
<div>
<Title level={4}>Manage Lifecycle</Title>
@ -236,36 +234,38 @@ class LifeCycle extends React.Component {
onChange={this.onChange}
size="small"
>
{lifecycleSteps.map((step, index) => (
<Step
key={index}
icon={<LegacyIcon type={step.icon} />}
title={step.title}
disabled={current !== step.step}
description={
current === step.step && (
<div style={{ width: 400 }}>
<p>{step.text}</p>
{proceedingStates.map(lifecycleState => {
return (
<Button
size={'small'}
style={{ marginRight: 3 }}
onClick={() =>
this.showReasonModal(lifecycleState)
}
key={lifecycleState}
type={'primary'}
>
{lifecycleState}
</Button>
);
})}
</div>
)
}
/>
))}
{lifecycleSteps.map((step, index) => {
return (
<Step
key={index}
icon={<EntgraIcon type={step.icon} />}
title={step.title}
disabled={current !== step.step}
description={
current === step.step && (
<div style={{ width: 400 }}>
<p>{step.text}</p>
{proceedingStates.map(lifecycleState => {
return (
<Button
size={'small'}
style={{ marginRight: 3 }}
onClick={() =>
this.showReasonModal(lifecycleState)
}
key={lifecycleState}
type={'primary'}
>
{lifecycleState}
</Button>
);
})}
</div>
)
}
/>
);
})}
</Steps>
</div>
</TabPane>

@ -63,7 +63,7 @@ class SingleReview extends React.Component {
);
return (
<div>
<div style={{ width: '100%' }}>
<List.Item.Meta
avatar={
<Avatar

@ -17,7 +17,6 @@
*/
import React from 'react';
import { Icon as LegacyIcon } from '@ant-design/compatible';
import { ShopOutlined } from '@ant-design/icons';
import { Divider, Row, Col, Typography, Button, Tooltip, Alert } from 'antd';
import StarRatings from 'react-star-ratings';
@ -28,6 +27,7 @@ import EditRelease from './components/EditRelease';
import { withConfigContext } from '../../../../../../../../components/ConfigContext';
import Authorized from '../../../../../../../../components/Authorized/Authorized';
import DeleteRelease from './components/DeleteRelease';
import { EntgraIcon } from 'entgra-icons-react';
const { Title, Text, Paragraph } = Typography;
@ -57,12 +57,10 @@ class ReleaseView extends React.Component {
const defaultPlatformIcons = config.defaultPlatformIcons;
let icon = defaultPlatformIcons.default.icon;
let color = defaultPlatformIcons.default.color;
let theme = defaultPlatformIcons.default.theme;
if (defaultPlatformIcons.hasOwnProperty(platform)) {
icon = defaultPlatformIcons[platform].icon;
color = defaultPlatformIcons[platform].color;
theme = defaultPlatformIcons[platform].theme;
}
let metaData = [];
try {
@ -91,7 +89,7 @@ class ReleaseView extends React.Component {
<br />
<Text>Platform : </Text>
<span style={{ fontSize: 20, color: color, textAlign: 'center' }}>
<LegacyIcon type={icon} theme={theme} />
<EntgraIcon type={icon} />
</span>
<Divider type="vertical" />
<Text>Version : {release.version}</Text>
@ -154,7 +152,7 @@ class ReleaseView extends React.Component {
</Col>
</Row>
<Divider />
<Row className="release-images">
<Row className="release-images" style={{ flexFlow: 'nowrap' }}>
{release.screenshots.map((screenshotUrl, index) => {
return (
<div key={index} className="release-screenshot">

Loading…
Cancel
Save