Commit Graph

498 Commits

Author SHA1 Message Date
Noah Petherbridge
08943ee2c0 Update Photo Policy page 2024-12-02 23:40:06 -08:00
Noah Petherbridge
a42e7fa881 Update Photo Policy 2024-12-02 23:24:50 -08:00
Noah Petherbridge
6203a973e0 Add Photo Policy page 2024-12-02 22:56:46 -08:00
Noah Petherbridge
1935b28ee5 Tidy up Markdown at-mentions in plain text form 2024-11-28 12:31:04 -08:00
Noah Petherbridge
688d2e0baa Blur Explicit GIFs + Forum Improvements
* Fix a bug where explicit GIF videos weren't blurring when the user
  wanted them to be blurred.
* Make some improvements to the forums:
  * Polls will now remember the Expires setting while you are previewing
    and revising your original post.
  * Add 14 day and 30 day Expire options for polls.
  * Add disclaimer warnings above the Photo Attachment field when the
    current forum or thread isn't marked for Explicit content.
2024-11-28 11:21:06 -08:00
Noah Petherbridge
f7e5e36576 Dark theme CSS fixes 2024-11-25 10:12:41 -08:00
Noah Petherbridge
c05b6a498e Fix CSS theme ordering 2024-11-24 14:03:42 -08:00
Noah Petherbridge
953d4125f6 Fix scroll position on Settings deep links 2024-11-24 13:51:18 -08:00
Noah Petherbridge
f7b7327779 Small style tweak on member search page 2024-11-24 13:44:03 -08:00
Noah Petherbridge
b9bb8c28b4 Chat online indicator to match the current theme 2024-11-24 13:39:13 -08:00
Noah Petherbridge
9a75a0621e Add news about the themes to the Dashboard page 2024-11-24 13:28:04 -08:00
Noah Petherbridge
d8593d89c0 Iterate on color themes + Forum style fixes
* Move the forum box colors into dedicated styles that are easier to
  override for the new theme colors.
* Updated the themes so forums and comment thread background cards now
  match your chosen style.
* Add yellow and orange theme variants.
2024-11-24 13:22:28 -08:00
Noah Petherbridge
391667a94c Website theme hue settings 2024-11-23 23:51:01 -08:00
Noah Petherbridge
90b7eea0dc Fix Feedback Comments + Fixed Nav Anchor Workaround
* Admin Feedback page: fix the visit button to go to a reported comment.
* CSS: with the fixed top nav bar, anchor links (like to the FAQ or
  specific comments on a thread) were scrolling so the anchor was below
  the nav bar. Add a scroll-padding-top to work around this.
2024-11-23 16:45:39 -08:00
Noah Petherbridge
39398a1f78 Improve comment threads and reply syntax
* On Forums and photo comment threads: display the poster's username
  below their display name, if their username differs. If they do not
  have a distinct display name, a small @ appears in front of their
  display name instead.
* On Quote & Reply, wrap the @mention with a Markdown hyperlink to the
  specific comment ID.
2024-11-23 12:59:40 -08:00
Noah Petherbridge
c1cf5df70e Minor CSS fixes
* Breadcrumbs: override Bulma's nowrap style, as long forum thread
  titles could cause horizontal scrolling on mobile.
* Dashboard: fix double <a> tag wrapping for profile pictures.
* Member Search: fix invalid HTML code where div tags closed the
  wrapping p tag.
2024-11-23 12:38:29 -08:00
Noah Petherbridge
4b582b2141 Dark theme tweak 2024-11-22 22:26:53 -08:00
Noah Petherbridge
fcd2cbd615 Fixed top nav bar 2024-11-22 17:22:13 -08:00
Noah Petherbridge
63471e2e9b Show GIFs properly on add/edit forum post page 2024-11-12 20:10:40 -08:00
Noah Petherbridge
ad0eb6e17c Dark hero.is-light banner for dark theme 2024-10-19 16:07:52 -07:00
Noah Petherbridge
7ffcd6b3a8 Photo Views: Count a mouseover as a view too
For video elements (animated GIFs), since the 'click' for lightbox modal
doesn't work, mouseover and play/pause count as views. This can unfairly
lead videos to climb as the most viewed images while pictures need a
click or a 'like' to count.

