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

Refine organization tab #923

Merged
merged 5 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/app/src/components/common/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const B = styled(EuiButton)`
font-weight: bold;
border: none;
font-weight: 500;
font-size: 15px;
font-size: 14px;
line-height: 18px;
display: flex;
align-items: center;
Expand Down
8 changes: 7 additions & 1 deletion frontend/app/src/config/commonColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ export const commonColors = {
},
success: {
background: '#49C998',
color: '#fff'
color: '#fff',
boxShadow: '0px 2px 10px 0px rgba(73, 201, 152, 0.50)'
},
withdraw: {
background: '#9157F6',
color: '#fff',
boxShadow: '0px 2px 10px 0px rgba(145, 87, 246, 0.50)'
},
white: {
background: '#fff',
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/src/people/widgetViews/AboutView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export const AboutView = observer((props: AboutViewProps) => {

<Divider />
<Row>
<div>Price to Connect:</div>
<div>Price to Join:</div>
kevkevinpal marked this conversation as resolved.
Show resolved Hide resolved
<div style={{ fontWeight: 'bold', color: '#000' }}>{price_to_meet}</div>
</Row>

Expand Down
20 changes: 11 additions & 9 deletions frontend/app/src/people/widgetViews/OrganizationDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import WithdrawBudgetModal from './organization/WithdrawBudgetModal';
import {
ActionWrap,
Budget,
BudgetSmall,
BudgetSmallHead,
BudgetWrap,
Container,
Expand All @@ -44,7 +43,8 @@ import {
UsersHeadWrap,
UsersHeader,
UsersList,
ViewBudgetWrap
ViewBudgetWrap,
ViewBudgetTextWrap
} from './organization/style';

let interval;
Expand Down Expand Up @@ -364,11 +364,13 @@ const OrganizationDetails = (props: { close: () => void; org: Organization | und
</NoBudgetWrap>
) : (
<ViewBudgetWrap>
<BudgetSmallHead>YOUR BALANCE</BudgetSmallHead>
<Budget>
{orgBudget.toLocaleString()} <Grey>SATS</Grey>
</Budget>
<BudgetSmall>{satToUsd(orgBudget)} USD</BudgetSmall>
<BudgetSmallHead>YOUR BALANCE</BudgetSmallHead>
<ViewBudgetTextWrap>
<Budget>
{orgBudget.toLocaleString()} <Grey>SATS</Grey>
</Budget>
<Budget className="budget-small">{satToUsd(orgBudget)} <Grey>USD</Grey></Budget>
</ViewBudgetTextWrap>
</ViewBudgetWrap>
)}
</BudgetWrap>
Expand All @@ -383,14 +385,14 @@ const OrganizationDetails = (props: { close: () => void; org: Organization | und
<Button
disabled={addWithdrawDisabled}
text="Withdraw"
color="white"
color="withdraw"
kevkevinpal marked this conversation as resolved.
Show resolved Hide resolved
style={{ borderRadius: '5px' }}
onClick={() => setIsOpenWithdrawBudget(true)}
/>
<Button
disabled={addBudgetDisabled}
text="Deposit"
color="white"
color="success"
kevkevinpal marked this conversation as resolved.
Show resolved Hide resolved
style={{ borderRadius: '5px' }}
onClick={() => setIsOpenBudget(true)}
/>
Expand Down
9 changes: 7 additions & 2 deletions frontend/app/src/people/widgetViews/OrganizationView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ const Container = styled.div`
min-width: 100%;
min-height: 100%;
flex: 1 1 100%;
margin: -20px -30px;

