Add PGP key

This commit is contained in:
Saahil dutta 2024-07-11 09:44:03 -04:00
parent d25353407e
commit 527541d45b

View file

@ -1,11 +1,14 @@
import { SiDiscord, SiReplit } from 'react-icons/si' import { SiDiscord, SiReplit } from 'react-icons/si'
import {FaKey} from "react-icons/fa"
import Icon from '../static/Icons' import Icon from '../static/Icons'
import { git, npm } from '../static/icons_list' import { git, npm } from '../static/icons_list'
import bento from '../../assets/bento.svg' import bento from '../../assets/bento.svg'
import tor from '../../assets/tor.svg' import tor from '../../assets/tor.svg'
import './index.css' import './index.css'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { LuGlobe } from 'react-icons/lu' import { LuGlobe, LuKey } from 'react-icons/lu'
const isDev = process.env.NODE_ENV !== "production"
type DiscordStatus = "dnd" | "idle" | "online" | "offline" type DiscordStatus = "dnd" | "idle" | "online" | "offline"
type Data = { type Data = {
discord_status: DiscordStatus, discord_status: DiscordStatus,
@ -36,6 +39,7 @@ break;
} }
export default function Footer () { export default function Footer () {
const [lanyardData, setData] = useState<null | Data>(null) const [lanyardData, setData] = useState<null | Data>(null)
const [fingerprint, setFingerprint] = useState<string | null>(null)
useEffect(() => { useEffect(() => {
const signal = new AbortController() const signal = new AbortController()
if(!lanyardData) { if(!lanyardData) {
@ -46,6 +50,13 @@ export default function Footer () {
} }
}) })
} }
if(!fingerprint) {
if(isDev) {
setFingerprint("FDE9 95C2 8C7E E563")
} else {
fetch('http://saahild.com/creds/fingerprint.txt').then(r=>r.text()).then(d => setFingerprint(d))
}
}
// return () => signal.abort() // return () => signal.abort()
}) })
return <> return <>
@ -58,6 +69,7 @@ export default function Footer () {
</aside> </aside>
<nav className='grid-flow-col gap-4 md:place-self-center md:justify-self-end flex'> <nav className='grid-flow-col gap-4 md:place-self-center md:justify-self-end flex'>
<a href="http://saahild.com/creds/public.pgp.txt"><div className="badge mauve p-2" style={{ background: "var(--surface1)" }}><FaKey style={{marginRight: "5px"}}/>{" "}{fingerprint}</div></a>
<a href='https://github.com/NeonGamerBot-QK' target='_blank'><Icon icon={git} /></a> <a href='https://github.com/NeonGamerBot-QK' target='_blank'><Icon icon={git} /></a>
<a href='https://www.npmjs.com/~neongamerbot' target='_blank'><Icon icon={npm} /></a> <a href='https://www.npmjs.com/~neongamerbot' target='_blank'><Icon icon={npm} /></a>
<div className='inline-flex gap-2 bottom mt-1'> <div className='inline-flex gap-2 bottom mt-1'>