-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from TorMap/feature/nicknames
Feature/nicknames
- Loading branch information
Showing
7 changed files
with
187 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# The URL pointing to the backend instance (e.g. http://localhost:8080/) | ||
VITE_BACKEND_API_URL=https://api.tormap.org | ||
VITE_BACKEND_API_URL=https://api.tormap.org | ||
VITE_NOWPAYMENTS_API_KEY=BZ1BNEC-VDS47WP-PQB7G6F-9WTFHP8 | ||
VITE_DONATION_BITCOIN_ADDRESS=bc1qkpwf376p75uyhqna87p22lt2t9zm99qflz39y3 |
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,51 @@ | ||
import React from 'react'; | ||
import Card from '@mui/material/Card'; | ||
import CardActions from '@mui/material/CardActions'; | ||
import CardContent from '@mui/material/CardContent'; | ||
import Button from '@mui/material/Button'; | ||
import Typography from '@mui/material/Typography'; | ||
import IconButton from '@mui/material/IconButton'; | ||
import ContentCopyIcon from '@mui/icons-material/ContentCopy'; | ||
import LightningIcon from '@mui/icons-material/FlashOn'; | ||
import WalletIcon from '@mui/icons-material/Wallet'; | ||
import {Stack} from '@mui/material'; | ||
|
||
export default function BitcoinCard() { | ||
const bitcoinAddress = import.meta.env.VITE_DONATION_BITCOIN_ADDRESS | ||
|
||
const handleCopyAddress = () => { | ||
navigator.clipboard.writeText(bitcoinAddress); | ||
}; | ||
|
||
const openInWallet = () => { | ||
window.open(`bitcoin:${bitcoinAddress}`, '_blank'); | ||
}; | ||
|
||
return ( | ||
<Card sx={{margin: 'auto', mt: 5, height: 128}}> | ||
<CardContent sx={{paddingBottom: '0'}}> | ||
<Typography gutterBottom variant="subtitle1" component="div"> | ||
Bitcoin | ||
</Typography> | ||
<Stack direction="row"> | ||
<Typography variant="body2" color="text.secondary"> | ||
{bitcoinAddress} | ||
</Typography> | ||
<IconButton size="small" aria-label="copy address" onClick={handleCopyAddress}> | ||
<ContentCopyIcon fontSize="small"/> | ||
</IconButton> | ||
</Stack> | ||
</CardContent> | ||
<CardActions> | ||
<Button size="small" startIcon={<WalletIcon/>} onClick={openInWallet}> | ||
Open Wallet | ||
</Button> | ||
<a href="https://tippin.me/@TorMapOrg" target="_blank" rel="noreferrer noopener"> | ||
<Button size="small" startIcon={<LightningIcon/>}> | ||
Lightning | ||
</Button> | ||
</a> | ||
</CardActions> | ||
</Card> | ||
); | ||
} |
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 |
---|---|---|
|
@@ -22,8 +22,11 @@ import { | |
import React, {useState} from "react"; | ||
|
||
import {ContributorCard} from "../card/ContributorCard"; | ||
import {BitcoinIcon} from "../icons/BitcoinIcon"; | ||
import {ExternalLink} from "../link/ExternalLink"; | ||
import BitcoinCard from "../card/BitcoinCard"; | ||
import CardContent from "@mui/material/CardContent"; | ||
import LaunchIcon from "@mui/icons-material/Launch"; | ||
import Card from "@mui/material/Card"; | ||
|
||
/** | ||
* A component for displaying information about TorMap | ||
|
@@ -35,6 +38,8 @@ export const AboutInformation: React.FunctionComponent = () => { | |
// App context | ||
const theme = useTheme() | ||
const isLargeScreen = useMediaQuery(theme.breakpoints.up("lg")) | ||
const nowpaymentsApiKey = import.meta.env.VITE_NOWPAYMENTS_API_KEY | ||
const nowpaymentsDonationUrl = `https://nowpayments.io/donation?api_key=${nowpaymentsApiKey}&source=lk_donation&medium=referral` | ||
|
||
return ( | ||
<> | ||
|
@@ -70,10 +75,6 @@ export const AboutInformation: React.FunctionComponent = () => { | |
<Grid item> | ||
<ExternalLink sx={{color: "white"}} href={"mailto:[email protected]"} label={<EmailIcon/>}/> | ||
</Grid> | ||
<Grid item> | ||
<ExternalLink sx={{color: "white"}} href={"https://tippin.me/@TorMapOrg"} | ||
label={<BitcoinIcon/>}/> | ||
</Grid> | ||
</Grid> | ||
<IconButton aria-label="close" sx={{ | ||
position: "absolute", | ||
|
@@ -91,9 +92,9 @@ export const AboutInformation: React.FunctionComponent = () => { | |
TorMap is a world map displaying approximate locations where Tor relays are being hosted. | ||
You can group, filter and analyze thousands of Tor relays, which route anonymous internet | ||
traffic daily. The historic state of the network can be viewed for any day between October 2007 | ||
and today.<br/> We developed TorMap for our practical P4-Project at the <ExternalLink | ||
and today.<br/> Initially TorMap was developed by us at the <ExternalLink | ||
href={"https://www.tu-darmstadt.de/"} label={"Technical University of Darmstadt"}/> as part of | ||
the <ExternalLink href={"https://panda-projekt.de/"} label={"PANDA project"}/>. It was | ||
the <ExternalLink href={"https://panda-projekt.de/"} label={"PANDA project"}/>. The project was | ||
supervised | ||
by <ExternalLink href={"mailto:[email protected]"} | ||
label={"Florian Platzer"}/> from <ExternalLink | ||
|
@@ -141,6 +142,31 @@ export const AboutInformation: React.FunctionComponent = () => { | |
roles={["Server Admin"]} | ||
/> | ||
</Stack> | ||
<h2>Donations</h2> | ||
<Typography variant={"body1"} gutterBottom> | ||
If you like our project and want to support us, you can donate to us via Bitcoin or other | ||
cryptocurrencies. Your donation helps us to cover server costs and keep the project running. | ||
</Typography> | ||
<Stack | ||
direction={{sm: 'column', md: 'row'}} | ||
justifyContent="flex-start" | ||
alignItems="flex-start" | ||
spacing={{xs: 3, sm: 3}} | ||
> | ||
<BitcoinCard/> | ||
<Card sx={{margin: 'auto', mt: 5, height: 128}}> | ||
<CardContent sx={{paddingBottom: '0'}}> | ||
<Typography gutterBottom variant="subtitle1" component="div"> | ||
Other cryptocurrencies | ||
</Typography> | ||
<a href={nowpaymentsDonationUrl} target="_blank" rel="noreferrer noopener"> | ||
<Button size="small" startIcon={<LaunchIcon/>}> | ||
Donate via NOWPayments | ||
</Button> | ||
</a> | ||
</CardContent> | ||
</Card> | ||
</Stack> | ||
<Divider sx={{my: 2}}/> | ||
<Typography variant={"body2"}> | ||
We use IP geolocation data by <ExternalLink href={"https://db-ip.com"} | ||
|
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