-
Notifications
You must be signed in to change notification settings - Fork 13
Add PillarDAO app #423
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
Open
zbcoding
wants to merge
3
commits into
pillarwallet:staging
Choose a base branch
from
zbcoding:add-pillardao-app
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add PillarDAO app #423
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,34 @@ | ||
| providers = ["node"] | ||
|
|
||
| # Global environment variables for low-memory builds/runtime | ||
| [variables] | ||
| NODE_ENV = "production" | ||
| NODE_OPTIONS = "--max-old-space-size=2048" | ||
| # Keep npm lean and quiet | ||
| NPM_CONFIG_FUND = "false" | ||
| NPM_CONFIG_AUDIT = "false" | ||
| CI = "true" | ||
|
|
||
| # Tools available in the image | ||
| [phases.setup] | ||
| nixPkgs = [ | ||
| "nodejs_20", # Correct Nix package name (underscore, not dash) | ||
| "caddy" # Lightweight static file server for runtime | ||
| ] | ||
|
|
||
| # Deterministic, memory-friendly install | ||
| [phases.install] | ||
| cmds = [ | ||
| # Use npm ci (respects package-lock), avoid extra network/audit noise | ||
| "npm ci --prefer-offline --no-audit --no-fund" | ||
| ] | ||
|
|
||
| # Build the static site (outputs to ./build via vite.config.mjs) | ||
| [phases.build] | ||
| cmds = [ | ||
| "npm run build" | ||
| ] | ||
|
|
||
| # Serve the built assets with Caddy (very low memory footprint) | ||
| [start] | ||
| cmd = "sh -c 'caddy file-server --root build --listen :${PORT:-3000}'" |
This file contains hidden or 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,67 @@ | ||
| import React, { useEffect, useState } from 'react'; | ||
| import { animated, useTrail } from '@react-spring/web'; | ||
| import styled from 'styled-components'; | ||
|
|
||
| type AnimatedTitleProps = { | ||
| text: string; | ||
| }; | ||
|
|
||
| const AnimatedTitle: React.FC<AnimatedTitleProps> = ({ text }) => { | ||
| const [isDisplaying, setIsDisplaying] = useState(true); | ||
| const letters = text.split(''); | ||
|
|
||
| const trail = useTrail(letters.length, { | ||
| from: { opacity: 0, transform: 'translateY(32px)' }, | ||
| to: { | ||
| opacity: isDisplaying ? 1 : 0, | ||
| transform: isDisplaying ? 'translateY(0px)' : 'translateY(32px)', | ||
| }, | ||
| config: { tension: 210, friction: 20, mass: 1, duration: 25 }, | ||
| }); | ||
|
|
||
| useEffect(() => { | ||
| const timeout = setTimeout(() => setIsDisplaying(false), 1250); | ||
| return () => clearTimeout(timeout); | ||
| }, []); | ||
|
|
||
| return ( | ||
| <Overlay> | ||
| <div className="title"> | ||
| {trail.map((styles, i) => ( | ||
| // eslint-disable-next-line react/no-array-index-key | ||
| <animated.span key={i} style={styles} className="letter"> | ||
| {letters[i] === ' ' ? '\u00A0' : letters[i]} | ||
| </animated.span> | ||
| ))} | ||
| </div> | ||
| </Overlay> | ||
| ); | ||
| }; | ||
|
|
||
| const Overlay = styled.div` | ||
| position: fixed; | ||
| inset: 0; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| background: ${({ theme }) => theme.color.background.body}; | ||
| z-index: 9999; | ||
|
|
||
| .title { | ||
| font-size: 48px; | ||
| font-weight: 800; | ||
| color: #fff; | ||
| } | ||
|
|
||
| .letter { | ||
| display: inline-block; | ||
| } | ||
|
|
||
| @media (max-width: 640px) { | ||
| .title { | ||
| font-size: 24px; | ||
| } | ||
| } | ||
| `; | ||
|
|
||
| export default AnimatedTitle; |
This file contains hidden or 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,87 @@ | ||
| import React from 'react'; | ||
| import styled from 'styled-components'; | ||
| import walletConnectImage from '../images/wallet-connect-example.png'; | ||
|
|
||
| type CopyHelpProps = { | ||
| imageSrc?: string; | ||
| overlayCollapsed?: string; | ||
| overlayExpanded?: string; | ||
| }; | ||
|
|
||
| // Displays the provided screenshot with an overlay arrow pointing at the copy icon | ||
| const CopyHelp: React.FC<CopyHelpProps> = ({ | ||
| imageSrc = walletConnectImage, | ||
| overlayCollapsed = 'How to copy the WC URI', | ||
| overlayExpanded = 'Tap to collapse', | ||
| }) => { | ||
| const [expanded, setExpanded] = React.useState(false); | ||
|
|
||
| return ( | ||
| <Container> | ||
| <Figure $expanded={expanded} onClick={() => setExpanded((v) => !v)}> | ||
| <Img src={imageSrc} alt="WalletConnect screenshot" $expanded={expanded} /> | ||
|
|
||
| {/* In-overlay toggle helper */} | ||
| <OverlayPill>{expanded ? overlayExpanded : overlayCollapsed}</OverlayPill> | ||
| </Figure> | ||
| </Container> | ||
| ); | ||
| }; | ||
|
|
||
| const Container = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 8px; | ||
| `; | ||
|
|
||
| const Figure = styled.div<{ $expanded: boolean }>` | ||
| position: relative; | ||
| display: inline-block; | ||
| width: auto; | ||
| height: ${({ $expanded }) => ($expanded ? 'auto' : '146px')}; | ||
| max-width: ${({ $expanded }) => ($expanded ? '640px' : '260px')}; | ||
| border-radius: 12px; | ||
| background: ${({ theme }) => theme.color.background.card}; | ||
| border: 1px solid ${({ theme }) => theme.color.border.alertOutline}; | ||
| cursor: pointer; | ||
| transition: max-width 0.2s ease-in-out, height 0.2s ease-in-out, transform 0.1s ease-in-out; | ||
| box-shadow: 0 4px 16px rgba(0,0,0,0.2); | ||
| overflow: hidden; /* keep overlays clipped to the figure */ | ||
|
|
||
| &:active { | ||
| transform: scale(0.995); | ||
| } | ||
| `; | ||
|
|
||
| const Img = styled.img<{ $expanded: boolean }>` | ||
| display: block; | ||
| width: ${({ $expanded }) => ($expanded ? '100%' : 'auto')}; | ||
| height: ${({ $expanded }) => ($expanded ? 'auto' : '100%')}; | ||
| object-fit: contain; /* ensure full image is visible */ | ||
| border-radius: 12px; | ||
| filter: ${({ $expanded }) => ($expanded ? 'none' : 'grayscale(100%)')}; | ||
| transition: filter 0.2s ease-in-out; | ||
| `; | ||
|
|
||
| /* Arrow and highlight intentionally removed per request */ | ||
|
|
||
| const OverlayPill = styled.div` | ||
| position: absolute; | ||
| left: 12px; | ||
| right: 12px; /* constrain within figure */ | ||
| bottom: 12px; | ||
| background: rgba(0, 0, 0, 0.6); | ||
| color: #fff; | ||
| padding: 4px 8px; | ||
| border-radius: 999px; | ||
| font-size: 10px; | ||
| font-weight: 600; | ||
| pointer-events: none; | ||
| white-space: nowrap; | ||
| max-width: calc(100% - 24px); | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| box-sizing: border-box; | ||
| `; | ||
|
|
||
| export default CopyHelp; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.