Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resdesign issues #900

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
2 changes: 1 addition & 1 deletion studio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ RUN npm install --legacy-peer-deps
COPY . ./

# start app
CMD ["npm", "start"]
CMD ["npm", "start"]
2 changes: 1 addition & 1 deletion studio/src/components/FormItems/SlugInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const SlugInput = ({ onChange, inputProps, formItemProps }) => {
return (
<Form.Item
name="slug"
label="Slug"
rules={[
{
required: true,
Expand All @@ -20,6 +19,7 @@ const SlugInput = ({ onChange, inputProps, formItemProps }) => {
]}
{...formItemProps}
>
<label>Slug</label>
<Input {...inputProps} />
</Form.Item>
);
Expand Down
22 changes: 11 additions & 11 deletions studio/src/components/GlobalNav/MobileSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function MobileSidebar({ superOrg, permission, orgs, loading, applications, serv
children.map((route, childIndex) => {
return resource.includes(route.title.toLowerCase()) ? (
['Events', 'Permissions'].indexOf(route.title) !== -1 &&
route.isAdmin !== superOrg.is_admin ? null : (
route.isAdmin !== superOrg.is_admin ? null : (
<Menu.Item key={route.menuKey}>
<Link to={route.path} onClick={onClose}>
<span>{route.title}</span>
Expand Down Expand Up @@ -165,7 +165,7 @@ function MobileSidebar({ superOrg, permission, orgs, loading, applications, serv
<Avatar
src={
details[selected]?.fav_icon?.url?.[
window.REACT_APP_ENABLE_IMGPROXY ? 'proxy' : 'raw'
window.REACT_APP_ENABLE_IMGPROXY ? 'proxy' : 'raw'
] || degaImg
}
/>
Expand Down Expand Up @@ -209,7 +209,7 @@ function MobileSidebar({ superOrg, permission, orgs, loading, applications, serv
}}
>
<div>
<Link style={{ ...buttonStyle, color: '#1E1E1E' }} to='/settings' onClick={onClose}>
<Link style={{ ...buttonStyle, color: '#1E1E1E' }} to="/settings" onClick={onClose}>
<SettingOutlined />
</Link>
{applications.length > 0 ? (
Expand Down Expand Up @@ -279,14 +279,14 @@ function MobileSidebar({ superOrg, permission, orgs, loading, applications, serv
return menu.title === 'CORE' && !showCoreMenu
? null
: !menu.isService
? !menu.isAdmin
? getSubMenuItems(menu, index, Icon)
: permission.filter((each) => each.resource === 'admin').length > 0
? getSubMenuItems(menu, index, Icon)
: null
: services?.includes(maker(menu.title))
? getSubMenuItems(menu, index, Icon)
: null;
? !menu.isAdmin
? getSubMenuItems(menu, index, Icon)
: permission.filter((each) => each.resource === 'admin').length > 0
? getSubMenuItems(menu, index, Icon)
: null
: services?.includes(maker(menu.title))
? getSubMenuItems(menu, index, Icon)
: null;
})}
</Menu>
</Drawer>
Expand Down
2 changes: 1 addition & 1 deletion studio/src/components/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function PostList({ actions, format, filters, onPagination, data, fetchPosts, qu
icon={<ThreeDotIcon style={{ color: '#858585' }} />}
onClick={(e) => {
e.stopPropagation();
alert('this do nothing');
// alert('this do nothing');
}}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions studio/src/components/Template/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Template({ format }) {
};

const genExtra = () => (
<div onClick={(e) => e.stopPropagation()}>
<div>
<Button
onClick={() => {
setShow(!show);
Expand Down Expand Up @@ -81,7 +81,7 @@ function Template({ format }) {
if (posts.length === 0) return null;

return (
<Collapse defaultActiveKey={[]} style={{ marginBottom: '0.75rem' }}>
<Collapse defaultActiveKey={[]} style={{ marginBottom: '0.75rem' }} className="template-list">
<Panel header="Templates" key="1" extra={genExtra()}>
<List
grid={{ gutter: 16, column: 5 }}
Expand Down
5 changes: 5 additions & 0 deletions studio/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@ code {
.edit-form .ant-collapse-header {
font-weight: 600 !important;
}

.template-list .ant-collapse-header {
font-weight: 600 !important;
align-items: center !important;
}
30 changes: 16 additions & 14 deletions studio/src/pages/categories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,26 +140,28 @@ function Categories({ permission }) {
</Col>
<Col>
{searchFieldExpand ? (
<Row>
<Form.Item name="q">
<Input placeholder="Search categories" />
</Form.Item>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
<Row gutter={8}>
<Col>
<Form.Item name="q">
<Input placeholder="Search categories" />
{/**/}
</Form.Item>
</Col>
<Col>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
</Col>
</Row>
) : (
<Tooltip title="search">
<Button
type="text"
shape="circle"
onFocus={() => {
onClick={() => {
setSearchFieldExpand(true);
setTimeout(() => {
form.getFieldsValue().q === undefined && setSearchFieldExpand(false);
}, 10000);
}}
icon={<SearchOutlined />}
/>
Expand All @@ -177,7 +179,7 @@ function Categories({ permission }) {
disabled={!(actions.includes('admin') || actions.includes('create'))}
type="primary"
icon={<PlusOutlined />}
style={{ marginBottom: '1.5rem' }}
style={{ margin: isMobileScreen ? '16px 0' : '0 0 16px 0' }}
>
Create
</Button>
Expand Down
30 changes: 16 additions & 14 deletions studio/src/pages/claimants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,28 @@ function Claimants({ permission }) {
</Col>
<Col>
{searchFieldExpand ? (
<Row>
<Form.Item name="q">
<Input placeholder="Search pages" />
</Form.Item>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
<Row gutter={8}>
<Col>
<Form.Item name="q">
<Input placeholder="Search claimants" />
{/**/}
</Form.Item>
</Col>
<Col>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
</Col>
</Row>
) : (
<Tooltip title="search">
<Button
shape="circle"
style={{ border: 'none' }}
onFocus={() => {
onClick={() => {
setSearchFieldExpand(true);
setTimeout(() => {
form.getFieldsValue().q === undefined && setSearchFieldExpand(false);
}, 10000);
}}
icon={<SearchOutlined />}
/>
Expand All @@ -176,7 +178,7 @@ function Claimants({ permission }) {
disabled={!(actions.includes('admin') || actions.includes('create'))}
type="primary"
icon={<PlusOutlined />}
style={{ marginBottom: 16 }}
style={{ margin: isMobileScreen ? '16px 0' : '0 0 16px 0' }}
>
Create
</Button>
Expand Down
30 changes: 16 additions & 14 deletions studio/src/pages/claims/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,26 +154,28 @@ function Claims({ permission }) {
</Col>
<Col>
{searchFieldExpand ? (
<Row>
<Form.Item name="q">
<Input placeholder="Search pages" />
</Form.Item>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
<Row gutter={8}>
<Col>
<Form.Item name="q">
<Input placeholder="Search claims" />
{/**/}
</Form.Item>
</Col>
<Col>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
</Col>
</Row>
) : (
<Tooltip title="search">
<Button
shape="circle"
type="text"
onFocus={() => {
onClick={() => {
setSearchFieldExpand(true);
setTimeout(() => {
form.getFieldsValue().q === undefined && setSearchFieldExpand(false);
}, 10000);
}}
icon={<SearchOutlined />}
/>
Expand All @@ -191,7 +193,7 @@ function Claims({ permission }) {
disabled={!(actions.includes('admin') || actions.includes('create'))}
type="primary"
icon={<PlusOutlined />}
style={{ marginBottom: 16 }}
style={{ margin: isMobileScreen ? '16px 0' : '0 0 16px 0' }}
>
Create
</Button>
Expand Down
30 changes: 16 additions & 14 deletions studio/src/pages/episodes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,27 +158,29 @@ function Episodes({ permission }) {
</Col>
<Col>
{searchFieldExpand ? (
<Row>
<Form.Item name="q">
<Input placeholder="Search podcasts" />
</Form.Item>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
<Row gutter={8}>
<Col>
<Form.Item name="q">
<Input placeholder="Search episodes" />
{/**/}
</Form.Item>
</Col>
<Col>
<Form.Item>
<Button htmlType="submit" icon={<SearchOutlined />}>
Search
</Button>
</Form.Item>
</Col>
</Row>
) : (
<Tooltip title="search">
<Button
shape="circle"
// style={{ border: 'none' }}
type="text"
onFocus={() => {
onClick={() => {
setSearchFieldExpand(true);
setTimeout(() => {
form.getFieldsValue().q === undefined && setSearchFieldExpand(false);
}, 10000);
}}
icon={<SearchOutlined />}
/>
Expand All @@ -196,7 +198,7 @@ function Episodes({ permission }) {
disabled={!(actions.includes('admin') || actions.includes('create'))}
type="primary"
icon={<PlusOutlined />}
style={{ marginBottom: 16 }}
style={{ margin: isMobileScreen ? '16px 0' : '0 0 16px 0' }}
>
Create
</Button>
Expand Down
Loading