So, count images as viewed on their mouseover event as well.
2024-10-19 15:44:50 -07:00
Noah Petherbridge
b52d9df958 Member Search: Add a filter for "Currently on chat" 2024-10-19 13:07:17 -07:00
Noah Petherbridge
1b3e8cb250 Private Photo Sharing Improvements
* Add a user privacy setting so they can gate who is allowed to share private
  photos with them (for people who dislike unsolicited shares):
  * Anybody (default)
  * Friends only
  * Friends + people whom they have sent a DM to (on the main website)
  * Nobody
* Add gating around whether to display the prompt to unlock your private photos
  while you are viewing somebody's gallery:
  * The current user needs at least one private photo to share.
  * The target user's new privacy preference is taken into consideration.
* The "should show private photo share prompt" logic is also used on the actual
  share page, e.g. for people who manually paste in a username to share with.
  You can not grant access to private photos which don't exist.
* Improve the UI on the private photo shares page.
  * Profile cards to add elements from the Member Directory page, such as a
    Friends and Liked indicator.
  * A count of the user's Private photos is shown, which links directly to
    their private gallery.
* Add "Decline" buttons to the Shared With Me page: so the target of a private
  photo share is able to remove/cancel shares with them.
2024-10-19 12:44:47 -07:00
Noah Petherbridge
e146c09850 Improvements to Feedback & Reports
* Add an AboutUserID field to feedbacks, so when the report is about a
  picture that is later deleted, the feedback can still link to the
  original owner's account instead of showing an error.
* Add filters to the User Notes page so the admin can see:
  * All feedback From or About the user or their content (default)
  * Feedback created by the user
  * Feedback about the user or their content
  * Fuzzy search for any feedback containing the user's name.
* On chat room reports: make the @channel ID a clickable user profile
  link for convenience.
2024-10-17 19:21:18 -07:00
Noah Petherbridge
704124157d User Themes refactor
Instead of fighting to override Bulma CSS classes, add user-theme-*
classes for simpler styling.
2024-10-13 20:31:09 -07:00
Noah Petherbridge
b7bee75e1f Function to re-sign photo URLs on profile pages
* With the new JWT signatures on photo URLs, it was no longer possible for
  creative users to embed their gallery photos on their profile page.
* Add a function to ReSignPhotoLinks that finds/replaces (on the server side)
  all references to paths under "/static/photos/" and gives them a fresh
  ?jwt= query string signature.
* Note: only applies to the profile page essays, ReSignPhotoLinks is a
  template func that must be opted-in on a per page basis.

Other miscellaneous fixes

* Add "Edit" buttons in the corners of profile cards, when the current user
  looks at their profile page. They link to URIs like
  "/settings#profile/about_me" which will now:
  1. Select the "Profile settings" tab like #profile
  2. Scroll and focus the profile essay field that the user clicked to edit.
2024-10-13 19:50:11 -07:00
Noah Petherbridge
cb37934935 Birthday chat room style fix
The h2 was showing in light text on dark mode making it unreadable.
2024-10-12 13:14:40 -07:00
Noah Petherbridge
26f9c4d71d Minor bugfix 2024-10-07 16:50:21 +00:00
Noah Petherbridge
2262edfe09 Improve browser caching with signed JWT photo URLs
* JWT tokens will now expire on the 10th of the next month, to produce
  consistent values for a period of time and aid with browser caching.
2024-10-05 20:24:45 -07:00
Noah Petherbridge
77a9d9a7fd Code cleanup 2024-10-04 21:22:52 -07:00
Noah Petherbridge
8078ff8755 Batch Edit/Delete Photos + Misc Fixes
Certification Required page:

