diff --git a/common/user.ts b/common/user.ts
index 0dac5a19..2df7213f 100644
--- a/common/user.ts
+++ b/common/user.ts
@@ -40,6 +40,7 @@ export type User = {
referredByContractId?: string
referredByGroupId?: string
lastPingTime?: number
+ showWelcome: boolean
}
export const STARTING_BALANCE = ENV_CONFIG.startingBalance ?? 1000
diff --git a/firestore.rules b/firestore.rules
index 0f28ca80..48c36ad2 100644
--- a/firestore.rules
+++ b/firestore.rules
@@ -22,7 +22,7 @@ service cloud.firestore {
allow read;
allow update: if resource.data.id == request.auth.uid
&& request.resource.data.diff(resource.data).affectedKeys()
- .hasOnly(['bio', 'bannerUrl', 'website', 'twitterHandle', 'discordHandle', 'followedCategories', 'lastPingTime']);
+ .hasOnly(['bio', 'bannerUrl', 'website', 'twitterHandle', 'discordHandle', 'followedCategories', 'lastPingTime','showWelcome']);
// User referral rules
allow update: if resource.data.id == request.auth.uid
&& request.resource.data.diff(resource.data).affectedKeys()
diff --git a/functions/src/create-user.ts b/functions/src/create-user.ts
index ab7c8e9a..b8e9917c 100644
--- a/functions/src/create-user.ts
+++ b/functions/src/create-user.ts
@@ -77,6 +77,7 @@ export const createuser = newEndpoint(opts, async (req, auth) => {
creatorVolumeCached: { daily: 0, weekly: 0, monthly: 0, allTime: 0 },
followerCountCached: 0,
followedCategories: DEFAULT_CATEGORIES,
+ showWelcome: true,
}
await firestore.collection('users').doc(auth.uid).create(user)
diff --git a/web/components/onboarding/welcome.tsx b/web/components/onboarding/welcome.tsx
new file mode 100644
index 00000000..2caf66dd
--- /dev/null
+++ b/web/components/onboarding/welcome.tsx
@@ -0,0 +1,178 @@
+import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/solid'
+import clsx from 'clsx'
+import { useState } from 'react'
+import { useUser } from 'web/hooks/use-user'
+import { changeUserInfo } from 'web/lib/firebase/api'
+import { updateUser } from 'web/lib/firebase/users'
+import { Col } from '../layout/col'
+import { Modal } from '../layout/modal'
+import { Row } from '../layout/row'
+import { Subtitle } from '../subtitle'
+import { Title } from '../title'
+
+export default function Welcome() {
+ const user = useUser()
+ const [open, setOpen] = useState(true)
+ const [page, setPage] = useState(0)
+ const totalpages = 4
+
+ function increasePage() {
+ if (page < totalpages - 1) {
+ setPage(page + 1)
+ }
+ }
+
+ function decreasePage() {
+ if (page > 0) {
+ setPage(page - 1)
+ }
+ }
+
+ async function setUserHasSeenWelcome() {
+ // await changeUserInfo({ showWelcome: false })
+ if (user) {
+ console.log('setuserwelcome called')
+ await updateUser(user.id, { ['showWelcome']: false })
+ }
+ }
+
+ if (!user || !user.showWelcome) {
+ return <>>
+ } else
+ return (
+
+
+ Manifold Markets is a place where anyone can ask a question about the + future. +
++ Your question becomes a prediction market that people can bet{' '} + mana (M$) on. +
++ Mana (M$) is + the play money you bet with. You can also turn it into a real donation + to charity, at a 100:1 ratio. +
++ When you donate M$1000 to + Givewell, Manifold sends them{' '} + $10 USD. +
+ + > + ) +} + +function Page3() { + return ( + <> ++ As a thank you for signing up, we’ve sent you{' '} + M$1000 Mana (M$){' '} +
+ > + ) +} diff --git a/web/public/welcome/charity.mp4 b/web/public/welcome/charity.mp4 new file mode 100755 index 00000000..e9ba5a8a Binary files /dev/null and b/web/public/welcome/charity.mp4 differ diff --git a/web/public/welcome/dollar.png b/web/public/welcome/dollar.png new file mode 100644 index 00000000..1f585b0e Binary files /dev/null and b/web/public/welcome/dollar.png differ diff --git a/web/public/welcome/mana-example.mp4 b/web/public/welcome/mana-example.mp4 new file mode 100755 index 00000000..bb28a4bd Binary files /dev/null and b/web/public/welcome/mana-example.mp4 differ diff --git a/web/public/welcome/mana.png b/web/public/welcome/mana.png new file mode 100644 index 00000000..37edc321 Binary files /dev/null and b/web/public/welcome/mana.png differ diff --git a/web/public/welcome/manigreen.png b/web/public/welcome/manigreen.png new file mode 100644 index 00000000..3e9cecae Binary files /dev/null and b/web/public/welcome/manigreen.png differ diff --git a/web/public/welcome/manipurple.png b/web/public/welcome/manipurple.png new file mode 100644 index 00000000..27d74854 Binary files /dev/null and b/web/public/welcome/manipurple.png differ diff --git a/web/public/welcome/manipurpleflipped.png b/web/public/welcome/manipurpleflipped.png new file mode 100644 index 00000000..994e5282 Binary files /dev/null and b/web/public/welcome/manipurpleflipped.png differ diff --git a/web/public/welcome/manired.png b/web/public/welcome/manired.png new file mode 100644 index 00000000..9a12f061 Binary files /dev/null and b/web/public/welcome/manired.png differ diff --git a/web/public/welcome/sparkle.png b/web/public/welcome/sparkle.png new file mode 100644 index 00000000..9db709c9 Binary files /dev/null and b/web/public/welcome/sparkle.png differ diff --git a/web/public/welcome/treasure.png b/web/public/welcome/treasure.png new file mode 100644 index 00000000..cac9b895 Binary files /dev/null and b/web/public/welcome/treasure.png differ