Commit Graph

241 Commits (main)

Author SHA1 Message Date
Noah Petherbridge 1e7ea6830c Reserved username check on signup page 2023-09-09 12:26:51 -07:00
Noah Petherbridge 618acc9f92 Update reserved usernames 2023-09-09 12:23:54 -07:00
Noah Petherbridge de71d65be6 Only admin users can see banned accounts on search 2023-09-09 11:16:43 -07:00
Noah Petherbridge e4c1142d55 More thorough blocking behavior 2023-09-05 13:57:56 -07:00
Noah Petherbridge b619e0c02e Send inner circle status as VIP to BareRTC 2023-09-03 12:08:45 -07:00
Noah Petherbridge 6b0246edad Tweak private share badges 2023-09-01 23:07:15 -07:00
Noah Petherbridge 2d7f8c0d87 Fix private grants page 2023-09-01 22:41:33 -07:00
Noah Petherbridge 944dbb749b Private photos: see who shares back 2023-09-01 22:27:18 -07:00
Noah Petherbridge 577c92386e Filter for expressly non-certified 2023-09-01 17:20:34 -07:00
Noah Petherbridge 67a54c866e New search filters and friendship sent icon 2023-09-01 17:13:10 -07:00
Noah Petherbridge 8275cc3ad9 Bugfix on search page 2023-08-29 21:14:06 -07:00
Noah Petherbridge 6eb51cf545 Filter member directory by HereFor 2023-08-29 21:10:00 -07:00
Noah Petherbridge f52fa47f3e More profile settings for HereFor 2023-08-29 20:40:23 -07:00
Noah Petherbridge 9f145c2f5e Tweak the login rate limiter 2023-08-20 20:58:51 -07:00
Noah Petherbridge 3f500cd019 Truncate location precision on RefreshGeoIP() 2023-08-20 10:25:13 -07:00
Noah Petherbridge a785b093e7 Tweaks to Who's Nearby 2023-08-19 21:09:23 -07:00
Noah Petherbridge cc628afd44 Who's Nearby Feature 2023-08-19 19:11:33 -07:00
Noah Petherbridge 73f89c7837 Chat country flags: stop at first subdivision 2023-08-17 18:47:52 -07:00
Noah Petherbridge bf71ed421c Maintenance Mode + Blockable Admin Scope 2023-08-16 22:09:04 -07:00
Noah Petherbridge 5f5fe37350 Chat reports: attach target user ID table 2023-08-16 17:30:39 -07:00
Noah Petherbridge dc5b82b59a Get better country and subdivision names 2023-08-15 21:08:07 -07:00
Noah Petherbridge 001477de61 Test chat room flags some more 2023-08-15 21:03:41 -07:00
Noah Petherbridge ece83a0b23 Test update to chat country flags 2023-08-15 20:56:22 -07:00
Noah Petherbridge 1ee8acf060 Various quick fixes
* Signup: if entering an existing email, don't admit that the email
  exists. Instead, send a specialized email to its address.
* Search: no longer search for users by email address.
* Login: always hash the incoming password on user not found, to take
  constant time compared to when the user did exist.
* Fix a pagination bug when a private (shy account) views a non-friend's
  photo gallery.
2023-08-15 17:33:33 -07:00
Noah Petherbridge 868aef6fb0 Minor bugfix 2023-08-15 09:53:59 -07:00
Noah Petherbridge 4c398c9b13 Minor bugfix 2023-08-15 09:53:13 -07:00
Noah Petherbridge 666d3105b7 Privacy Improvements and Notification Fixes
* On user profile pages and gallery: the total photo count for the user
  will only include photos that the viewer can actually see (taking into
  account friendship and private grants), so that users won't harass
  each other to see the additional photos that aren't visible to them.
* On the member directory search: the photo counts will only show public
  photos on their page for now, and may be fewer than the number of
  photos the current user could actually see.
* Blocklist: you can now manually add a user by username to your block
  list. So if somebody blocked you on the site and you want to block
  them back, there is a way to do this.
