Skip to content
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

chore: final touches #3841

Merged
merged 21 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions apps/prerender/src/components/Profile.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { APP_NAME } from '@hey/data/constants';
import type { MediaSet, NftImage, Publication } from '@hey/lens';
import { Profile } from '@hey/lens';
import formatHandle from '@hey/lib/formatHandle';
Expand All @@ -23,8 +24,8 @@ const Profile: FC<ProfileProps> = ({ profile, publications }) => {
}

const title = profile?.name
? `${profile?.name} (@${profile?.handle}) • Lenster`
: `@${profile?.handle} • Lenster`;
? `${profile?.name} (@${profile?.handle}) • ${APP_NAME}`
: `@${profile?.handle} • ${APP_NAME}`;
const description = truncateByWords(profile?.bio ?? '', 30);
const image = sanitizeDStorageUrl(
profile?.picture?.original?.url ??
Expand Down Expand Up @@ -75,7 +76,7 @@ const Profile: FC<ProfileProps> = ({ profile, publications }) => {
userInteractionCount: profile.stats.totalPosts
}
],
url: `https://lenster.xyz/u/${profile.handle}}`
url: `https://hey.xyz/u/${profile.handle}}`
}
}}
/>
Expand Down
4 changes: 2 additions & 2 deletions apps/prerender/src/components/Publication.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DEFAULT_OG } from '@hey/data/constants';
import { APP_NAME, DEFAULT_OG } from '@hey/data/constants';
import type { Comment } from '@hey/lens';
import { Publication } from '@hey/lens';
import getStampFyiURL from '@hey/lib/getStampFyiURL';
Expand Down Expand Up @@ -33,7 +33,7 @@ const Publication: FC<PublicationProps> = ({ publication, comments }) => {
: __typename === 'Mirror'
? 'Mirror'
: 'Comment'
} by @${publication.profile.handle} • Lenster`;
} by @${publication.profile.handle} • ${APP_NAME}`;
const description = truncateByWords(metadata?.content, 30);
const image = hasMedia
? sanitizeDStorageUrl(metadata?.media[0].original.url)
Expand Down
7 changes: 4 additions & 3 deletions apps/prerender/src/components/Shared/Tags.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { APP_NAME } from '@hey/data/constants';
import Head from 'next/head';
import type { FC } from 'react';

