Clean manifold names and update discord invite and improve email notifs

This commit is contained in:
MartinBraquet
2025-09-01 17:30:45 +02:00
parent 23c8f175bb
commit f6c895fe78
16 changed files with 39 additions and 56 deletions

View File

@@ -24,7 +24,7 @@ export const createLover: APIHandler<'create-lover'> = async (body, auth) => {
const user = await getUser(auth.uid)
if (!user) throw new APIError(401, 'Your account was not found')
if (user.createdTime > Date.now() - HOUR_MS) {
// If they just signed up for manifold via manifold.love, set their avatar to be their pinned photo
// If they just signed up, set their avatar to be their pinned photo
updateUser(pg, auth.uid, { avatarUrl: body.pinned_url })
}

View File

@@ -10,7 +10,6 @@ export const sinclairUser: User = {
avatarUrl:
'https://firebasestorage.googleapis.com/v0/b/mantic-markets.appspot.com/o/user-images%2FSinclair%2FbqSXdzkn1z.JPG?alt=media&token=7779230a-9f5d-42b5-839f-fbdfef31a3ac',
idVerified: true,
// fromManifold: true,
discordHandle: 'sinclaether#5570',
twitterHandle: 'singularitttt',
verifiedPhone: true,

View File

@@ -39,14 +39,14 @@ export const NewEndorsementEmail = ({
<Preview>New endorsement from {fromUser.name}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={logoContainer}>
<Img
src="https://manifold.love/manifold-love-banner.png"
width="550"
height="auto"
alt="compassmeet.com"
/>
</Section>
{/*<Section style={logoContainer}>*/}
{/* <Img*/}
{/* src="..."*/}
{/* width="550"*/}
{/* height="auto"*/}
{/* alt="compassmeet.com"*/}
{/* />*/}
{/*</Section>*/}
<Section style={content}>
<Text style={paragraph}>Hi {name},</Text>
@@ -147,7 +147,7 @@ const endorsementTextStyle = {
}
const button = {
backgroundColor: '#ec489a',
backgroundColor: '#4887ec',
borderRadius: '12px',
color: '#ffffff',
fontFamily: 'Helvetica, Arial, sans-serif',

View File

@@ -39,14 +39,14 @@ export const NewMatchEmail = ({
<Preview>You have a new match!</Preview>
<Body style={main}>
<Container style={container}>
<Section style={logoContainer}>
<Img
src="https://manifold.love/manifold-love-banner.png"
width="550"
height="auto"
alt="compassmeet.com"
/>
</Section>
{/*<Section style={logoContainer}>*/}
{/* <Img*/}
{/* src="..."*/}
{/* width="550"*/}
{/* height="auto"*/}
{/* alt="compassmeet.com"*/}
{/* />*/}
{/*</Section>*/}
<Section style={content}>
<Text style={paragraph}>Hi {name},</Text>
@@ -134,7 +134,7 @@ const profileImage = {
}
const button = {
backgroundColor: '#ec489a',
backgroundColor: '#4887ec',
borderRadius: '12px',
color: '#ffffff',
fontFamily: 'Helvetica, Arial, sans-serif',

View File

@@ -47,14 +47,14 @@ export const NewMessageEmail = ({
<Preview>New message from {creatorName}</Preview>
<Body style={main}>
<Container style={container}>
<Section style={logoContainer}>
<Img
src="https://manifold.love/manifold-love-banner.png"
width="550"
height="auto"
alt="compassmeet.com"
/>
</Section>
{/*<Section style={logoContainer}>*/}
{/* <Img*/}
{/* src="..."*/}
{/* width="550"*/}
{/* height="auto"*/}
{/* alt="compassmeet.com"*/}
{/* />*/}
{/*</Section>*/}
<Section style={content}>
<Text style={paragraph}>Hi {name},</Text>
@@ -98,7 +98,7 @@ NewMessageEmail.PreviewProps = {
fromUserLover: jamesLover,
toUser: sinclairUser,
channelId: 1,
unsubscribeUrl: 'https://manifold.love/unsubscribe',
unsubscribeUrl: 'https://compassmeet.com/unsubscribe',
} as NewMessageEmailProps
const main = {
@@ -141,7 +141,7 @@ const profileImage = {
}
const button = {
backgroundColor: '#ec489a',
backgroundColor: '#4887ec',
borderRadius: '12px',
color: '#ffffff',
fontFamily: 'Helvetica, Arial, sans-serif',

View File

@@ -77,7 +77,6 @@ export const RESERVED_PATHS = [
'live',
'login',
'manifest',
'manifold',
'market',
'markets',
'message',

View File

@@ -24,5 +24,5 @@ export function getLoveOgImageUrl(user: User, lover?: LoverRow | null) {
gender: lover?.gender ?? '???',
} as LoveOgProps
return buildOgUrl(loveProps, 'lover', 'manifold.love')
return buildOgUrl(loveProps, 'lover', 'compassmeet.com')
}

View File

@@ -75,6 +75,6 @@ describe('getSocialUrl', () => {
it('should handle discord user IDs and default invite', () => {
expect(getSocialUrl('discord', '123456789012345678')).toBe('https://discord.com/users/123456789012345678')
expect(getSocialUrl('discord', 'not-an-id')).toBe('https://discord.com/invite/AYDw8dbrGS')
expect(getSocialUrl('discord', 'not-an-id')).toBe('https://discord.gg/8Vd7jzqjun')
})
})

View File

@@ -2,7 +2,6 @@ export const SITE_ORDER = [
'site', // personal site
'x', // twitter
'discord',
'manifold',
'bluesky',
'mastodon',
'substack',
@@ -30,11 +29,6 @@ const stripper: { [key in Site]: (input: string) => string } = {
.replace(/^@/, '')
.replace(/\/$/, ''),
discord: (s) => s,
manifold: (s) =>
s
.replace(/^(https?:\/\/)?(manifold\.markets\/)/, '')
.replace(/^@/, '')
.replace(/\/$/, ''),
bluesky: (s) =>
s
.replace(/^(https?:\/\/)?(www\.)?bsky\.app\/profile\//, '')
@@ -78,8 +72,7 @@ const urler: { [key in Site]: (handle: string) => string } = {
discord: (s) =>
(s.length === 17 || s.length === 18) && !isNaN(parseInt(s, 10))
? `https://discord.com/users/${s}` // discord user id
: 'https://discord.com/invite/AYDw8dbrGS', // our server
manifold: (s) => `https://manifold.markets/${s}`,
: 'https://discord.gg/8Vd7jzqjun', // our server
bluesky: (s) => `https://bsky.app/profile/${s}`,
mastodon: (s) =>
s.includes('@') ? `https://${s.split('@')[1]}/@${s.split('@')[0]}` : s,
@@ -96,7 +89,6 @@ export const PLATFORM_LABELS: { [key in Site]: string } = {
site: 'Website',
x: 'Twitter/X',
discord: 'Discord',
manifold: 'Manifold',
bluesky: 'Bluesky',
mastodon: 'Mastodon',
substack: 'Substack',

View File

@@ -4,7 +4,6 @@ import { filterDefined } from './util/array'
export type notification_destination_types = 'email' | 'browser' | 'mobile'
export type notification_preference = keyof notification_preferences
export type notification_preferences = {
// Manifold.love
new_match: notification_destination_types[]
new_endorsement: notification_destination_types[]
new_love_like: notification_destination_types[]
@@ -37,7 +36,6 @@ export const getDefaultNotificationPreferences = (isDev?: boolean) => {
]) as notification_destination_types[]
}
const defaults: notification_preferences = {
// Manifold.love
new_match: constructPref(true, true, true),
new_endorsement: constructPref(true, true, true),
new_love_like: constructPref(true, false, false),

View File

@@ -48,9 +48,6 @@ export type PrivateUser = {
export type UserAndPrivateUser = { user: User; privateUser: PrivateUser }
export const MANIFOLD_LOVE_LOGO =
'https://manifold.markets/manifold_love_logo.svg'
export function getCurrentUtcTime(): Date {
const currentDate = new Date()
const utcDate = currentDate.toISOString()

1
dev.sh
View File

@@ -16,7 +16,6 @@ ENVIRONMENT=$ENV
NEXT_PUBLIC_FIREBASE_ENV="${ENVIRONMENT}"
DIR=web
export IS_MANIFOLD_LOVE=true
source .env
npx dotenv -e .env -- npx concurrently \

View File

@@ -739,7 +739,7 @@ export function createClient(
}
export const ENV_CONFIG = {
domain: 'dev.manifold.love',
domain: 'dev.compassmeet.com',
firebaseConfig: {
apiKey: "AIzaSyAxzhj6bZuZ1TCw9xzibGccRHXiRWq6iy0",
authDomain: "compass-130ba.firebaseapp.com",
@@ -749,15 +749,15 @@ export const ENV_CONFIG = {
appId: "1:253367029065:web:b338785af99d4145095e98",
measurementId: "G-2LSQYJQE6P",
region: 'us-west1',
privateBucket: 'polylove-private.firebasestorage.app',
privateBucket: 'compass-130ba.firebasestorage.app',
},
cloudRunId: 'w3txbmd3ba',
cloudRunRegion: 'uc',
supabaseInstanceId: 'ltzepxnhhnrnvovqblfr',
supabaseAnonKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imx0emVweG5oaG5ybnZvdnFibGZyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTU5NjczNjgsImV4cCI6MjA3MTU0MzM2OH0.pbazcrVOG7Kh_IgblRu2VAfoBe3-xheNfRzAto7xvzY',
apiEndpoint: 'api.dev.manifold.love',
apiEndpoint: 'api.dev.compassmeet.com',
adminIds: [
'2cO953kN1sTBpfbhPVnTjRNqLJh2', // Sinclair
'...',
],
}

View File

@@ -27,7 +27,7 @@ export function Custom404Content(props: { customText?: string }) {
target="_blank"
rel="noopener noreferrer"
className="items-center hover:text-indigo-400 hover:underline"
href="https://discord.com/invite/AYDw8dbrGS"
href="https://discord.gg/8Vd7jzqjun"
>
on Discord!
<ExternalLinkIcon className="ml-1 inline-block h-4 w-4 " />

View File

@@ -49,9 +49,8 @@ function OgLover(props: LoveOgProps) {
className="flex h-full w-full flex-col items-center justify-center"
style={{
fontFamily: 'var(--font-main), Figtree',
// Pink radial gradient
background:
'radial-gradient(circle at top left, #fdf2f8 0%, #fbcfe8 85%, #ec4899 100%)',
'radial-gradient(circle at top left, #ffffff 0%, #ffffff 85%, #ffffff 100%)',
}}
>
<div className="flex flex-col">
@@ -91,7 +90,7 @@ function OgLover(props: LoveOgProps) {
>
<img
className="mr-1.5 h-12 w-12"
src="https://manifold.love/manifold_love_logo.svg"
src="https://www.compassmeet.com/favicon.ico"
width={48}
height={48}
/>