* Friends: you can now directly unfriend someone from their profile
  page by clicking on the "Friends" button. You get a confirmation
  popup before the remove friend action goes through.
* Bugfix: when viewing a user's gallery, you were able to see their
  Friends-only photos if they granted you their Private photo access,
  even if you were not their friend.
* Bugfix: when uploading a new private photo, instead of notifying
  everybody you granted access to your privates it will only notify
  if they are also on your friend list.
2023-08-14 18:50:34 -07:00
Noah Petherbridge 47859ee204 Don't spam admins with chat room reports 2023-08-13 20:47:16 -07:00
Noah Petherbridge f8487f92e7 Log when a user tried to block an admin 2023-08-12 23:23:49 -07:00
Noah Petherbridge 4d1a057a73 Signup page: check for username uniqueness 2023-08-12 22:37:09 -07:00
Noah Petherbridge d37ab56f26 Tweak email formatting for chat room reports 2023-08-12 21:47:33 -07:00
Noah Petherbridge 8ac63bf800 Webhook for BareRTC Report endpoint 2023-08-12 21:37:11 -07:00
Noah Petherbridge 1badee3662 Bugfix: don't unset dm_privacy on profile settings update 2023-08-10 19:37:49 -07:00
Noah Petherbridge 79a6b8048c Fix country flag with code for chat room 2023-08-05 20:11:55 -07:00
Noah Petherbridge 0c5db949aa Country Flags and Genders for the chat room 2023-08-05 19:37:15 -07:00
Noah Petherbridge fdc410c9f1 Clear/Delete Notifications, Private Photo Fixes
Added the ability to delete or clear notifications.
* A "Clear all" button deletes them all (with confirmation)
* A "Remove" button on individual notifications (one confirmation per
  page load, so you can remove several without too much tedium)

Fix some things regarding private photo notifications:
* When notifying your existing grants about a new upload, only users who
  opt-in for Explicit are notified about Explicit private pictures.
* When revoking private grants, clean up the "has uploaded a new private
  photo" notifications for all of your pics from their notification
  feeds.
2023-08-04 18:54:04 -07:00
Noah Petherbridge 47aaf15078 Admin Groups & Permissions
Add a permission system for admin users so you can lock down specific admins to
a narrower set of features instead of them all having omnipotent powers.

* New page: Admin Dashboard -> Admin Permissions Management
* Permissions are handled in the form of 'scopes' relevant to each feature or
  action on the site. Scopes are assigned to Groups, and in turn, admin user
  accounts are placed in those Groups.
* The Superusers group (scope '*') has wildcard permission to all scopes. The
  permissions dashboard has a create-once action to initialize the Superusers
  for the first admin who clicks on it, and places that admin in the group.

The following are the exhaustive list of permission changes on the site:

* Moderator scopes:
    * Chat room (enter the room with Operator permission)
    * Forums (can edit or delete user posts on the forum)
    * Photo Gallery (can see all private/friends-only photos on the site
      gallery or user profile pages)
* Certification photos (with nuanced sub-action permissions)
    * Approve: has access to the Pending tab to act on incoming pictures
    * List: can paginate thru past approved/rejected photos
    * View: can bring up specific user cert photo from their profile
    * The minimum requirement is Approve or else no cert photo page
      will load for your admin user.
* User Actions (each action individually scoped)
    * Impersonate
    * Ban
    * Delete
    * Promote to admin
* Inner circle whitelist: no longer are admins automatically part of the
  inner circle unless they have a specialized scope attached.

The AdminRequired decorator may also apply scopes on an entire admin route.
The following routes have scopes to limit them:

