-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix href * Profile Page * Try to fix all VM requires * Replace all VM.require fallbacks to correct object * Use correct fallback for DaoSDK * Remove pinned comment as it is duplicate of bio * Events monthly view and create modal * Add filter modal * wip: data fetch and create * Comments * fix: events query * Fetch events and list events * Filters * Change filter button names * Border radius * Revert "Border radius" * Login/Onboarding flow update (#125) * updated navbar, deleted join page * Clean up (#121) * Fix post colors to match figma * Add stroke to compose for more coherent UI * Profile in progress, some fixes * rename * fix href * Fix post colors to match figma * Add stroke to compose for more coherent UI * Profile in progress, some fixes * rename * fix href * Profile Page * Style updates * Style updates to profile page * Fix projects page * Fix projects page * Clear compose draft when post * Resolve comments * Fix more hrefs * Change more href * Remove layout loading text * Try to fix all VM requires * Fix flashes on home page * Replace all VM.require fallbacks to correct object * Run prettier * Use correct fallback for DaoSDK * Remove un needed tag from compose * Fix compose rerender on commit * Remove unneeded css --------- Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com> * added onboarding flow screens * finish setup * rename files * minor bug fix * add following logic * fix the visibility issue * suggestive changes --------- Co-authored-by: Elliot Braem <16282460+elliotBraem@users.noreply.github.com> Co-authored-by: Zeeshan Ahmad <itexpert120@outlook.com> * rename fetchEvents to fetchThings * Fix clear filter not clearing date * Rename image upload widget * Convert hashtags into component * Replace events with things in everything sdk * Add location, organizer, and link to list view * Replace test with every * Fix Bullet component in Join section --------- Co-authored-by: Elliot Braem <16282460+elliotBraem@users.noreply.github.com> Co-authored-by: Megha-Dev-19 <100185149+Megha-Dev-19@users.noreply.github.com>
- Loading branch information
1 parent
fca5aba
commit 9df9df2
Showing
20 changed files
with
1,408 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const StyledHashtag = styled.span` | ||
display: flex; | ||
padding: 4px 8px; | ||
justify-content: center; | ||
align-items: center; | ||
align-content: center; | ||
gap: 4px; | ||
flex-wrap: wrap; | ||
border-radius: 2px; | ||
border: 1px solid var(--Yellow, #ffaf51); | ||
color: var(--White-100, #fff); | ||
/* Body/10px */ | ||
font-size: 12px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; | ||
.tag { | ||
color: var(--Yellow, #ffaf51); | ||
} | ||
`; | ||
const Hashtag = ({ children }) => { | ||
return ( | ||
<StyledHashtag> | ||
<span className="tag">#</span> {children} | ||
</StyledHashtag> | ||
); | ||
}; | ||
|
||
return { Hashtag }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
const image = props.image; | ||
const onChange = props.onChange; | ||
|
||
const Tab = { | ||
Upload: "Upload", | ||
NFT: "NFT", | ||
URL: "URL", | ||
}; | ||
|
||
const origTab = () => | ||
image.nft.contractId || image.nft.tokenId | ||
? Tab.NFT | ||
: !image.ipfs_cid && image.url | ||
? Tab.URL | ||
: Tab.Upload; | ||
|
||
State.init({ | ||
origImage: image, | ||
tab: origTab(), | ||
url: image.url, | ||
nft: image.nft ?? {}, | ||
img: { cid: image.ipfs_cid }, | ||
}); | ||
|
||
const setTab = (tab) => State.update({ tab }); | ||
|
||
if (JSON.stringify(image) !== JSON.stringify(state.image)) { | ||
State.update({ | ||
image, | ||
}); | ||
} | ||
|
||
let localImage = {}; | ||
|
||
if (state.origImage.nft.contractId || state.origImage.nft.tokenId) { | ||
localImage.nft = {}; | ||
if (state.origImage.nft.contractId) { | ||
localImage.nft.contractId = null; | ||
} | ||
if (state.origImage.nft.tokenId) { | ||
localImage.nft.tokenId = null; | ||
} | ||
} | ||
if (state.origImage.ipfs_cid) { | ||
localImage.ipfs_cid = null; | ||
} | ||
if (state.origImage.url) { | ||
localImage.url = null; | ||
} | ||
|
||
if (state.tab === Tab.NFT && (state.nft.contractId || state.nft.tokenId)) { | ||
localImage.nft = { | ||
contractId: state.nft.contractId || "", | ||
tokenId: state.nft.tokenId || "", | ||
}; | ||
} else if (state.tab === Tab.Upload && state.img.cid) { | ||
localImage.ipfs_cid = state.img.cid; | ||
} | ||
if (state.tab === Tab.URL && state.url) { | ||
localImage.url = state.url; | ||
} | ||
|
||
if (onChange && JSON.stringify(image) !== JSON.stringify(localImage)) { | ||
onChange(localImage); | ||
} | ||
|
||
const debounce = (func, wait) => { | ||
const pause = wait || 350; | ||
let timeout; | ||
|
||
return (args) => { | ||
const later = () => { | ||
clearTimeout(timeout); | ||
func(args); | ||
}; | ||
|
||
clearTimeout(timeout); | ||
timeout = setTimeout(later, pause); | ||
}; | ||
}; | ||
|
||
const onNFTChange = debounce((e) => { | ||
State.update({ | ||
nft: { | ||
...state.nft, | ||
[e.target.id]: e.target.value, | ||
}, | ||
}); | ||
}); | ||
const onImageChange = debounce((e) => { | ||
State.update({ | ||
[e.target.id]: e.target.value, | ||
}); | ||
}); | ||
|
||
return ( | ||
<div> | ||
<ul className={`nav nav-tabs`}> | ||
<li className="nav-item"> | ||
<button | ||
className={`nav-link ${state.tab === Tab.Upload ? "active" : ""}`} | ||
aria-current="page" | ||
onClick={() => setTab(Tab.Upload)} | ||
> | ||
Upload | ||
</button> | ||
</li> | ||
<li className="nav-item"> | ||
<button | ||
className={`nav-link ${state.tab === Tab.NFT ? "active" : ""}`} | ||
aria-current="page" | ||
onClick={() => setTab(Tab.NFT)} | ||
> | ||
NFT | ||
</button> | ||
</li> | ||
<li className="nav-item"> | ||
<button | ||
className={`nav-link ${state.tab === Tab.URL ? "active" : ""}`} | ||
aria-current="page" | ||
onClick={() => setTab(Tab.URL)} | ||
> | ||
URL | ||
</button> | ||
</li> | ||
</ul> | ||
<div className="p-2"> | ||
<div className={`${state.tab === Tab.Upload ? "" : "visually-hidden"}`}> | ||
<IpfsImageUpload image={state.img} /> | ||
</div> | ||
<div className={`${state.tab === Tab.NFT ? "" : "visually-hidden"}`}> | ||
NFT contract | ||
<input | ||
type="text" | ||
id="contractId" | ||
defaultValue={state.nft.contractId} | ||
onChange={onNFTChange} | ||
/> | ||
NFT token id | ||
<input | ||
type="text" | ||
id="tokenId" | ||
defaultValue={state.nft.tokenId} | ||
onChange={onNFTChange} | ||
/> | ||
</div> | ||
<div className={`${state.tab === Tab.URL ? "" : "visually-hidden"}`}> | ||
Image URL | ||
<input | ||
type="text" | ||
id="url" | ||
defaultValue={state.url} | ||
onChange={onImageChange} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.