Browse Source

Multiple minor improvements & fixes

develop
Ezerous 4 years ago
parent
commit
b4b5ff47bf
  1. 8
      README.md
  2. 8
      packages/concordia-app/src/assets/About.md
  3. 10
      packages/concordia-app/src/assets/css/index.css
  4. 8
      packages/concordia-app/src/components/PostCreate/index.jsx
  5. 11
      packages/concordia-app/src/components/PostCreate/styles.css
  6. 3
      packages/concordia-app/src/components/PostList/PostListRow/index.jsx
  7. 2
      packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/styles.css
  8. 3
      packages/concordia-app/src/views/Home/Board/index.jsx
  9. 5
      packages/concordia-app/src/views/Home/Board/styles.css
  10. 4
      packages/concordia-app/src/views/Profile/GeneralTab/EditInformationModal/index.jsx
  11. 8
      packages/concordia-app/src/views/Profile/GeneralTab/EditInformationModal/styles.css
  12. 1
      packages/concordia-app/src/views/Profile/GeneralTab/index.jsx
  13. 5
      packages/concordia-app/src/views/Profile/GeneralTab/styles.css
  14. 3
      packages/concordia-app/src/views/Profile/index.jsx
  15. 3
      packages/concordia-app/src/views/Profile/styles.css
  16. 5
      packages/concordia-app/src/views/Topic/TopicCreate/index.jsx
  17. 5
      packages/concordia-app/src/views/Topic/TopicCreate/styles.css

8
README.md

@ -4,28 +4,28 @@
## Setup ## Setup
```shell script ```shell script
cd apella cd concordia
yarn yarn
``` ```
## Compile contracts ## Compile contracts
```shell script ```shell script
cd packages/apella-contracts cd packages/concordia-contracts
yarn compile yarn compile
``` ```
## Run app ## Run app
```shell script ```shell script
cd packages/apella-app cd packages/concordia-app
yarn start yarn start
``` ```
## Build app ## Build app
```shell script ```shell script
cd packages/apella-app cd packages/concordia-app
yarn build yarn build
``` ```

8
packages/concordia-app/src/assets/About.md

@ -23,13 +23,13 @@ authentication that makes trusted, direct voting possible.
You can read more about the technological stack in Concordia's [whitepaper][concordia-whitepaper]. You can read more about the technological stack in Concordia's [whitepaper][concordia-whitepaper].
--- ---
Developed by [apostolof][devs-apostolof-profile], [ezerous][devs-ezerous-profile] Developed by [apostolof][devs-apostolof-profile], [ezerous][devs-ezerous-profile]
[concordia-repository]: https://gitlab.com/ecentrics/apella [concordia-repository]: https://gitlab.com/ecentrics/concordia
[concordia-docker-hub]: https://hub.docker.com/repository/docker/ecentrics/apella-app [concordia-docker-hub]: https://hub.docker.com/repository/docker/ecentrics/concordia-app
[concordia-license]: https://gitlab.com/ecentrics/apella/-/blob/master/LICENSE.md [concordia-license]: https://gitlab.com/ecentrics/concordia/-/blob/master/LICENSE.md
[devs-apostolof-profile]: https://gitlab.com/Apostolof [devs-apostolof-profile]: https://gitlab.com/Apostolof
[devs-ezerous-profile]: https://gitlab.com/Ezerous [devs-ezerous-profile]: https://gitlab.com/Ezerous
[concordia-whitepaper]: https://whitepaper.concordia.ecentrics.net [concordia-whitepaper]: https://whitepaper.concordia.ecentrics.net

10
packages/concordia-app/src/assets/css/index.css

@ -1,5 +1,6 @@
:root { :root {
--primary-color: #0B2540; --primary-color: #0B2540;
--primary-color-highlighted: #061A30;
--secondary-color: #EA6954; --secondary-color: #EA6954;
--secondary-color-highlighted: #DB5844; --secondary-color-highlighted: #DB5844;
} }
@ -26,3 +27,12 @@ div {
color: gray; color: gray;
font-style: italic; font-style: italic;
} }
.main-button{
color: white !important;
background-color: var(--secondary-color) !important;
}
.main-button:hover {
background-color: var(--secondary-color-highlighted) !important;
}

8
packages/concordia-app/src/components/PostCreate/index.jsx

@ -131,12 +131,12 @@ const PostCreate = (props) => {
/> />
</Form> </Form>
</Feed.Summary> </Feed.Summary>
<Feed.Meta id="post-button"> <Feed.Meta id="post-button-div">
<Feed.Like> <Feed.Like>
<Form.Button <Button
animated animated
type="button" type="button"
color="green" className="main-button"
disabled={posting || postContent === ''} disabled={posting || postContent === ''}
onClick={savePost} onClick={savePost}
> >
@ -146,7 +146,7 @@ const PostCreate = (props) => {
<Button.Content hidden> <Button.Content hidden>
<Icon name="send" /> <Icon name="send" />
</Button.Content> </Button.Content>
</Form.Button> </Button>
</Feed.Like> </Feed.Like>
</Feed.Meta> </Feed.Meta>
</Feed.Content> </Feed.Content>

11
packages/concordia-app/src/components/PostCreate/styles.css

@ -8,16 +8,11 @@
color: #fff !important; color: #fff !important;
} }
#post-button { #post-button-div {
float: right; float: right;
margin: 1rem 0; margin: 1rem 0 4rem 0;
} }
#post-button button { #post-button-div button {
margin: 0; margin: 0;
background-color: var(--secondary-color);
}
#post-button button:hover {
background-color: var(--secondary-color-highlighted);
} }