* Forum Admin (manage forums and their settings)
* Remove from inner circle
2023-08-01 20:39:48 -07:00
Noah Petherbridge 98c6a51951 Bugfix on chat URL 2023-07-30 10:56:14 -07:00
Noah Petherbridge 83391fe5c0 CachedBlocklist support for the chat room 2023-07-30 10:33:04 -07:00
Noah Petherbridge 61011efd9f Photo counts on member directory + inner circle removal privacy fix 2023-07-23 15:02:41 -07:00
Noah Petherbridge 271af4e9a2 Better fix for edit photo exception 2023-07-22 14:53:57 -07:00
Noah Petherbridge 27fc1c58dd Fix a range error exception 2023-07-22 14:50:20 -07:00
Noah Petherbridge 356f94698f Some bugfixes around profile picture cropping 2023-07-22 11:52:05 -07:00
Noah Petherbridge 82fe684d11 Safety check on Likes 2023-07-18 22:30:29 -07:00
Noah Petherbridge 26d2bc98f1 Minor quick fixes 2023-07-07 17:31:46 -07:00
Noah Petherbridge 2682512dd3 Geogate kill switch 2023-07-01 16:35:35 -07:00
Noah Petherbridge 9474625969 Update the About, Features and FAQ pages 2023-06-26 23:29:05 -07:00
Noah Petherbridge 7d4326e251 Fix GIF and PNG uploads 2023-06-25 23:03:41 -07:00
Noah Petherbridge e051da21b5 Support GIF videos in your photo gallery 2023-06-25 22:55:07 -07:00
Noah Petherbridge 8bd1fac3ee Update geo gate list 2023-06-24 15:59:50 -07:00
Noah Petherbridge 3d30102ade Bugfix on geogate 2023-06-24 15:51:53 -07:00
Noah Petherbridge c172565a56 Geo-gating on signup 2023-06-24 15:39:45 -07:00
Noah Petherbridge 45cb4d260e DM Privacy + Settings Page Tabs
* Refactor the Settings page into a tabbed UI to reduce confusion with
  all the different forms and save buttons
* Add a DM Privacy setting to your page
* Update the About page
2023-06-23 22:18:09 -07:00
Noah Petherbridge 0f6b627156 Spit and polish
* Refactor pagination into a DRY template func
* Better guide users with no profile pic to upload one
2023-06-21 20:46:27 -07:00
Noah Petherbridge 8afcbbe2be Fix age gate page to defend against common user error 2023-06-20 12:12:58 -07:00
Noah Petherbridge a98c218628 Bugfixes with changing user birthdates 2023-06-16 17:31:40 -07:00
Noah Petherbridge ae8ef83115 Option to hide age from profile display 2023-06-16 17:11:52 -07:00
Noah Petherbridge d36e71549a Age gate: collect birthdates retroactively and on new signup 2023-06-16 13:05:33 -07:00
Noah Petherbridge 3d34306c7e Better comment notification links 2023-06-15 19:40:40 -07:00
Noah Petherbridge 70d252dd75 Like buttons in photo notifications 2023-06-15 19:06:16 -07:00
Noah Petherbridge b262ac4be6 Better chat stats on landing page 2023-06-10 13:25:06 -07:00
Noah Petherbridge d6c4512cee Tweak BareRTC watch worker 2023-06-10 11:51:50 -07:00
Noah Petherbridge 78abee6e9e Online users badge in the Chat link on nav bar 2023-06-07 21:59:15 -07:00
Noah Petherbridge 50d05f92f1 Fix Gallery checkbox always checking itself + small fixes 2023-05-24 18:40:27 -07:00
Noah Petherbridge bcac316785 Fix gallery filters re: inner circle photos 2023-05-24 13:38:37 -07:00
Noah Petherbridge eccc4f0044 Update some wording 2023-05-24 11:35:22 -07:00
Noah Petherbridge 6cad3cadc7 Inner circle followups: notifications, min public pictures 2023-05-24 11:27:42 -07:00
Noah Petherbridge b9f2bafd7a Bugfix 2023-05-23 23:37:11 -07:00
Noah Petherbridge 081a22a6ef Logging for inner circle 2023-05-23 20:32:51 -07:00
Noah Petherbridge 3b3616f0c9 Inner circle bugfixes 2023-05-23 20:15:26 -07:00
Noah Petherbridge 9788ea6a33 The inner circle 2023-05-23 20:04:17 -07:00
Noah Petherbridge 17d9760b61 Bugfix: Owner of a private photo can see its comment page 2023-05-16 10:10:37 -07:00
Noah Petherbridge ba9e90b32a Photo upload notification: only notify explicit friends of new explicit photo 2023-05-07 13:16:22 -07:00
Noah Petherbridge 7af6d82fc7 Shorter JWT token lifetime to enter chat 2023-04-19 19:56:09 -07:00
Noah Petherbridge 0527ff54b5 Display names for BareRTC 2023-04-18 22:19:08 -07:00
Noah Petherbridge f98b6b2806 Notifications about new photo uploads for your friends 2023-03-16 20:04:43 -07:00
Noah Petherbridge eb913844f7 Fix banned user photos appearing on Gallery 2023-03-09 17:14:20 -08:00
Noah Petherbridge df65b1b260 Bugfixes around banned user accounts 2023-03-09 16:57:38 -08:00
Noah Petherbridge 1dc9afca5a Make ?view=external on profile page require a login if the profile is not actually public 2023-02-26 16:09:47 -08:00
Noah Petherbridge 99e9ef9c7b Fix bug when deleting user accounts if they own forum threads 2023-02-24 16:54:27 -08:00
Noah Petherbridge a1d80fc2b0 Disable contact form for logged-out users due to spam 2023-02-21 11:45:26 -08:00
Noah Petherbridge 296b5a30b8 Spit and polish for Shy Accounts
* Add a Shy/Non-shy badge to user profile pages.
* Shy Accounts can always DM admin users.
2023-02-13 22:31:50 -08:00
Noah Petherbridge 7d17dce4d4 Shy Accounts
* Users with private profiles or no public photo at all are considered
  to be Shy Accounts and are isolated from the non-shy profiles.
