Compare commits

..

2 Commits

Author SHA1 Message Date
927cb1a934 fix: incorrect download filename logic 2024-03-05 23:05:32 +00:00
579a2f96e5 chore: rename community => early adopter 2024-03-05 13:04:46 +00:00
14 changed files with 36 additions and 52 deletions

View File

@ -203,7 +203,7 @@ export const SinglePlayerClient = () => {
target="_blank"
className="hover:text-foreground/80 font-semibold transition-colors"
>
community plan
early adopter plan
</Link>{' '}
for exclusive features, including the ability to collaborate with multiple signers.
</p>

View File

@ -40,7 +40,7 @@ export const Callout = ({ starCount }: CalloutProps) => {
className="rounded-full bg-transparent backdrop-blur-sm"
onClick={onSignUpClick}
>
Claim Community Plan
Claim Early Adopter Plan
<span className="bg-primary dark:text-background -mr-2.5 ml-2.5 rounded-full px-2 py-1.5 text-xs font-medium">
$30/mo
</span>

View File

@ -114,7 +114,7 @@ export const Hero = ({ className, ...props }: HeroProps) => {
className="rounded-full bg-transparent backdrop-blur-sm"
onClick={onSignUpClick}
>
Claim Community Plan
Claim Early Adopter Plan
<span className="bg-primary dark:text-background -mr-2.5 ml-2.5 rounded-full px-2 py-1.5 text-xs font-medium">
$30/mo
</span>
@ -225,7 +225,8 @@ export const Hero = ({ className, ...props }: HeroProps) => {
<span className="bg-primary text-black">
(in a non-legally binding, but heartfelt way)
</span>{' '}
and lock in the community plan for forever, including everything we build this year.
and lock in the early adopter plan for forever, including everything we build this
year.
</p>
<div className="flex h-24 items-center">

View File

@ -102,7 +102,7 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
</div>
<div
data-plan="community"
data-plan="early-adopter"
className="border-primary bg-background shadow-foreground/5 flex flex-col items-center justify-center rounded-lg border-2 px-8 py-12 shadow-[0px_0px_0px_4px_#E3E3E380]"
>
<p className="text-foreground text-4xl font-medium">Early Adopters</p>
@ -119,7 +119,7 @@ export const PricingTable = ({ className, ...props }: PricingTableProps) => {
<Button className="mt-6 rounded-full text-base" asChild>
<Link
href={`${NEXT_PUBLIC_WEBAPP_URL()}/signup?utm_source=pricing-community`}
href={`${NEXT_PUBLIC_WEBAPP_URL()}/signup?utm_source=pricing-early-adopter`}
target="_blank"
>
Signup Now

View File

@ -199,7 +199,7 @@ export const Widget = ({ className, children, ...props }: WidgetProps) => {
className="bg-foreground/5 col-span-12 flex flex-col rounded-2xl p-6 lg:col-span-5"
onSubmit={handleSubmit(onFormSubmit)}
>
<h3 className="text-xl font-semibold">Sign up to Community Plan</h3>
<h3 className="text-xl font-semibold">Sign up to Early Adopter Plan</h3>
<p className="text-muted-foreground mt-2 text-xs">
with Timur Ercan & Lucas Smith from Documenso
</p>

View File

@ -54,7 +54,7 @@ export default async function TeamsSettingBillingPage({ params }: TeamsSettingsB
<CardContent className="flex flex-row items-center justify-between p-4">
<div className="flex flex-col text-sm">
<p className="text-foreground font-semibold">
Current plan: {teamSubscription ? 'Team' : 'Community Team'}
Current plan: {teamSubscription ? 'Team' : 'Early Adopter Team'}
</p>
<p className="text-muted-foreground mt-0.5">

View File

@ -33,7 +33,7 @@ type TransferStripeSubscriptionOptions = {
* Will create a new subscription for the new owner and cancel the old one.
*
* Returns the subscription that should be associated with the team, null if
* no subscription is needed (for community plan).
* no subscription is needed (for early adopter plan).
*/
export const transferTeamSubscription = async ({
user,

View File

@ -15,12 +15,10 @@ export const downloadPDF = async ({ documentData, fileName }: DownloadPDFProps)
type: 'application/pdf',
});
const [baseTitle] = fileName?.includes('.pdf')
? fileName.split('.pdf')
: [fileName ?? 'document'];
const baseTitle = (fileName ?? 'document').replace(/\.pdf$/, '');
downloadFile({
filename: baseTitle,
filename: `${baseTitle}.pdf`,
data: blob,
});
};

View File

@ -15,10 +15,6 @@ export const getDatabaseUrl = () => {
process.env.NEXT_PRIVATE_DIRECT_DATABASE_URL = process.env.DATABASE_URL;
}
if (process.env.DATABASE_URL_UNPOOLED) {
process.env.NEXT_PRIVATE_DIRECT_DATABASE_URL = process.env.DATABASE_URL_UNPOOLED;
}
if (process.env.POSTGRES_PRISMA_URL) {
process.env.NEXT_PRIVATE_DATABASE_URL = process.env.POSTGRES_PRISMA_URL;
}
@ -44,5 +40,18 @@ export const getDatabaseUrl = () => {
process.env.NEXT_PRIVATE_DATABASE_URL = url.toString().replace('https://', 'postgres://');
}
// Support for neon.tech (Neon Database)
if (url.hostname.endsWith('neon.tech')) {
const [projectId, ...rest] = url.hostname.split('.');
if (!projectId.endsWith('-pooler')) {
url.hostname = `${projectId}-pooler.${rest.join('.')}`;
}
url.searchParams.set('pgbouncer', 'true');
process.env.NEXT_PRIVATE_DATABASE_URL = url.toString().replace('https://', 'postgres://');
}
return process.env.NEXT_PRIVATE_DATABASE_URL;
};

View File

@ -1,11 +0,0 @@
-- CreateTable
CREATE TABLE "DummyData" (
"id" TEXT NOT NULL,
"userId" INTEGER NOT NULL,
"hello" TEXT,
CONSTRAINT "DummyData_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "DummyData" ADD CONSTRAINT "DummyData_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -52,19 +52,10 @@ model User {
securityAuditLogs UserSecurityAuditLog[]
Webhooks Webhook[]
siteSettings SiteSettings[]
dummyData DummyData[]
@@index([email])
}
model DummyData {
id String @id @default(cuid())
userId Int
hello String?
User User? @relation(fields: [userId], references: [id], onDelete: Cascade)
}
model UserProfile {
id Int @id
bio String?

View File

@ -13,13 +13,7 @@ const seedDatabase = async () => {
if ('seedDatabase' in mod && typeof mod.seedDatabase === 'function') {
console.log(`[SEEDING]: ${file}`);
try {
await mod.seedDatabase();
} catch (e) {
console.log(`[SEEDING]: Seed failed for ${file}`);
console.error(e);
}
await mod.seedDatabase();
}
}
}

View File

@ -6,6 +6,7 @@ set -eo pipefail
# Get the directory of this script, regardless of where it is called from.
SCRIPT_DIR="$(readlink -f "$(dirname "$0")")"
function log() {
echo "[VercelBuild]: $1"
}
@ -68,17 +69,19 @@ function remap_database_integration() {
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$DATABASE_URL"
fi
if [[ ! -z "$DATABASE_URL_UNPOOLED" ]]; then
log "Remapping for Neon integration"
export NEXT_PRIVATE_DATABASE_URL="$DATABASE_URL&pgbouncer=true"
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$DATABASE_URL_UNPOOLED"
fi
if [[ ! -z "$POSTGRES_URL_NON_POOLING" ]]; then
export NEXT_PRIVATE_DATABASE_URL="$POSTGRES_URL?pgbouncer=true"
export NEXT_PRIVATE_DIRECT_DATABASE_URL="$POSTGRES_URL_NON_POOLING"
fi
if [[ "$NEXT_PRIVATE_DATABASE_URL" == *"neon.tech"* ]]; then
log "Remapping for Neon integration"
PROJECT_ID="$(echo "$PGHOST" | cut -d'.' -f1)"
PGBOUNCER_HOST="$(echo "$PGHOST" | sed "s/${PROJECT_ID}/${PROJECT_ID}-pooler/")"
export NEXT_PRIVATE_DATABASE_URL="postgres://${PGUSER}:${PGPASSWORD}@${PGBOUNCER_HOST}/${PGDATABASE}?pgbouncer=true"
fi
}
# Navigate to the root of the project.

View File

@ -90,7 +90,6 @@
"FONT_CAVEAT_URI",
"POSTGRES_URL",
"DATABASE_URL",
"DATABASE_URL_UNPOOLED",
"POSTGRES_PRISMA_URL",
"POSTGRES_URL_NON_POOLING",
"E2E_TEST_AUTHENTICATE_USERNAME",