diff --git a/studio/Dockerfile b/studio/Dockerfile index 63ad9f6b..392f0e28 100644 --- a/studio/Dockerfile +++ b/studio/Dockerfile @@ -13,4 +13,4 @@ RUN npm install --legacy-peer-deps COPY . ./ # start app -CMD ["npm", "start"] \ No newline at end of file +CMD ["npm", "start"] diff --git a/studio/src/components/FormItems/SlugInput.js b/studio/src/components/FormItems/SlugInput.js index 9471876b..624527eb 100644 --- a/studio/src/components/FormItems/SlugInput.js +++ b/studio/src/components/FormItems/SlugInput.js @@ -7,7 +7,6 @@ const SlugInput = ({ onChange, inputProps, formItemProps }) => { return ( { ]} {...formItemProps} > + ); diff --git a/studio/src/components/GlobalNav/MobileSidebar.js b/studio/src/components/GlobalNav/MobileSidebar.js index 3f4f9d20..a0eeb194 100644 --- a/studio/src/components/GlobalNav/MobileSidebar.js +++ b/studio/src/components/GlobalNav/MobileSidebar.js @@ -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 : ( {route.title} @@ -165,7 +165,7 @@ function MobileSidebar({ superOrg, permission, orgs, loading, applications, serv @@ -209,7 +209,7 @@ function MobileSidebar({ superOrg, permission, orgs, loading, applications, serv }} >
- + {applications.length > 0 ? ( @@ -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; })} diff --git a/studio/src/components/List/index.js b/studio/src/components/List/index.js index f595f17f..68d619bd 100644 --- a/studio/src/components/List/index.js +++ b/studio/src/components/List/index.js @@ -180,7 +180,7 @@ function PostList({ actions, format, filters, onPagination, data, fetchPosts, qu icon={} onClick={(e) => { e.stopPropagation(); - alert('this do nothing'); + // alert('this do nothing'); }} />
diff --git a/studio/src/components/Template/index.js b/studio/src/components/Template/index.js index e852238b..0759db1d 100644 --- a/studio/src/components/Template/index.js +++ b/studio/src/components/Template/index.js @@ -47,7 +47,7 @@ function Template({ format }) { }; const genExtra = () => ( -
e.stopPropagation()}> +
- + + + + + {/**/} + + + + + + + ) : ( diff --git a/studio/src/pages/claimants/index.js b/studio/src/pages/claimants/index.js index dc579682..a2cdedad 100644 --- a/studio/src/pages/claimants/index.js +++ b/studio/src/pages/claimants/index.js @@ -139,26 +139,28 @@ function Claimants({ permission }) { {searchFieldExpand ? ( - - - - - - - + + + + + {/**/} + + + + + + + ) : ( diff --git a/studio/src/pages/claims/index.js b/studio/src/pages/claims/index.js index 3579124c..9dc7451b 100644 --- a/studio/src/pages/claims/index.js +++ b/studio/src/pages/claims/index.js @@ -154,26 +154,28 @@ function Claims({ permission }) { {searchFieldExpand ? ( - - - - - - - + + + + + {/**/} + + + + + + + ) : ( diff --git a/studio/src/pages/episodes/index.js b/studio/src/pages/episodes/index.js index 010076f6..67ad7ced 100644 --- a/studio/src/pages/episodes/index.js +++ b/studio/src/pages/episodes/index.js @@ -158,15 +158,20 @@ function Episodes({ permission }) { {searchFieldExpand ? ( - - - - - - - + + + + + {/**/} + + + + + + + ) : ( @@ -174,11 +179,8 @@ function Episodes({ permission }) { shape="circle" // style={{ border: 'none' }} type="text" - onFocus={() => { + onClick={() => { setSearchFieldExpand(true); - setTimeout(() => { - form.getFieldsValue().q === undefined && setSearchFieldExpand(false); - }, 10000); }} icon={} /> @@ -196,7 +198,7 @@ function Episodes({ permission }) { disabled={!(actions.includes('admin') || actions.includes('create'))} type="primary" icon={} - style={{ marginBottom: 16 }} + style={{ margin: isMobileScreen ? '16px 0' : '0 0 16px 0' }} > Create diff --git a/studio/src/pages/fact-checks/components/FactCheckForm.js b/studio/src/pages/fact-checks/components/FactCheckForm.js index 1133c238..30af67ac 100644 --- a/studio/src/pages/fact-checks/components/FactCheckForm.js +++ b/studio/src/pages/fact-checks/components/FactCheckForm.js @@ -100,7 +100,7 @@ function FactCheckForm({ onCreate, data = {}, actions = {}, format }) { setClaimCreatedFlag(false); } - useEffect(() => {}, [details, loading]); + useEffect(() => { }, [details, loading]); const [drawerVisible, setDrawerVisible] = useState(false); const showDrawer = () => { @@ -135,8 +135,8 @@ function FactCheckForm({ onCreate, data = {}, actions = {}, format }) { values.status = status; values.status === 'publish' ? (values.published_date = values.published_date - ? dayjs(values.published_date).format('YYYY-MM-DDTHH:mm:ssZ') - : getCurrentDate()) + ? dayjs(values.published_date).format('YYYY-MM-DDTHH:mm:ssZ') + : getCurrentDate()) : (values.published_date = null); onCreate(values); }; @@ -299,8 +299,8 @@ function FactCheckForm({ onCreate, data = {}, actions = {}, format }) {

) : null} {form.getFieldValue('claims') && - form.getFieldValue('claims').length > 0 && - !loading ? ( + form.getFieldValue('claims').length > 0 && + !loading ? ( Post Settings} + title={

Post Settings

} placement="right" closable={true} onClose={onClose} @@ -329,8 +329,9 @@ function FactCheckForm({ onCreate, data = {}, actions = {}, format }) { - - + + + - + + + + + {/**/} + + + + + + + ) : ( diff --git a/studio/src/pages/media/index.js b/studio/src/pages/media/index.js index 12724321..a7cd92dd 100644 --- a/studio/src/pages/media/index.js +++ b/studio/src/pages/media/index.js @@ -123,26 +123,28 @@ function Media({ permission }) { {searchFieldExpand ? ( - - - - - - - + + + + + {/**/} + + + + + + + ) : ( diff --git a/studio/src/pages/pages/components/PageList.js b/studio/src/pages/pages/components/PageList.js index 5d966dc9..af4a444e 100644 --- a/studio/src/pages/pages/components/PageList.js +++ b/studio/src/pages/pages/components/PageList.js @@ -145,7 +145,7 @@ function PageList({ actions, format, status, data, filters, setFilters, fetchPag size="large" icon={} onClick={() => { - alert('this do nothing'); + // alert('this do nothing'); }} /> {searchFieldExpand ? ( - - - - {/**/} - - - - + + + + + {/**/} + + + + + + + ) : ( diff --git a/studio/src/pages/podcasts/index.js b/studio/src/pages/podcasts/index.js index 33588a3f..3e441661 100644 --- a/studio/src/pages/podcasts/index.js +++ b/studio/src/pages/podcasts/index.js @@ -163,15 +163,20 @@ function Podcasts({ permission }) { {searchFieldExpand ? ( - - - - - - - + + + + + {/**/} + + + + + + + ) : ( @@ -179,11 +184,8 @@ function Podcasts({ permission }) { shape="circle" // style={{ border: 'none' }} type="text" - onFocus={() => { + onClick={() => { setSearchFieldExpand(true); - setTimeout(() => { - form.getFieldsValue().q === undefined && setSearchFieldExpand(false); - }, 10000); }} icon={} /> @@ -201,7 +203,7 @@ function Podcasts({ permission }) { disabled={!(actions.includes('admin') || actions.includes('create'))} type="primary" icon={} - style={{ marginBottom: 16 }} + style={{ margin: isMobileScreen ? '16px 0' : '0 0 16px 0' }} > Create diff --git a/studio/src/pages/posts/components/PostForm.js b/studio/src/pages/posts/components/PostForm.js index 47771844..06aa93e2 100644 --- a/studio/src/pages/posts/components/PostForm.js +++ b/studio/src/pages/posts/components/PostForm.js @@ -588,7 +588,7 @@ function PostForm({ onCreate, data = {}, actions = {}, format, page = false }) {
Code Injection} + title={

Code Injection

} placement="right" closable={true} onClose={onClose} @@ -614,7 +614,7 @@ function PostForm({ onCreate, data = {}, actions = {}, format, page = false }) {
Meta Fields} + title={

Meta Fields

} placement="right" closable={true} onClose={onClose} @@ -641,12 +641,12 @@ function PostForm({ onCreate, data = {}, actions = {}, format, page = false }) {
Seo Data} + title={

Seo Data

} placement="right" style={{ width: '100%' }} closable={true} onClose={() => setSeoDrawerVisible(false)} - visible={seoDrawer} + open={seoDrawer} // getContainer={()=>{console.log(formRef.current);if(formRef.current)return formRef.current;return false;}} width={isMobileScreen ? '80vw' : 480} bodyStyle={{ paddingBottom: 40 }} diff --git a/studio/src/pages/posts/index.js b/studio/src/pages/posts/index.js index c9332539..8b15423d 100644 --- a/studio/src/pages/posts/index.js +++ b/studio/src/pages/posts/index.js @@ -227,15 +227,20 @@ function Posts({ formats }) { {searchFieldExpand ? ( - - - - - - - + + + + + {/**/} + + + + + + + ) : ( @@ -243,11 +248,8 @@ function Posts({ formats }) { shape="circle" // style={{ border: 'none' }} type="text" - onFocus={() => { + onClick={() => { setSearchFieldExpand(true); - setTimeout(() => { - form.getFieldsValue().q === undefined && setSearchFieldExpand(false); - }, 10000); }} icon={} /> @@ -265,7 +267,7 @@ function Posts({ formats }) { disabled={!(actions.includes('admin') || actions.includes('create'))} type="primary" icon={} - style={{ marginBottom: 16 }} + style={{ margin: isMobileScreen ? '16px 0' : '0 0 16px 0' }} > Create diff --git a/studio/src/pages/profile/index.js b/studio/src/pages/profile/index.js index 4c8c3fd5..ab5a4e89 100644 --- a/studio/src/pages/profile/index.js +++ b/studio/src/pages/profile/index.js @@ -8,20 +8,6 @@ import { getUserProfile, updateProfile } from '../../actions/profile'; import { SlugInput } from '../../components/FormItems'; import { Helmet } from 'react-helmet'; -const layout = { - labelCol: { - span: 7, - }, - wrapperCol: { - span: 16, - }, -}; -const tailLayout = { - wrapperCol: { - offset: 3, - span: 17, - }, -}; function Profile() { const [form] = Form.useForm(); const dispatch = useDispatch(); @@ -54,10 +40,11 @@ function Profile() { return (
- +
- - - - - Other + + + @@ -124,14 +109,15 @@ function Profile() { - - + + + + - ~
- +
); } diff --git a/studio/src/pages/tags/index.js b/studio/src/pages/tags/index.js index eadd2075..8bd5ce90 100644 --- a/studio/src/pages/tags/index.js +++ b/studio/src/pages/tags/index.js @@ -141,26 +141,28 @@ function Tags({ permission }) { {searchFieldExpand ? ( - - - - - - - + + + + + {/**/} + + + + + + + ) : (