* Restrictions include:
  * Site Gallery shows only them + their friends' photos.
  * User Galleries: must be a friend or had private photos granted to
    see a user's gallery page.
  * DMs: can not initiate a DM to a non-shy member (other shy members
    OK).
2023-02-13 22:19:18 -08:00
Noah Petherbridge c4600ff6ce Use anonymized avatars in chat for non-public profile pics 2023-02-12 22:23:51 -08:00
Noah Petherbridge c098c2f8d8 Chat API endpoint 2023-02-09 23:07:07 -08:00
Noah Petherbridge 050ce19160 Chat launch page for BareRTC 2023-02-05 20:26:36 -08:00
Noah Petherbridge 345285d7a3 Add Admin Guidelines to dashboard
* A reason must be entered to impersonate a user, and it triggers a
  Report and email notification to the admin.
* User gallery pages will show at the top whether the user had granted
  you access to their private photos.
2022-12-24 23:00:59 -08:00
Noah Petherbridge 7531acdcbf Security fix 2022-12-20 21:21:15 -08:00
Noah Petherbridge 72a7f57f03 Ability to delete DMs and minor spit & polish 2022-12-20 21:11:43 -08:00
Noah Petherbridge 1cc2306cbf Wrap Up Polls Support
* Add the PollVotes table and associated logic.
* Multiple choice polls supported.
* Expiring and non-expiring polls.
* Icons and badges on the forum pages to show posts with polls
* Bugfix: non-explicit users getting SQL errors on Newest Posts page.
2022-12-20 19:15:45 -08:00
Noah Petherbridge bb79b5cbf3 WIP Web Polls
Got initial Poll table and UI started:
* Polls can be attached to any NEW forum post (can't edit poll details
  after creation)
* Max 100 options (theoretically unlimited), expiration time.
* UI: shows radio button list on posts having a poll, no submit handler
  yet created.
2022-12-14 22:57:06 -08:00
Noah Petherbridge 8e4bb85934 Raise photo cap to 100, fix filesize storage
The photo upload limit for user profiles is raised from 24 to 100.

The bug about Filesize not saving to the database for Photos and
CommentPhotos (storing zeroes in the DB) has been fixed. Run the
`nonshy backfill filesizes` to populate your existing database.
2022-12-06 21:50:42 -08:00
Noah fd0ff31d3e Update delete_user to handle CommentPhotos 2022-10-20 21:51:53 -07:00
Noah f1e12f344e Avoid a nil exception on error redirect 2022-10-20 21:07:21 -07:00
Noah 47f898561c Forum Photo Attachments
* Add support to upload a picture to forum posts and replies, in forums that
  have the PermitPhotos setting enabled.