* Show helpful advice if the reason for the page is only that the user had
  deleted their default profile pic, but their account was certified.

Batch Photo Delete & Visibility:

* On user galleries, owners and admins can batch Delete or Set Visibility on
  many photos at once. Checkboxes appear in the edit/delete row of each photo,
  and bulk actions appear at the bottom of the page along with select/unselect
  all boxes.
* Deprecated the old /photo/delete endpoint: it now redirects to the batch
  delete page with the one photo ID.

Misc Changes:

* Notifications now sort unread to the top always.
2024-10-04 21:17:20 -07:00
Noah Petherbridge
cbdabe791e Improve Signed Photo URLs
* The photo signing JWT tokens carry more fields to validate against:
  * The username the token is assigned to (or '@' for anyone)
  * An 'anyone' boolean for widely public images, such as for the chat room
    and public profile pages.
  * A short filename hash of the image in question (whether a Photo or a
    CommentPhoto) - so that the user can't borrow a JWT token from the chat
    room and reveal a different picture.
* Refactored where the VisibleAvatarURL function lives, to avoid a cyclic
  dependency error.
  * Originally: (*models.User).VisibleAvatarURL(other *models.User)
  * Now: (pkg/photo).VisibleAvatarURL(user, currentUser *models.User)
2024-10-03 20:14:34 -07:00
Noah Petherbridge
7869ff83ba Signed and Authenticated Static Photo URLs
* Add support for authenticated static photo URLs, leveraging the NGINX module
  ngx_http_auth_request. The README is updated with an example NGINX config
  how to set this up on the proxy side.
* In settings.json a new SignedPhoto section is added: not enabled by default.
* PhotoURL will append a ?jwt= token to the /static/photos/ path for the
  current user, which expires after 30 seconds.
* When SignedPhoto is enabled, it will enforce that the JWT token is valid and
  matches the username of the current logged-in user, or else will return with
  a 403 Forbidden error.
2024-10-03 18:04:14 -07:00
Noah Petherbridge
295183559d Admin labels on photos surrounding explicit flags
* Add 'admin labels' to photos so an admin can classify a photo as:
  * Not Explicit: e.g. it was flagged by the community but does not
    actually need to be explicit. This option will hide the prompt to
    report the explicit photo again.
  * Force Explicit: if a user is fighting an explicit flag and keeps
    removing it from their photo, the photo can be force marked
    explicit.
* Admin labels appear on the Permalink page and in the edit photo
  settings when viewed as a photo moderator admin.
2024-10-02 16:22:19 -07:00
Noah Petherbridge
542d0bb300 Improvements on community flagged explicit photos
When a user marks that another photo should have been marked as explicit:

* The owner of that photo gets a notification about it, which reminds them of
  the explicit photo policy.
* The photo's "Flagged" boolean is set (along with the Explicit boolean)
* The 'Edit' page on a Flagged photo shows a red banner above the Explicit
  option, explaining that it was flagged. The checkbox text is crossed-out,
  with a "no" cursor and title text over - but can still be unchecked.

If the user removes the Explicit flag on a flagged photo and saves it:

* An admin report is generated to notify to take a look too.
* The Explicit flag is cleared as normal
* The Flagged boolean is also cleared on this photo: if they set it back to
  Explicit again themselves, the red banner won't appear and it won't notify
  again - unless a community member flagged it again!

Also makes some improvements to the admin page:

* On photo reports: show a blurred-out (clickable to reveal) photo on feedback
  items about photos.
2024-10-01 20:44:11 -07:00
Noah Petherbridge
c8d9cdbb3a Demographics page: count only 'gallery' photos
The photo stats were counting ALL public photos of certified members,
whether featured on the Site Gallery or not. Update the query to filter
for Site Gallery photos instead.
2024-09-28 13:10:56 -07:00
Noah Petherbridge
106bcd377e User Forums: Enable PermitPhotos for all forum owners 2024-09-28 12:58:52 -07:00
Noah Petherbridge
f2e847922f Tweak admin permissions and photo view counts
* Profile pictures on profile pages now link to the gallery when clicked.
* Admins can no longer automatically see the default profile pic on profile
  pages unless they have photo moderator ability.
