Commit Graph

23 Commits

Author SHA1 Message Date
Ian Philips
83cb0a6130 Allow clickable username in welcome message 2022-07-22 08:19:06 -06:00
Ian Philips
a6cbb6b759 Small notifications ux improvements 2022-07-15 11:53:30 -06:00
Ian Philips
55c91dfcdd
Categories to groups (#641)
* start on script

* Revert "Remove category filters"

This reverts commit d6e808e1a3.

* Convert categories to official default groups

* Add new users to default groups

* Rework group cards

* Cleanup

* Add unique bettors to contract and sort by them

* Most bettors to most popular

* Unused vars

* Track unique bettor ids on contracts

* Add followed users' bets to personal markets

* Add new users to welcome, bugs, and updates groups

* Add users to fewer default cats
2022-07-13 15:11:22 -06:00
Marshall Polaris
6462d4a2ed
Migrate createUser function to v2 (#633) 2022-07-10 14:02:32 -07:00
James Grugett
8b1d132e17
Daily/Weekly/Monthly Leaderboards by Fede (#557)
* [Leaderboards] Added period toggle for leaderboards

* [Leaderboards] TopBettors now calculates by period correctly

* [Leaderboard] Use a subcollection for the portfolio caching

* [Leaderboard] Switches to a tab view, temporarily hides the missing topBettors periods

* [Leaderboard] Reverts random yarn.lock changes

* Fix type error from merge

* Increase timeout on update metrics

* Update firebase rules to allow reading user portfolioHistory

Co-authored-by: Pico2x <pico2x@gmail.com>
2022-06-22 15:29:40 -05:00
Ben Congdon
67d0a6c0c2
Create Top Followed Users leaderboard (#531)
* Create Top Followed Users leaderboard

* Switch to increment/decrement approach for caching user follower counts

* Backfill script for user follow counts

* Appease ESLint

* Address review comment

Co-authored-by: James Grugett <jahooma@gmail.com>
2022-06-22 11:05:54 -05:00
mantikoros
d4f2a81735 exclude certain categories for new users 2022-06-21 10:01:51 -05:00
mantikoros
c2945f11b7 track create user 2022-06-16 10:45:44 -05:00
Marshall Polaris
33ddd86add
Switch to Google Secret Manager for function secrets (#418)
* Upgrade firebase-functions 3.16.0 -> 3.21.2

* Use Secret Manager instead of config

* Small refactoring on new stripe/mailgun initialization

* Teach README about new secrets workflow
2022-06-04 14:39:25 -07:00
James Grugett
d5cc6d5067 Revert "Better random (#213)"
This reverts commit c9f3644988.
2022-05-16 20:26:51 -04:00
Jonas Wagner
c9f3644988
Better random (#213)
* randomString: generate a securely random string.

Also, support lengths > 12 in case that's ever needed.

This is used in at least one case (creating device tokens for users)
where it seems important that the output is unpredictable.

* Try harder to create unique usernames.

The previous version added 16 bits of entropy to the username, which
isn't all that much. Due to the birthday paradox, it would be enough to
create ~256 users with the same prefix to get a collision.

Trying that would probably fail later on, and not create security
issues... but it just seems better to be on the safe side here.
2022-05-15 13:13:07 -07:00
James Grugett
ab8d541f8d Revert "Make absolute imports work with functions project (#168)"
This reverts commit c82a56af09.
2022-05-15 13:39:42 -04:00
Marshall Polaris
c82a56af09
Make absolute imports work with functions project (#168)
* Use a silly hack to make absolute imports work with Firebase tools

* Use absolute import for common module in functions code
2022-05-10 13:59:38 -07:00
Austin Chen
3fc159f10b Revert "Convert common imports in functions to be absolute"
This reverts commit c03518e906.
2022-05-09 12:06:16 -04:00
Marshall Polaris
acc9c84e2e
More absolute imports (#156)
* Configure functions module to allow absolute imports

* Convert common imports in functions to be absolute

* Convert common imports in web to be absolute

* Convert lib imports in web to be absolute

* Convert hooks imports in web to be absolute

* Convert components imports in web to be absolute
2022-05-09 09:04:36 -04:00
Austin Chen
da4ce99755
Merge Manifold for Teams infra into main codebase (#61)
* Add dev target for TheoremOne

* Restrict signups to theoremone.co emails

* Add new indices

* Forbid reads from unauthenticated users

* Client-side render pages that need auth

These pages are now client-side rendered:
- /home
- /leaderboards
- /market/...
- /fold/...

* Hide 404 for private Manifolds

* Brand instance for TheoremOne

* Hide "Add Funds" and "Personalize your feed"

* "M$" =>  "T$"

* Hide Discord & About Page too

* Update placeholders for teams

* Update firestore.indexes.json

* Switch /analytics to propz

* Migrate per-env code into common/

* More migrations to PROJECT_ID

* Conditionally use SSG depending on public vs private instance

* Fix props to be empty object

* Move more logic into access

* Spin out config files for each environment

* Generify most of the customizable brand stuff

* Move IS_PRIVATE_MANIFOLD to access.ts

* Rename access.ts to envs/constants.ts

* Add "dev:dev" alias

* Rever firestore rules to existing settings

* Fixes according to James's review
2022-03-08 18:43:30 -08:00
Austin Chen
8987a02975
Reapply Manifold for Teams config changes (#54)
* Reapply Manifold for Teams config changes

* Add Firebase config for TheoremOne

* Fix build

* Check in Firebase indexes

* Whitelist admins and new users by email

* Fix typo 🤦‍♂️
2022-02-26 23:29:33 -08:00
Austin Chen
492f777d0b Revert "Manifold for Teams: Support different Firestore dbs (#53)"
This reverts commit ebed7c15c0.
2022-02-26 22:19:16 -08:00
Austin Chen
ebed7c15c0
Manifold for Teams: Support different Firestore dbs (#53)
* Add Firebase config for TheoremOne

* Fix build

* Check in Firebase indexes

* Whitelist admins and new users by email
2022-02-26 22:08:50 -08:00
Austin Chen
66624ff92c Send a welcome email to new users 2022-02-08 03:26:33 -08:00
mantikoros
03f36cf954
User profile (#44)
* add id, userId to comment

* change user info cloud function and script; move cleanUsername to common

* change user info script

* fix rules

* add fund button: useLocation hook

* profile page

* merge

* profile stuff

* avatar uploading to storage bucket

* changeUserInfo: use transaction

* Styles for profile page

* Edit mode for profile, and more styles

Co-authored-by: James Grugett <jahooma@gmail.com>
2022-02-03 21:04:56 -06:00
mantikoros
4528615863
Private user (#32)
* PrivateUser

* createUser: create private user; detect multiple signups

* include user properties in private user

* script: create private users

* unsubscribing from market resolution emails

* track total deposits
2022-01-18 21:36:46 -06:00
mantikoros
908c8c03e6
Create user cloud function (#31)
* createUser cloud function; change User object

* initial commit

* listenForLogin: avoid race condition

* createUser: allow capital letters in username

* remove debugging

* leaderboard: empty url for undefined avatar image
2022-01-18 01:18:38 -06:00