* New DB table: CommentPhoto holds the association between a photo and a
  forum ID. Photos can be uploaded at preview time (before a CommentID is
  available) and get associated to the CommentID on save.
* Cron endpoint /v1/comment-photos/remove-orphaned can clean up orphaned
  photos without a CommentID older than 24 hours.
* Add "Photo Boards" as a default forum category for new boards.
2022-10-20 21:02:30 -07:00
Noah 6dcb0c66e8 Fix panic on CSRF middleware failure 2022-09-26 19:46:05 -07:00
Noah d66ba92f55 RemoteAddr fixes 2022-09-26 19:41:07 -07:00
Noah c97cc28b13 Contact form antispam 2022-09-26 19:12:24 -07:00
Noah 8085e092bc Forum Reply Enhancements + Better Pagers
* Enhance user experience replying to a forum thread. An inline reply textarea
  is added to page footers, "Quote" buttons on posts will quote the markdown
  source and focus the reply textarea, and "Reply" buttons will put an
  "@ mention" and focus the reply textarea. Users with scripts disabled will
  still be sent to the regular reply page as before.
* Improve all pagers by adding a "QueryPlus" template function that merges the
  page number with other current query parameters.
* Fix private profile picture avatars not displaying in your Notifications for
  profile pics you're allowed to see.
2022-09-10 12:09:46 -07:00
Noah 90b97708f7 Explicit admin filter for the site gallery
* For admins, make it a specific opt-in filter for the Site Gallery to
  show all pictures regardless of friendship or grant (for moderation
  purposes). On this view, Like and Comment buttons are taken away.
  Non-admins are not shown the option and the back-end ignores the
  parameter for them.
* Fix user avatars on compose and admin actions page.
2022-09-09 20:11:50 -07:00
Noah c7e5760c4c More private avatars more places 2022-09-08 21:52:50 -07:00
Noah 6c91c67c97 More Private User Avatars
* Users who set their Profile Picture to "friends only" or "private" can have
  their avatar be private all over the website to users who are not their
  friends or not granted access.
* Users who are not your friends see a yellow placeholder avatar, and users
  not granted access to a private Profile Pic sees a purple avatar.
* Admin users see these same placeholder avatars most places too (on search,
  forums, comments, etc.) if the user did not friend or grant the admin. But
  admins ALWAYS see it on their Profile Page directly, for ability to moderate.
* Fix marking Notifications as read: clicking the link in an unread notification
  now will wait on the ajax request to finish before allowing the redirect.
* Update the FAQ
2022-09-08 21:42:20 -07:00
Noah 0fe538fd87 Fix photo permalink display bug 2022-09-08 09:30:33 -07:00
Noah bb26c976d3 Don't ping LastLoginAt when impersonated 2022-09-07 22:19:26 -07:00
Noah c2458f14fd Make username case insensitive on Privacy Grant page 2022-09-07 21:29:35 -07:00
Noah de9ba94dd9 Private Photo Sharing
* Add ability to unlock your private photos for others.
    * Link to unlock is on another user's Photos page.
    * You can also access your "Manage Private Photos" page in the User Menu
      or Dashboard and add a user by username.
    * See who you have granted access, and see users who have granted you
      access to their private photos.
* Private photos of users who unlocked them for you may appear on the Site
  Gallery if the photo allows.
* Add new filters to the Site Gallery: you can choose to filter by Explicit,
  limit to a specific Visibility, and order by Newest or Oldest. Non-explicit
  users do not get a filter to see explicit content - they must opt-in in
  their settings.
* Bugfix: Site Gallery was not correctly filtering Explicit photos away from
  users who did not opt-in for explicit!
2022-09-07 21:18:54 -07:00
Noah 500456c05e Recent Forum Posts
* Add a "Newest" tab to the Forums landing page to order ALL forum posts
  (comments) by most recent, paginated.