.organizations {
padding: 20px 30px;
}
`;

const OrganizationWrap = styled.div`
Expand Down Expand Up @@ -232,7 +237,7 @@ const Organizations = (props: { person: Person }) => {
const renderOrganizations = () => {
if (main.organizations.length) {
return (
<>
<div className="organizations">
<OrgHeadWrap>
<OrgText>Organizations</OrgText>
{isMyProfile && (
Expand All @@ -248,7 +253,7 @@ const Organizations = (props: { person: Person }) => {
<OrganizationContainer>
{main.organizations.map((org: Organization, i: number) => orgUi(org, i))}
</OrganizationContainer>
</>
</div>
);
} else {
return (
Expand Down
69 changes: 49 additions & 20 deletions frontend/app/src/people/widgetViews/organization/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@ export const Container = styled.div`
width: 100%;
min-height: 100%;
background: white;
padding: 20px 0px;
padding-top: 0px;
z-index: 100;
`;

export const HeadWrap = styled.div`
display: flex;
align-items: center;
padding: 25px 40px;
padding: 25px 10px;
padding-right: 40px;
border-bottom: 1px solid #ebedef;
@media only screen and (max-width: 800px) {
padding: 15px 0px;
Expand All @@ -66,6 +65,7 @@ export const HeadWrap = styled.div`
padding-bottom: 15px;
flex-direction: column;
align-items: start;
padding: 20px 30px;
}
`;

Expand Down Expand Up @@ -99,7 +99,8 @@ export const OrgImg = styled.img`
export const OrgName = styled.h3`
padding: 0px;
margin: 0px;
font-size: 1.3rem;
font-size: 1.5rem;
color: #3C3F41;
margin-left: 25px;
font-weight: 700;
margin-left: 20px;
Expand Down Expand Up @@ -131,6 +132,8 @@ export const HeadButtonWrap = styled.div<{ forSmallScreen: boolean }>`
margin-left: 0px;
width: 100vw;
margin-left: ${(p: any) => (p.forSmallScreen ? '50px' : '0px')};
flex-wrap: wrap;
display: flex;
}
@media only screen and (max-width: 470px) {
gap: 6px;
Expand All @@ -140,27 +143,27 @@ export const HeadButtonWrap = styled.div<{ forSmallScreen: boolean }>`
export const DetailsWrap = styled.div`
width: 100%;
min-height: 100%;
margin-top: 17px;
padding: 0px 20px;
`;

export const ActionWrap = styled.div`
display: flex;
align-items: center;
padding: 25px 40px;
padding-right: 40px;
border-bottom: 1px solid #ebedef;
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.15);
@media only screen and (max-width: 700px) {
padding: 25px 0px;
}
@media only screen and (max-width: 500px) {
flex-direction: column;
width: 100%;
padding: 25px 0px;
padding: 20px 30px;
}
`;

export const BudgetWrap = styled.div`
padding: 25px 40px;
padding: 25px 60px;
width: 55%;
display: flex;
flex-direction: column;
Expand All @@ -171,6 +174,7 @@ export const BudgetWrap = styled.div`
@media only screen and (max-width: 500px) {
width: 100%;
padding: 20px 0px;
padding-top: 0;
}
`;

Expand All @@ -188,6 +192,13 @@ export const ViewBudgetWrap = styled.div`
width: 100%;
`;

export const ViewBudgetTextWrap = styled.div`
display: flex;
width: 100%;
align-items: center;
margin-top: 12px;
`;

export const BudgetSmall = styled.h6`
padding: 0px;
font-size: 0.8rem;
Expand All @@ -199,20 +210,30 @@ export const BudgetSmall = styled.h6`

export const BudgetSmallHead = styled.h6`
padding: 0px;
font-size: 0.7rem;
font-size: 0.625rem;
color: #8e969c;
margin: 0;
`;

export const Budget = styled.h4`
color: #3c3f41;
font-size: 1.15rem;
color: #3C3F41;
font-size: 1.0625rem;
font-weight: 600;

&.budget-small {
border-left: 1px solid #EBEDEF;
padding-left: 22px;
margin-left: 22px;
}

@media only screen and (max-width: 500px) {
font-size: 1rem;
}
`;

export const Grey = styled.span`
color: #8e969c;
font-weight: 400;
`;

export const NoBudgetText = styled.p`
Expand All @@ -227,7 +248,7 @@ export const NoBudgetText = styled.p`
export const UserWrap = styled.div`
display: flex;
flex-direction: column;
padding: 25px 40px;
background-color: rgb(240, 241, 243);
@media only screen and (max-width: 700px) {
width: 100%;
padding: 20px 0px;
Expand All @@ -241,28 +262,36 @@ export const UsersHeadWrap = styled.div`
display: flex;
align-items: center;
width: 100%;
border-bottom: 1px solid #ebedef;
padding-top: 5px;
padding-bottom: 20px;
padding: 20px 60px;
padding-right: 40px;
border-bottom: 1px solid #DDE1E5;
@media only screen and (max-width: 500px) {
width: 100%;
padding: 0 30px;
padding-bottom: 20px;
}
`;

export const UsersHeader = styled.h4`
font-size: 0.9rem;
font-weight: 600;
font-size: 0.8125rem;
font-weight: 700;
padding: 0;
margin: 0;
color: #3C3F41;
@media only screen and (max-width: 500px) {
font-size: 0.8rem;
margin-right: 55%;
}
`;

export const UsersList = styled.div`
padding: 0 60px;
padding-right: 40px;
border-bottom: 1px solid #DDE1E5;

@media only screen and (max-width: 500px) {
width: 100%;
padding: 0 30px;
}
`;

Expand All @@ -285,7 +314,6 @@ export const User = styled.div`

export const UserDetails = styled.div`
display: flex;
flex-gap: 12px;
flex-direction: column;
margin-left: 2%;
width: 30%;
Expand All @@ -298,13 +326,14 @@ export const UserDetails = styled.div`
export const UserName = styled.p`
padding: 0px;
margin: 0px;
font-size: 0.9rem;
font-size: 0.9375rem;
text-transform: capitalize;
font-weight: bold;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
color: #3C3F41;
`;

export const UserPubkey = styled.p`
Expand Down