Expand Down Expand Up @@ -29,7 +30,7 @@ const Tags: FC<TagsProps> = ({
<meta name="description" content={description} />
{/* General OG */}
<meta property="og:url" content={url} />
<meta property="og:site_name" content="Lenster" />
<meta property="og:site_name" content={APP_NAME} />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:image" content={image} />
Expand All @@ -38,7 +39,7 @@ const Tags: FC<TagsProps> = ({
<meta property="og:type" content="article" />
{/* Twitter OG */}
<meta property="twitter:card" content={cardType} />
<meta property="twitter:site" content="Lenster" />
<meta property="twitter:site" content={APP_NAME} />
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={image} />
Expand All @@ -47,7 +48,7 @@ const Tags: FC<TagsProps> = ({
<meta property="twitter:creator" content="heydotxyz" />
{/* Lens OG */}
<meta property="lens:card" content={cardType} />
<meta property="lens:site" content="Lenster" />
<meta property="lens:site" content={APP_NAME} />
<meta property="lens:title" content={title} />
<meta property="lens:description" content={description} />
<meta property="lens:image" content={image} />
Expand Down
2 changes: 1 addition & 1 deletion apps/prerender/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IS_MAINNET } from '@hey/data/constants';

export const BASE_URL = IS_MAINNET
? 'https://lenster.xyz'
? 'https://hey.xyz'
: 'https://testnet.hey.xyz';
Binary file modified apps/web/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/web/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/web/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/web/public/favicon.ico
Binary file not shown.
Binary file removed apps/web/public/fonts/CircularXXSub-Bold.woff
Binary file not shown.
Binary file removed apps/web/public/fonts/CircularXXSub-Book.woff
Binary file not shown.
Binary file removed apps/web/public/fonts/CircularXXSub-Medium.woff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified apps/web/public/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/web/public/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed apps/web/public/lens.png
Binary file not shown.
3 changes: 3 additions & 0 deletions apps/web/public/lens.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions apps/web/public/logo.svg

This file was deleted.

Binary file added apps/web/public/pride.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 0 additions & 23 deletions apps/web/public/pride.svg

This file was deleted.

4 changes: 1 addition & 3 deletions apps/web/src/components/Channel/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Link from 'next/link';
import { useTheme } from 'next-themes';
import type { FC, ReactNode } from 'react';
import { useState } from 'react';
import { useAppStore } from 'src/store/app';
import { create } from 'zustand';

// Member count state
Expand All @@ -33,7 +32,6 @@ interface DetailsProps {
}

const Details: FC<DetailsProps> = ({ channel }) => {
const currentProfile = useAppStore((state) => state.currentProfile);
const [expandedImage, setExpandedImage] = useState<string | null>(null);
const { resolvedTheme } = useTheme();

Expand Down Expand Up @@ -99,7 +97,7 @@ const Details: FC<DetailsProps> = ({ channel }) => {
<MetaDetails
icon={
<img
src="/logo.svg"
src="/logo.png"
className="h-4 w-4"
height={16}
width={16}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Composer/NewPublication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ const NewPublication: FC<NewPublicationProps> = ({ publication }) => {
version: '2.0.0',
metadata_id: uuid(),
content: processedPublicationContent,
external_url: `https://lenster.xyz/u/${currentProfile?.handle}`,
external_url: `https://hey.xyz/u/${currentProfile?.handle}`,
image:
attachmentsInput.length > 0 ? getAttachmentImage() : textNftImageUrl,
imageMimeType:
Expand Down
22 changes: 11 additions & 11 deletions apps/web/src/components/Home/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import type { FC } from 'react';

const Hero: FC = () => {
return (
<div className="bg-hero divider py-12" data-testid="home-hero">
<div className="mx-auto flex w-full max-w-screen-xl items-stretch px-5 py-8 text-center sm:py-12 sm:text-left">
<div className="flex-1 space-y-3">
<div className="font-serif text-2xl font-extrabold sm:text-4xl">
<Trans>Welcome to {APP_NAME} 👋</Trans>
<div className="divider py-12" data-testid="home-hero">
<div className="mx-auto flex w-full max-w-screen-xl items-center px-5 py-8 sm:py-12">
<img
src="/logo.png"
className="mr-5 h-24 w-24 sm:mr-8 sm:h-36 sm:w-36"
/>
<div className="flex-1 space-y-1 tracking-tight sm:max-w-lg">
<div className="text-2xl font-extrabold sm:text-5xl">
<Trans>Welcome to {APP_NAME},</Trans>
</div>
<div className="leading-7 text-gray-700 dark:text-gray-300">
<Trans>
{APP_NAME} is a decentralized, and permissionless social media app
built with Lens Protocol 🌿
</Trans>
<div className="lt-text-gray-500 text-2xl font-extrabold sm:text-5xl">
<Trans>a social network built on Lens Protocol</Trans>
</div>
</div>
<div className="hidden w-full flex-1 shrink-0 sm:block" />
</div>
</div>
);
Expand Down
11 changes: 4 additions & 7 deletions apps/web/src/components/Home/Waitlist.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ArrowRightIcon } from '@heroicons/react/24/outline';
import { STATIC_IMAGES_URL } from '@hey/data/constants';
import { MISCELLANEOUS } from '@hey/data/tracking';
import { Button, Card } from '@hey/ui';
Expand All @@ -9,23 +8,21 @@ import type { FC } from 'react';

const Waitlist: FC = () => {
return (
<Card
as="aside"
className="!border-brand-600 !bg-brand-50 text-brand-600 dark:bg-brand-900 mb-4 space-y-4 p-5"
>
<Card as="aside" className="mb-4 space-y-4 p-5">
<img
src={`${STATIC_IMAGES_URL}/emojis/dizzy.png`}
alt="Dizzy emoji"
className="mx-auto h-14 w-14"
/>
<div className="space-y-3 text-center">
<div className="font-bold">
Join the waitlist to get early access to the vibrant Lens community!
<Trans>Get early access to Lens!</Trans>
</div>
<div>
<Link href="https://waitlist.lens.xyz?utm_source=hey" target="_blank">
<Button
icon={<ArrowRightIcon className="h-4 w-4" />}
variant="black"
size="lg"
onClick={() => Leafwatch.track(MISCELLANEOUS.OPEN_LENS_WAITLIST)}
>
<Trans>Join waitlist</Trans>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Profile/Achievements/Streaks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Streaks: FC<StreaksProps> = ({ profile }) => {
profile.handle
)} has {{count}} activities in ${new Date().getFullYear()}`
}}
theme={{ light: ['#ede9fe', '#7c3aed'] }}
theme={{ light: ['#FED5D9', '#FB3A5D'] }}
/>
</Card>
);
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/components/Profile/Cover.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { COVER, STATIC_IMAGES_URL } from '@hey/data/constants';
import { BRAND_COLOR, COVER, STATIC_IMAGES_URL } from '@hey/data/constants';
import imageKit from '@hey/lib/imageKit';
import sanitizeDStorageUrl from '@hey/lib/sanitizeDStorageUrl';
import type { FC } from 'react';
import colors from 'tailwindcss/colors';

interface CoverProps {
cover: string;
Expand All @@ -19,7 +18,7 @@ const Cover: FC<CoverProps> = ({ cover }) => {
? imageKit(sanitizeDStorageUrl(cover), COVER)
: `${STATIC_IMAGES_URL}/patterns/2.svg`
})`,
backgroundColor: colors.violet[500],
backgroundColor: BRAND_COLOR,
backgroundSize: cover ? 'cover' : '30%',
backgroundPosition: 'center center',
backgroundRepeat: cover ? 'no-repeat' : 'repeat'
Expand Down
15 changes: 13 additions & 2 deletions apps/web/src/components/Publication/Actions/Collect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { ElectedMirror, Publication } from '@hey/lens';
import humanize from '@hey/lib/humanize';
import nFormatter from '@hey/lib/nFormatter';
import { Modal, Tooltip } from '@hey/ui';
import cn from '@hey/ui/cn';
import { Leafwatch } from '@lib/leafwatch';
import { plural, t } from '@lingui/macro';
import { motion } from 'framer-motion';
Expand Down Expand Up @@ -56,7 +57,12 @@ const Collect: FC<CollectProps> = ({

return (
<>
<div className="flex items-center space-x-1 text-red-500">
<div
className={cn(
hasCollected ? 'text-brand-500' : 'lt-text-gray-500',
'flex items-center space-x-1'
)}
>
<motion.button
whileTap={{ scale: 0.9 }}
onClick={() => {
Expand All @@ -65,7 +71,12 @@ const Collect: FC<CollectProps> = ({
}}
aria-label="Collect"
>
<div className="rounded-full p-1.5 hover:bg-red-300/20">
<div
className={cn(
hasCollected ? 'hover:bg-brand-300/20' : 'hover:bg-gray-300/20',
'rounded-full p-1.5'
)}
>
<Tooltip
placement="top"
content={`${humanize(count)} ${plural(count, {
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Publication/Actions/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const Comment: FC<CommentProps> = ({ publication, showCount }) => {
: 'w-[15px] sm:w-[18px]';

return (
<div className="flex items-center space-x-1 text-blue-500">
<div className="lt-text-gray-500 flex items-center space-x-1">
<motion.button whileTap={{ scale: 0.9 }} aria-label="Comment">
<Link href={`/posts/${publication.id}`}>
<div className="rounded-full p-1.5 hover:bg-blue-300/20">
<div className="rounded-full p-1.5 hover:bg-gray-300/20">
<Tooltip
placement="top"
content={count > 0 ? t`${humanize(count)} Comments` : t`Comment`}
Expand Down
15 changes: 13 additions & 2 deletions apps/web/src/components/Publication/Actions/Like.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { ApolloCache } from '@hey/lens/apollo';
import { publicationKeyFields } from '@hey/lens/apollo/lib';
import nFormatter from '@hey/lib/nFormatter';
import { Tooltip } from '@hey/ui';
import cn from '@hey/ui/cn';
import errorToast from '@lib/errorToast';
import { Leafwatch } from '@lib/leafwatch';
import { t } from '@lingui/macro';
Expand Down Expand Up @@ -142,13 +143,23 @@ const Like: FC<LikeProps> = ({ publication, showCount }) => {
: 'w-[15px] sm:w-[18px]';

return (
<div className="flex items-center space-x-1 text-pink-500">
<div
className={cn(
liked ? 'text-brand-500' : 'lt-text-gray-500',
'flex items-center space-x-1'
)}
>
<motion.button
whileTap={{ scale: 0.9 }}
onClick={createLike}
aria-label="Like"
>
<div className="rounded-full p-1.5 hover:bg-pink-300/20">
<div
className={cn(
liked ? 'hover:bg-brand-300/20' : 'hover:bg-gray-300/20',
'rounded-full p-1.5'
)}
>
<Tooltip
placement="top"
content={liked ? t`Unlike` : t`Like`}
Expand Down
8 changes: 5 additions & 3 deletions apps/web/src/components/Publication/Actions/Share/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ const ShareMenu: FC<PublicationMenuProps> = ({ publication, showCount }) => {
<Menu.Button as={Fragment}>
<button
className={cn(
mirrored ? 'text-green-500' : 'text-brand',
'rounded-full p-1.5 hover:bg-gray-300/20'
mirrored
? 'text-brand hover:bg-brand-300/20'
: 'lt-text-gray-500 hover:bg-gray-300/20',
'rounded-full p-1.5'
)}
onClick={stopEventPropagation}
aria-label="Mirror"
Expand Down Expand Up @@ -78,7 +80,7 @@ const ShareMenu: FC<PublicationMenuProps> = ({ publication, showCount }) => {
{count > 0 && !showCount ? (
<span
className={cn(
mirrored ? 'text-green-500' : 'text-brand',
mirrored ? 'text-brand' : 'lt-text-gray-500',
'text-[11px] sm:text-xs'
)}
>
Expand Down
Loading
Loading