* Add a "Views" cooldown in Redis: viewing the same post multiple times
  within 1 hour doesn't ++ the view count with every page load, per user
  per thread ID.
* Update the paginators to handle unlimited numbers of pages: shows max
  7 page buttons with your current page towards the middle.
* General ability to jump to the "last page" of anything: use a negative
  page size like ?page=-1 and it acts like the last page.
2022-08-30 22:13:57 -07:00
Noah 8419958b25 Likes on Comments, and other minor improvements
* Add "Like" buttons to comments and forum posts.
* Make "private" profiles more private (logged-in users see only their profile
  pic, display name, and can friend request or message, if they are not approved
  friends of the private user)
* Add "logged-out view" visibility setting to profiles: to share a link to your
  page on other sites. Opt-in setting - default is login required to view your
  public profile page.
* CSRF cookie fix.
* Updated FAQ & Privacy pages.
2022-08-29 20:00:15 -07:00
Noah 8a36ea6d24 Fix edited at bug 2022-08-28 20:56:26 -07:00
Noah aa8d719fc4 Comment Thread Subscriptions
* Add ability to (un)subscribe from comment threads on Forums and Photos.
* Creating a forum post, replying to a post or adding a comment to a photo
  automatically subscribes you to be notified when somebody else adds a
  comment to the thing later.
* At the top of each comment thread is a link to disable or re-enable your
  subscription. You can join a subscription without even needing to comment.
  If you click to disable notifications, they stay disabled even if you
  add another comment later.
2022-08-27 11:42:48 -07:00
Noah 6081aefb2f Allow basic access to profile pages for not logged-in users 2022-08-26 21:32:26 -07:00
Noah 0410065d5d Don't allow posting an empty comment 2022-08-26 20:07:55 -07:00
Noah 662d04ce3d Small tweaks 2022-08-26 20:04:48 -07:00
Noah c1268ae9b1 Comments on Photos
* Add permalink URL for photos to view their comment threads.
* Commenters can Edit or Delete their own comments.
* Photo owners can Delete any comment on it.
* Update Privacy Policy
2022-08-26 19:50:33 -07:00
Noah bbc6e354e2 Rename the module 2022-08-25 21:21:46 -07:00
Noah 9d15ceea80 Notifications on approved friendship and Cert Photo verdicts 2022-08-25 20:36:59 -07:00
Noah 5638cb2ff7 Forums - Spit & polish
* On Forums landing page, show who was the most recent commenter on each
  board's most recently updated post.
* Show photo count on Profile Pages on the "Photos" tab.
* Revise the mobile and tablet top nav bar:
    * Always show small badge icons linking to the Site Gallery & Forum
    * Always show Friends & Messages badges. If no new notifications, they
      display as grey instead of yellow w/ a number.
* Put icons next to most nav bar items, especially the User Menu
* Tighten the sprawling page layouts in the Forums to be more compact
  for mobile screens.
* Fix bug where some pages scrolled horizontally on mobile: the root cause
  was divs with class="content p-2", needs minimum p-3 (but p-4 is used) to
  provide enough padding to overcome column margins which were pushing the
  page too wide on mobile.
2022-08-25 19:58:43 -07:00
Noah 93c13882aa Finish Forums + Likes & Notifications
Finish implementing the basic forum features:
* Pinned threads (admin or board owner only)
* Edit Thread settings when you edit the top-most comment.
* NoReply threads remove all the reply buttons.
* Explicit forums and threads are filtered out unless opted-in (admins
  always see them).
* Count the unique members who participated in each forum.
* Get the most recently updated thread to show on forum list page.
* Contact/Report page: handle receiving a comment ID to report on.

Implement Likes & Notifications
* Like buttons added to Photos and Profile Pages. Implemented via simple
  vanilla JS (likes.js) to make ajax requests to back-end to like/unlike.
* Notifications: for your photo or profile being liked. If you unlike,
  the existing notifications about the like are revoked.
* The notifications appear as an alert number in the nav bar and are read
  on the User Dashboard. Click to mark a notification as "read" or click
  the "mark all as read" button.

