chore: remove nostrplebs/nests #437

Closed
v0l wants to merge 1 commits from remove-nostrplebs into main
6 changed files with 2 additions and 50 deletions

View File

@ -155,11 +155,6 @@ export const TwitchRegex = /twitch.tv\/([a-z0-9_]+$)/i;
export const AppleMusicRegex = export const AppleMusicRegex =
/music\.apple\.com\/([a-z]{2}\/)?(?:album|playlist)\/[\w\d-]+\/([.a-zA-Z0-9-]+)(?:\?i=\d+)?/i; /music\.apple\.com\/([a-z]{2}\/)?(?:album|playlist)\/[\w\d-]+\/([.a-zA-Z0-9-]+)(?:\?i=\d+)?/i;
/**
* Nostr Nests embed regex
*/
export const NostrNestsRegex = /nostrnests\.com\/[a-zA-Z0-9]+/i;
/* /*
* Magnet link parser * Magnet link parser
*/ */

View File

@ -14,7 +14,6 @@ import {
SpotifyRegex, SpotifyRegex,
TwitchRegex, TwitchRegex,
AppleMusicRegex, AppleMusicRegex,
NostrNestsRegex,
WavlakeRegex, WavlakeRegex,
} from "Const"; } from "Const";
import { RootState } from "State/Store"; import { RootState } from "State/Store";
@ -25,7 +24,6 @@ import TidalEmbed from "Element/TidalEmbed";
import { ProxyImg } from "Element/ProxyImg"; import { ProxyImg } from "Element/ProxyImg";
import TwitchEmbed from "Element/TwitchEmbed"; import TwitchEmbed from "Element/TwitchEmbed";
import AppleMusicEmbed from "Element/AppleMusicEmbed"; import AppleMusicEmbed from "Element/AppleMusicEmbed";
import NostrNestsEmbed from "Element/NostrNestsEmbed";
import WavlakeEmbed from "Element/WavlakeEmbed"; import WavlakeEmbed from "Element/WavlakeEmbed";
export default function HyperText({ link, creator }: { link: string; creator: HexKey }) { export default function HyperText({ link, creator }: { link: string; creator: HexKey }) {
@ -71,7 +69,6 @@ export default function HyperText({ link, creator }: { link: string; creator: He
const isSpotifyLink = SpotifyRegex.test(a); const isSpotifyLink = SpotifyRegex.test(a);
const isTwitchLink = TwitchRegex.test(a); const isTwitchLink = TwitchRegex.test(a);
const isAppleMusicLink = AppleMusicRegex.test(a); const isAppleMusicLink = AppleMusicRegex.test(a);
const isNostrNestsLink = NostrNestsRegex.test(a);
const isWavlakeLink = WavlakeRegex.test(a); const isWavlakeLink = WavlakeRegex.test(a);
const extension = FileExtensionRegex.test(url.pathname.toLowerCase()) && RegExp.$1; const extension = FileExtensionRegex.test(url.pathname.toLowerCase()) && RegExp.$1;
if (extension && !isAppleMusicLink) { if (extension && !isAppleMusicLink) {
@ -140,13 +137,6 @@ export default function HyperText({ link, creator }: { link: string; creator: He
return <TwitchEmbed link={a} />; return <TwitchEmbed link={a} />;
} else if (isAppleMusicLink) { } else if (isAppleMusicLink) {
return <AppleMusicEmbed link={a} />; return <AppleMusicEmbed link={a} />;
} else if (isNostrNestsLink) {
return [
<a href={a} onClick={e => e.stopPropagation()} target="_blank" rel="noreferrer" className="ext">
{a}
</a>,
<NostrNestsEmbed link={a} />,
];
} else if (isWavlakeLink) { } else if (isWavlakeLink) {
return <WavlakeEmbed link={a} />; return <WavlakeEmbed link={a} />;
} else { } else {

View File

@ -22,27 +22,6 @@
background-image: var(--strike-army-gradient); background-image: var(--strike-army-gradient);
} }
.nip05 .domain[data-domain="nostrplebs.com"] {
color: var(--highlight);
background-color: var(--highlight);
}
.nip05 .domain[data-domain="nostrpurple.com"] {
color: var(--highlight);
background-color: var(--highlight);
}
.nip05 .domain[data-domain="nostr.fan"] {
color: var(--highlight);
background-color: var(--highlight);
}
.nip05 .domain[data-domain="nostriches.net"] {
color: var(--highlight);
background-color: var(--highlight);
text-overflow: ellipsis;
}
.nip05 .badge { .nip05 .badge {
color: var(--highlight); color: var(--highlight);
margin-left: 0.2em; margin-left: 0.2em;

View File

@ -1,5 +0,0 @@
const NostrNestsEmbed = ({ link }: { link: string }) => (
<iframe src={link} allow="microphone" width="480" height="680" style={{ maxHeight: 680 }}></iframe>
);
export default NostrNestsEmbed;

View File

@ -1,11 +1,11 @@
import "./ProfilePreview.css"; import "./ProfilePreview.css";
import { ReactNode } from "react"; import { ReactNode } from "react";
import { useInView } from "react-intersection-observer";
import { HexKey } from "@snort/nostr";
import ProfileImage from "Element/ProfileImage"; import ProfileImage from "Element/ProfileImage";
import FollowButton from "Element/FollowButton"; import FollowButton from "Element/FollowButton";
import { useUserProfile } from "Hooks/useUserProfile"; import { useUserProfile } from "Hooks/useUserProfile";
import { HexKey } from "@snort/nostr";
import { useInView } from "react-intersection-observer";
export interface ProfilePreviewProps { export interface ProfilePreviewProps {
pubkey: HexKey; pubkey: HexKey;

View File

@ -15,13 +15,6 @@ export const services = [
supportLink: "https://snort.social/help", supportLink: "https://snort.social/help",
about: <FormattedMessage {...messages.SnortSocialNip} />, about: <FormattedMessage {...messages.SnortSocialNip} />,
}, },
{
name: "Nostr Plebs",
service: "https://nostrplebs.com/api/v1",
link: "https://nostrplebs.com/",
supportLink: "https://nostrplebs.com/manage",
about: <FormattedMessage {...messages.NostrPlebsNip} />,
},
]; ];
export default function VerificationPage() { export default function VerificationPage() {