3
packages/concordia-app/src/components/PostList/PostListRow/index.jsx

@ -2,7 +2,7 @@ import React, {
memo, useEffect, useMemo, useState, useCallback, memo, useEffect, useMemo, useState, useCallback,
} from 'react'; } from 'react';
import { import {
Dimmer, Icon, Image, Feed, Placeholder, Ref, Dimmer, Feed, Placeholder, Ref,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
@ -14,7 +14,6 @@ import { breeze } from '../../../redux/store';
import './styles.css'; import './styles.css';
import { POSTS_DATABASE, USER_DATABASE } from '../../../constants/orbit/OrbitDatabases'; import { POSTS_DATABASE, USER_DATABASE } from '../../../constants/orbit/OrbitDatabases';
import determineKVAddress from '../../../utils/orbitUtils'; import determineKVAddress from '../../../utils/orbitUtils';
import { USER_PROFILE_PICTURE } from '../../../constants/orbit/UserDatabaseKeys';
import { POST_CONTENT } from '../../../constants/orbit/PostsDatabaseKeys'; import { POST_CONTENT } from '../../../constants/orbit/PostsDatabaseKeys';
import { FORUM_CONTRACT } from '../../../constants/contracts/ContractNames'; import { FORUM_CONTRACT } from '../../../constants/contracts/ContractNames';
import ProfileImage from '../../ProfileImage'; import ProfileImage from '../../ProfileImage';

2
packages/concordia-app/src/layouts/MainLayout/MainLayoutMenu/styles.css

@ -5,5 +5,5 @@
.ui.inverted.menu { .ui.inverted.menu {
background: var(--primary-color) !important; background: var(--primary-color) !important;
border-radius: 0; border-radius: 0;
margin-bottom: 2em; margin-bottom: 4rem;
} }

3
packages/concordia-app/src/views/Home/Board/index.jsx

@ -21,11 +21,12 @@ const Board = (props) => {
{hasSignedUp {hasSignedUp
? ( ? (
<Button <Button
id="new-topic-button"
className="main-button"
content="New Topic" content="New Topic"
icon="plus" icon="plus"
labelPosition="left" labelPosition="left"
positive positive
id="new-topic-button"
onClick={() => history.push('/topics/new')} onClick={() => history.push('/topics/new')}
/> />
) )

5
packages/concordia-app/src/views/Home/Board/styles.css

@ -6,9 +6,4 @@
#new-topic-button{ #new-topic-button{
float:right; float:right;
margin-bottom: 2em; margin-bottom: 2em;
background-color: var(--secondary-color);
}
#new-topic-button:hover {
background-color: var(--secondary-color-highlighted);
} }

4
packages/concordia-app/src/views/Profile/GeneralTab/EditInformationModal/index.jsx

@ -12,6 +12,7 @@ import { USER_DATABASE } from '../../../../constants/orbit/OrbitDatabases';
import { breeze, drizzle } from '../../../../redux/store'; import { breeze, drizzle } from '../../../../redux/store';
import UsernameSelector from '../../../../components/UsernameSelector'; import UsernameSelector from '../../../../components/UsernameSelector';
import { FORUM_CONTRACT } from '../../../../constants/contracts/ContractNames'; import { FORUM_CONTRACT } from '../../../../constants/contracts/ContractNames';
import './styles.css';
const { orbit: { stores } } = breeze; const { orbit: { stores } } = breeze;
const { contracts: { [FORUM_CONTRACT]: { methods: { updateUsername } } } } = drizzle; const { contracts: { [FORUM_CONTRACT]: { methods: { updateUsername } } } } = drizzle;
@ -197,10 +198,11 @@ const EditInformationModal = (props) => {
</Modal.Description> </Modal.Description>
</Modal.Content> </Modal.Content>
<Modal.Actions> <Modal.Actions>
<Button color="black" onClick={onCancel}> <Button id="cancel-button" onClick={onCancel}>
{t('edit.information.modal.form.cancel.button')} {t('edit.information.modal.form.cancel.button')}
</Button> </Button>
<Button <Button
className="main-button"
content={t('edit.information.modal.form.submit.button')} content={t('edit.information.modal.form.submit.button')}
labelPosition="right" labelPosition="right"
icon="checkmark" icon="checkmark"

8
packages/concordia-app/src/views/Profile/GeneralTab/EditInformationModal/styles.css

@ -0,0 +1,8 @@
#cancel-button {
color: white;
background-color: var(--primary-color);
}
#cancel-button:hover {
background-color: var(--primary-color-highlighted);
}

1
packages/concordia-app/src/views/Profile/GeneralTab/index.jsx

@ -173,6 +173,7 @@ const GeneralTab = (props) => {
<Table.HeaderCell colSpan="2"> <Table.HeaderCell colSpan="2">
<Button <Button
id="edit-info-button" id="edit-info-button"
className="main-button"
floated="right" floated="right"
icon icon
labelPosition="left" labelPosition="left"

5
packages/concordia-app/src/views/Profile/GeneralTab/styles.css

@ -4,9 +4,4 @@
#edit-info-button { #edit-info-button {
margin: 1rem; margin: 1rem;
background-color: var(--secondary-color);
}
#edit-info-button:hover {
background-color: var(--secondary-color-highlighted);
} }