Update DeleteUser to scrub likes, notifications, threads, and comments.
2022-08-24 21:17:34 -07:00
Noah ab33b8124d Forums: Basic Support WIP
Adds initial code for basically functional forums:

* Forums landing page shows hard-coded list of Categories along with any
  forums in the DB that use those categories.
* Admin: Create, Edit forums and view forums you own or have admin rights
  to modify.
* Landing page forums list shows the title/description and dynamic count of
  number of Topics and total number of Posts in each forum. TODO: distinct
  count of Users who posted in each forum.
* Board Index page shows list of Threads (posts) with a Replies count and
  Views count on each thread.
* Thread view is basically an array of Comments. Users can post, edit and
  delete (their own) comments. Deleting the first comment removes the
  entire Thread - the thread points to a first Comment to provide its body.
* Reply and Quote-Reply options working.
2022-08-23 22:55:19 -07:00
Noah 944cac731d Bugfix on forgot password screen 2022-08-22 22:00:51 -07:00
Noah 5e5a7bc6c1 Spit and Polish
* Friends: can now see your sent requests awaiting approval too.
* Site Gallery: you may see Friends-only photos on the Gallery if you are
  friends with the owner and the pic is opted-in for the Gallery.
* Site Gallery: show color coded visibility icons in card headers.
* Improve appearance of Upload Photo page.
* Update FAQ
2022-08-22 20:58:35 -07:00
Noah 1131fca16a Photo uploads: make file extension check case-insensitive 2022-08-22 19:29:48 -07:00
Noah fb0e3651b0 iPad Friendly Nav Bar + Mobile NavBar Notifications
* iPad in landscape mode was "desktop" size so got the full nav bar but
  the "More" drop-down was unusable. Add work-arounds for large touch
  devices to make the nav bar functional.
* "Click" on the "More" button will pin it open so that the drop-down
  doesn't rely solely on mouseover events. Clicking off the open
  drop-down or clicking again on "More" toggles it hidden.
* The logged-in user menu now drops its menu on hover like "More" did.
* The logged-in user menu adds "TouchStart" events: touching the menu
  button toggles its drop-down to appear, canceling the link to "/me"
  that clicking the menu button does on desktops. Clicking off the open
  drop-down closes it.
* Add notification indicators for "mobile" devices which only showed the
  brand and hamburger menu by default. Next to the hamburger button will
  be badges for number of friend requests or messages, with icons. Click
  the badge to go to the relevant page, or it hints that there are
  notifications in the drop-down.
2022-08-21 21:35:01 -07:00
Noah 4e4d18470f Bugfixes on change password 2022-08-21 18:19:30 -07:00
Noah 2d53aeab76 Add favicon 2022-08-21 17:56:14 -07:00
Noah 27a7abaae7 Private Profiles & Misc Improvements
* Add setting to mark profile as "private"
* If a profile is private you can't see their profile page or user photo
  gallery unless you are friends (or admin)
* The Site Gallery never shows pictures from private profiles.
* Add HTML5 drag/drop upload support for photo gallery.
* Suppress SQL logging except in debug mode.
* Clean up extra logs.
2022-08-21 17:29:39 -07:00
Noah 75c9e22b19 Reserved Usernames on Signup 2022-08-21 15:56:41 -07:00
Noah 36ba8c5c4d Photo Quotas & Postgres Fixes
* Add photo upload quotas.
* Non-certified users can upload few photos; certified users more
* Fix foreign key issues around deleting user profile photos for psql
2022-08-21 15:40:24 -07:00
Noah 96b33a920f Optimize CurrentUser to read from DB only once per request 2022-08-21 14:17:52 -07:00
Noah e42cebe4b8 Contact Us, Feedback, and Reporting
* Add the Contact page where users can contact the site admins for feedback or
  to report a problematic user, photo or message.
* Reports go into the admin Feedback table.
* Admin nav bar indicates number of unread feedbacks.
* Add "Report" button to profile pages, photo cards, and the top of Direct
  Message threads.

Misc changes:

