Skip to content

Commit

Permalink
Merge pull request #911 from factly/Label-inconsistencies
Browse files Browse the repository at this point in the history
fix:form labels in pages and tags
  • Loading branch information
shreeharsha-factly committed Jul 20, 2023
2 parents a2e44e1 + 6cae4eb commit f5fa2b9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 29 deletions.
4 changes: 2 additions & 2 deletions studio/src/components/List/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ function PostList({ actions, format, filters, onPagination, data, fetchPosts, qu
}}
disabled={!(actions.includes('admin') || actions.includes('delete'))}
/>
<Button
{/* <Button
size="large"
icon={<ThreeDotIcon style={{ color: '#858585' }} />}
onClick={(e) => {
e.stopPropagation();
alert('this do nothing');
}}
/>
/> */}
</div>
</ConfigProvider>
);
Expand Down
26 changes: 2 additions & 24 deletions studio/src/pages/pages/components/PageList.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,35 +141,13 @@ function PageList({ actions, format, status, data, filters, setFilters, fetchPag
icon={<DeleteOutlined style={{ color: '#858585' }} />}
disabled={!(actions.includes('admin') || actions.includes('delete'))}
/>
<Button
{/* <Button
size="large"
icon={<ThreeDotIcon style={{ color: '#858585' }} />}
onClick={() => {
alert('this do nothing');
}}
/>
<Modal
open={modalOpen}
closable={false}
centered
width={311}
className="delete-modal-container"
style={{
borderRadius: '18px',
}}
onOk={() => {
dispatch(deletePage(item.id)).then(() => fetchPages());
}}
cancelButtonProps={{ type: 'text', style: { color: '#000' } }}
onCancel={(e) => {
e.stopPropagation();
setModalOpen(false);
}}
>
<Typography.Text style={{ fontSize: '1rem', color: '#101828' }} strong>
Are you sure you want to delete this page?
</Typography.Text>
</Modal>
/> */}
{/* <Button
icon={<EditOutlined />}
disabled={!(actions.includes('admin') || actions.includes('update'))}
Expand Down
7 changes: 5 additions & 2 deletions studio/src/pages/posts/components/PostForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ function PostForm({ onCreate, data = {}, actions = {}, format, page = false }) {
}

const createTemplate = () => {
dispatch(addTemplate({ post_id: parseInt(data.id) })).then(() => history.push('/posts'));
dispatch(addTemplate({ post_id: parseInt(data.id) })).then(() => {
page ? history.push('/pages')
: history.push('/posts')
});
};
const setReadyFlag = () => {
status === 'ready' ? setStatus('draft') : setStatus('ready');
Expand Down Expand Up @@ -300,7 +303,7 @@ function PostForm({ onCreate, data = {}, actions = {}, format, page = false }) {
>
<Input.TextArea
bordered={false}
placeholder="Add title for the post"
placeholder={`Add title for the ${page ? "page" : "post"}`}
onChange={(e) => onTitleChange(e.target.value)}
style={{
fontSize: '2.5rem',
Expand Down
2 changes: 1 addition & 1 deletion studio/src/pages/tags/components/TagForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const TagForm = ({ onCreate, data = {} }) => {
<Col xs={24} md={10}>
<TitleInput
name="name"
label="Category Name"
label="Tag Name"
onChange={(e) => onTitleChange(e.target.value)}
/>
<SlugInput />
Expand Down

0 comments on commit f5fa2b9

Please sign in to comment.