* Photo view counts are not added when an admin with photo moderator ability
  should not have otherwise been able to see the photo.
2024-09-28 12:45:20 -07:00
Noah Petherbridge
3fdae1d8d7 Various minor tweaks
* Demographics page:
    * Show percents with up to 1 decimal place of precision.
    * On tablets+ align the percent text to the right.
    * On photo counts, only include certified active user photos.
    * On gender/orientation demographics, pad the remaining "No answer" counts
      with the set of users who have no profile_fields set in the database yet.
* Admin certification page:
    * Add additional "common rejection reasons"
    * Add a confirm prompt when viewing the Rejected list to avoid accidental
      approval of previously rejected cert photos.
2024-09-27 17:37:45 -07:00
Noah Petherbridge
0c7fc7e866 Improve message reporting format 2024-09-26 21:05:27 -07:00
Noah Petherbridge
ab880148ad 'Likes' view an image + Tweak inbox page
* Hitting the Like button on a photo will mark it as viewed.
* Move the 'Report' button on the message inbox page, to instead be in
  the footer of each DM.
* Improve message reporting behavior to include the content of the
  message in the admin report.
2024-09-26 20:56:16 -07:00
Noah Petherbridge
7aa1d512fc Photo view count tweaks
* The owner of a photo no longer counts any views on it.
* Add event handlers to mark animated GIFs viewed on the gallery page:
  if the user mouse overs or pauses the video.
2024-09-26 20:32:04 -07:00
Noah Petherbridge
9d6c299fdd Photo View Counters 2024-09-25 22:46:33 -07:00
Noah Petherbridge
955ace1e91 Optimize sorting gallery by Likes/Comments via caching 2024-09-21 17:25:36 -07:00
Noah Petherbridge
0cd72a96ed Optimize gallery sort by likes or comments 2024-09-21 16:59:37 -07:00
Noah Petherbridge
944b2e28e9 Sort Gallery photos by Likes and Comments 2024-09-21 16:39:18 -07:00
Noah Petherbridge
9575041d1e Bugfix when removing all chat moderation rules 2024-09-20 20:32:56 -07:00
Noah Petherbridge
066765d2dc Chat Moderation Rules + Shy Accounts on Chat
* Add chat moderation rules to the website, so admins can apply selective rules
  to problematic users. Available rules are:
  * redcam: user's camera is always NSFW.
  * nobroadcast: user can not broadcast their camera.
  * novideo: user can not broadcast OR watch any video.
  * noimage: user can not share OR see any shared image on chat.
* The page to manage a user's active rules is available on their admin card of
  their profile page. When the user has rules active, a yellow counter is shown
  by the link to manage their rules.
  * Only chat moderator admins have access to the page or can see the yellow
    counter to know whether rules are active.
* "Shy Accounts" are now permitted on the chat room! With some moderation rules
  automatically applied to them: novideo,noimage.
* Update the Shy Account FAQ and messaging on the chat landing page.
* Update the auto-kick from chat behavior regarding shy accounts:
  * They are kicked from chat only when an update to their profile settings will
    transition then FROM a non-shy into a shy account.
  * For example: when saving their profile settings (going private) or when
    editing or deleting a photo (if they will have no more public photos left)
2024-09-19 19:30:02 -07:00
Noah Petherbridge
ae84ddf449 Web Push Notifications: Disable script when impersonated
If an admin needs to impersonate a regular user (to diagnose a support
issue or investigate a reported conversation thread), the web push
script is disabled so that the admin doesn't get subscribed to push
notifications for that user.
2024-09-14 12:07:18 -07:00
Noah Petherbridge
7991320256 Fix SQL queries on demographics page 2024-09-12 10:42:07 -07:00