* Send emails out asynchronously for more responsive page loads.
2022-08-21 14:05:08 -07:00
Noah 50fc93abfb Static pages: About, FAQ, TOS, Privacy 2022-08-15 22:33:17 -07:00
Noah 030fadcf8d Block Lists
Implement block lists. They work like friend lists but are unidirectional,
but take effect in both directions (blocker and blockee can not see one
another on the site -- except admin users can always see all users).

* Profile page says 404
* User gallery says 404
* User search page filters out blocked users
* Compose endpoint blocks sending messages to blocked users (except admin)
* Site Gallery filters photos by blocked (and uncertified) users
* Inbox page hides chat list for blocked users (can still read the chat
  history if you have a link to the old thread)
2022-08-14 17:45:55 -07:00
Noah e4406feb1e Admin Actions
* Add impersonate feature
* Add ban/unban user feature
* Add promote/demote admin status feature
* Add admin user deletion feature
* Admin ability to see other status certification pics
* Nav bar indicator of pending admin actions such as cert pics
  needing approval
* Admin ability to search cert pics for specific user
2022-08-14 16:27:57 -07:00
Noah 49ffa277e8 User Account Busywork
* Add "forgot password" workflow.
* Add ability to change user email address (confirmation link sent)
* Add ability to change user's password.
* Add rate limiter to deter brute force login attempts.
* Add user deep delete functionality (delete account).
* Ping user LastLoginAt every 8 hours for long-lived session cookies.
* Add age filters to user search page.
* Add sort options to user search (last login, created, username/name)
2022-08-14 14:40:57 -07:00
Noah 4adffe9fa9 Friend Requests and User Search 2022-08-13 22:44:57 -07:00
Noah 788442d7e9 Implement Direct Messaging 2022-08-13 17:42:42 -07:00
Noah 400a256ec8 Certification Photo Workflow
* Add "Site Gallery" page showing all public+gallery member photos.
* Add "Certification Required" decorator for gallery and other main pages.
* Add the Certification Photo workflow:
  * Users have a checklist on their dashboard to upload a profile pic
    and post a certification selfie (two requirements)
  * Admins notified by email when a new certification pic comes in.
  * Admin can reject (w/ comment) or approve the pic.
  * Users can re-upload or delete their pic at the cost of losing
    certification status if they make any such changes.
  * Users are emailed when their photo is either approved or rejected.
* User Preferences: can now save the explicit pref to your account.
* Explicit photos on user pages and site gallery are hidden if the
  current user hasn't opted-in (user can always see their own explicit
  photos regardless of the setting)
* If a user is viewing a member gallery and explicit pics are hidden, a
  count of the number of explicit pics is shown to inform the user that
  more DO exist, they just don't see them. The site gallery does not do
  this and simply hides explicit photos.
2022-08-13 15:39:31 -07:00
Noah cd1b349fcc User Photo Gallery & Management
* Add the user photo gallery for profile pages. Paginated, grid or full (blog
  style) view options. In grid view clicking a photo opens a large modal to
  see it; full view already shows large photos.
* Edit page: can also re-crop and set an existing pic to be your profile pic.
* Delete page: remove photos from the DB and hard drive.
* Photos are cleaned up from disk when not needed, e.g. during a re-crop the
  old cropped photo is removed before the new one replaces it.
* Fixed bug with cropping pictures.
2022-08-12 23:11:36 -07:00
Noah 60dd396b30 Photo Upload & Profile Pictures
Basic photo upload support. Square cropped images still buggy.
2022-08-11 23:04:08 -07:00
Noah de3d6e9315 User Profile and Settings Pages
* Vendor fontawesome icons
* User settings page: to edit profile details (other features not hooked
  up yet)
* Initial user profile page
2022-08-10 20:59:59 -07:00
Noah dd1e6c2918 Initial commit
* Initial codebase (lot of work!)
* Uses vanilla Go net/http and implements by hand: session cookies
  backed by Redis; log in/out; CSRF protection; email verification flow;
  initial database models (User table)
2022-08-09 22:32:19 -07:00