3
packages/concordia-app/src/views/Profile/index.jsx

@ -12,6 +12,7 @@ import TopicList from '../../components/TopicList';
import PostList from '../../components/PostList'; import PostList from '../../components/PostList';
import GeneralTab from './GeneralTab'; import GeneralTab from './GeneralTab';
import { GENERAL_TAB, POSTS_TAB, TOPICS_TAB } from '../../constants/ProfileTabs'; import { GENERAL_TAB, POSTS_TAB, TOPICS_TAB } from '../../constants/ProfileTabs';
import './styles.css';
const { contracts: { [FORUM_CONTRACT]: { methods: { getUser } } } } = drizzle; const { contracts: { [FORUM_CONTRACT]: { methods: { getUser } } } } = drizzle;
@ -105,7 +106,7 @@ const Profile = () => {
}, [generalTab, loading, postsTab, t, topicsTab]); }, [generalTab, loading, postsTab, t, topicsTab]);
return useMemo(() => ( return useMemo(() => (
<Container id="home-container" textAlign="center"> <Container id="profile-container" textAlign="center">
<Tab panes={panes} /> <Tab panes={panes} />
</Container> </Container>
), [panes]); ), [panes]);

3
packages/concordia-app/src/views/Profile/styles.css

@ -0,0 +1,3 @@
#profile-container > div {
margin-bottom: 4rem;
}

5
packages/concordia-app/src/views/Topic/TopicCreate/index.jsx

@ -2,19 +2,19 @@ import React, {
useCallback, useEffect, useState, useCallback, useEffect, useState,
} from 'react'; } from 'react';
import { import {
Button, Container, Form, Icon, Input, TextArea, Button, Container, Form, Header, Icon, Input, TextArea,
} from 'semantic-ui-react'; } from 'semantic-ui-react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { useHistory } from 'react-router'; import { useHistory } from 'react-router';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import { drizzle, breeze } from '../../../redux/store'; import { drizzle, breeze } from '../../../redux/store';
import './styles.css';
import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../../constants/TransactionStatus'; import { TRANSACTION_ERROR, TRANSACTION_SUCCESS } from '../../../constants/TransactionStatus';
import { POSTS_DATABASE, TOPICS_DATABASE } from '../../../constants/orbit/OrbitDatabases'; import { POSTS_DATABASE, TOPICS_DATABASE } from '../../../constants/orbit/OrbitDatabases';
import { TOPIC_SUBJECT } from '../../../constants/orbit/TopicsDatabaseKeys'; import { TOPIC_SUBJECT } from '../../../constants/orbit/TopicsDatabaseKeys';
import { POST_CONTENT } from '../../../constants/orbit/PostsDatabaseKeys'; import { POST_CONTENT } from '../../../constants/orbit/PostsDatabaseKeys';
import { FORUM_CONTRACT } from '../../../constants/contracts/ContractNames'; import { FORUM_CONTRACT } from '../../../constants/contracts/ContractNames';
import { TOPIC_CREATED_EVENT } from '../../../constants/contracts/events/ForumContractEvents'; import { TOPIC_CREATED_EVENT } from '../../../constants/contracts/events/ForumContractEvents';
import './styles.css';
const { contracts: { [FORUM_CONTRACT]: { methods: { createTopic } } } } = drizzle; const { contracts: { [FORUM_CONTRACT]: { methods: { createTopic } } } } = drizzle;
const { orbit: { stores } } = breeze; const { orbit: { stores } } = breeze;
@ -97,6 +97,7 @@ const TopicCreate = (props) => {
return ( return (
<Container> <Container>
<Header id="new-topic-header">New Topic</Header>
<Form loading={posting}> <Form loading={posting}>
<Form.Field required> <Form.Field required>
<label htmlFor="form-topic-create-field-subject"> <label htmlFor="form-topic-create-field-subject">

5
packages/concordia-app/src/views/Topic/TopicCreate/styles.css

@ -1,3 +1,8 @@
#new-topic-header {
padding: 2rem;
text-align: center;
}
.form-textarea-required { .form-textarea-required {
color: rgb(159, 58, 56) !important; color: rgb(159, 58, 56) !important;
outline-color: rgb(159, 58, 56) !important; outline-color: rgb(159, 58, 56) !important;

Loading…
Cancel
Save