From 50d05f92f146d602d8f913341a36191d9aec6aba Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Wed, 24 May 2023 18:40:27 -0700 Subject: [PATCH] Fix Gallery checkbox always checking itself + small fixes --- pkg/models/certification.go | 6 +- pkg/models/forum.go | 2 +- pkg/models/forum_recent.go | 2 +- pkg/models/notification.go | 20 +-- pkg/models/photo.go | 6 +- pkg/models/user.go | 4 +- web/templates/account/inner_circle.html | 226 ++++++++++++++---------- web/templates/photo/upload.html | 3 +- 8 files changed, 156 insertions(+), 113 deletions(-) diff --git a/pkg/models/certification.go b/pkg/models/certification.go index fd3bd24..a072cee 100644 --- a/pkg/models/certification.go +++ b/pkg/models/certification.go @@ -22,9 +22,9 @@ type CertificationPhotoStatus string const ( CertificationPhotoNeeded CertificationPhotoStatus = "needed" - CertificationPhotoPending = "pending" - CertificationPhotoApproved = "approved" - CertificationPhotoRejected = "rejected" + CertificationPhotoPending CertificationPhotoStatus = "pending" + CertificationPhotoApproved CertificationPhotoStatus = "approved" + CertificationPhotoRejected CertificationPhotoStatus = "rejected" ) // GetCertificationPhoto retrieves the user's record from the DB or upserts their initial record. diff --git a/pkg/models/forum.go b/pkg/models/forum.go index 92944fe..4632aa4 100644 --- a/pkg/models/forum.go +++ b/pkg/models/forum.go @@ -86,7 +86,7 @@ func PaginateForums(user *User, categories []string, pager *Pagination) ([]*Foru placeholders = []interface{}{} ) - if categories != nil && len(categories) > 0 { + if len(categories) > 0 { wheres = append(wheres, "category IN ?") placeholders = append(placeholders, categories) } diff --git a/pkg/models/forum_recent.go b/pkg/models/forum_recent.go index 63cf89c..6ba5cfd 100644 --- a/pkg/models/forum_recent.go +++ b/pkg/models/forum_recent.go @@ -28,7 +28,7 @@ func PaginateRecentPosts(user *User, categories []string, pager *Pagination) ([] placeholders = []interface{}{} ) - if categories != nil && len(categories) > 0 { + if len(categories) > 0 { wheres = append(wheres, "forums.category IN ?") placeholders = append(placeholders, categories) } diff --git a/pkg/models/notification.go b/pkg/models/notification.go index 02da47e..bbc11a5 100644 --- a/pkg/models/notification.go +++ b/pkg/models/notification.go @@ -32,16 +32,16 @@ type NotificationType string const ( NotificationLike NotificationType = "like" - NotificationFriendApproved = "friendship_approved" - NotificationComment = "comment" - NotificationAlsoCommented = "also_comment" - NotificationAlsoPosted = "also_posted" // forum replies - NotificationCertRejected = "cert_rejected" - NotificationCertApproved = "cert_approved" - NotificationPrivatePhoto = "private_photo" - NotificationNewPhoto = "new_photo" - NotificationInnerCircle = "inner_circle" - NotificationCustom = "custom" // custom message pushed + NotificationFriendApproved NotificationType = "friendship_approved" + NotificationComment NotificationType = "comment" + NotificationAlsoCommented NotificationType = "also_comment" + NotificationAlsoPosted NotificationType = "also_posted" // forum replies + NotificationCertRejected NotificationType = "cert_rejected" + NotificationCertApproved NotificationType = "cert_approved" + NotificationPrivatePhoto NotificationType = "private_photo" + NotificationNewPhoto NotificationType = "new_photo" + NotificationInnerCircle NotificationType = "inner_circle" + NotificationCustom NotificationType = "custom" // custom message pushed ) // CreateNotification diff --git a/pkg/models/photo.go b/pkg/models/photo.go index db0c4fa..ebecf73 100644 --- a/pkg/models/photo.go +++ b/pkg/models/photo.go @@ -30,9 +30,9 @@ type PhotoVisibility string const ( PhotoPublic PhotoVisibility = "public" // on profile page and/or public gallery - PhotoFriends = "friends" // only friends can see it - PhotoPrivate = "private" // private - PhotoInnerCircle = "circle" // inner circle + PhotoFriends PhotoVisibility = "friends" // only friends can see it + PhotoPrivate PhotoVisibility = "private" // private + PhotoInnerCircle PhotoVisibility = "circle" // inner circle ) // PhotoVisibility preset settings. diff --git a/pkg/models/user.go b/pkg/models/user.go index f078421..fe12b71 100644 --- a/pkg/models/user.go +++ b/pkg/models/user.go @@ -47,8 +47,8 @@ type UserVisibility string const ( UserVisibilityPublic UserVisibility = "public" - UserVisibilityExternal = "external" - UserVisibilityPrivate = "private" + UserVisibilityExternal UserVisibility = "external" + UserVisibilityPrivate UserVisibility = "private" ) // All visibility options. diff --git a/web/templates/account/inner_circle.html b/web/templates/account/inner_circle.html index 5b5d541..e0bc77c 100644 --- a/web/templates/account/inner_circle.html +++ b/web/templates/account/inner_circle.html @@ -15,110 +15,154 @@
-
-

- Congratulations! You have been added to the {{PrettyCircle}} because you - exemplify what it truly means to be a {{PrettyTitle}} nudist. -

+
+
+ +
+ -

What is the inner circle?

+
+

+ Some quick links to {{PrettyCircle}}-only views mentioned + in the description on this page: +

-

- The inner circle is for {{PrettyTitle}} members who actually share a lot of nude pictures, - with face, of themselves on their profile page. It is "the party inside the party" - designed only for members who truly embrace the spirit of the {{PrettyTitle}} website by boldly - sharing nude pics with face for other nonshy nudists to see. -

+ +
+
+
-
    -
  • - When - Uploading a photo you - have a new Visibility option for "{{PrettyCircle}} " - so that only members of the inner circle can see those pictures. -
  • -
  • - On the - Site Gallery - you can filter for Inner Circle-only photos shared - by other members of the circle. -
  • -
  • - On the - Member Directory - you can see who else is in the inner circle. -
  • -
  • - On the - Forums - you can access exclusive inner circle-only boards. -
  • -
  • - On your profile page you get an "Inner circle" badge near your - Certified status. This badge is only visible to members of the inner circle. -
  • -
  • - You may invite other members to join the inner circle. -
  • -
+
+

+ Congratulations! You have been added to the {{PrettyCircle}} because you + exemplify what it truly means to be a {{PrettyTitle}} nudist. +

-

How do I invite others to join the inner circle?

+

What is the inner circle?

-

- When you are viewing a member's photo gallery page, look for the prompt at the top of the - page. -

- -

- If a member posts several (e.g. {{.InnerCircleMinimumPublicPhotos}}+) nude pics including face you should invite them to join - the inner circle. All members of the circle are allowed to invite new members to join. We trust your - judgment: please only invite like-minded nudists who actually share nudes with face - to join the inner circle. -

+

+ The inner circle is for {{PrettyTitle}} members who actually share a lot of nude pictures, + with face, of themselves on their profile page. It is "the party inside the party" + designed only for members who truly embrace the spirit of the {{PrettyTitle}} website by boldly + sharing nude pics with face for other nonshy nudists to see. +

-

- Notice: the prompt to invite them to the circle will not be visible if they do not have - at least {{.InnerCircleMinimumPublicPhotos}} public photos on their page at all. - Those public photos aren't necessarily nudes, but hiding the prompt unless they have {{.InnerCircleMinimumPublicPhotos}} - photos can help reduce the risk of inviting somebody on accident. -

+

What can I do for being in the inner circle?

-

Please keep the existence of the inner circle a secret

+

+ As a part of the inner circle, you have access to the following new features: +

-

- The inner circle is not publicly advertised on the site. This is to help ensure that "bad actors" won't - try and game the system (e.g., by begging somebody to invite them into the circle, or uploading a bare - minimum of nude pics for somebody to invite them only for them to delete their nudes and try and stay - in the inner circle). Plus, it adds an air of exclusivity to keep the existence of the circle on the - down low. -

+
    +
  • + When + Uploading a photo you + have a new Visibility option for "{{PrettyCircle}} " + so that only members of the inner circle can see those pictures. +
  • +
  • + On the + Site Gallery + you can filter for Inner Circle-only photos shared + by other members of the circle. +
  • +
  • + On the + Member Directory + you can see who else is in the inner circle. +
  • +
  • + On the + Forums + you can access exclusive inner circle-only boards. +
  • +
  • + On your profile page you get an "Inner circle" badge near your + Certified status. This badge is only visible to members of the inner circle. +
  • +
  • + You may invite other members to join the inner circle. +
  • +
-

Still continue to share at least some nudes on "public"

+

How do I invite others to join the inner circle?

-

- With the new Photo visibility option for "inner circle only" you may tag your best nudes for only members - of the inner circle to see. However, you should still continue to share at least some photos on - "Public" as you were doing previously. This is for a couple of reasons: -

+

+ When you are viewing a member's photo gallery page, look for the prompt at the top of the + page. +

-
    -
  • - Members who are not in the circle won't see your circle-only photos. If for example you - placed all of your nudes on circle-only you would appear to look the same as someone who - uploaded no nudes at all. -
  • -
  • - The "Shy Account" system of the main website still applies: if you have - not one public photo on your page you may be marked as a Shy Account and be limited from some site - features such as the Chat Room. -
  • -
+

+ If a member posts several (e.g. {{.InnerCircleMinimumPublicPhotos}}+) nude pics including face you should invite them to join + the inner circle. All members of the circle are allowed to invite new members to join. We trust your + judgment: please only invite like-minded nudists who actually share nudes with face + to join the inner circle. +

+ +

+ Notice: the prompt to invite them to the circle will not be visible if they do not have + at least {{.InnerCircleMinimumPublicPhotos}} public photos on their page at all. + Those public photos aren't necessarily nudes, but hiding the prompt unless they have {{.InnerCircleMinimumPublicPhotos}} + photos can help reduce the risk of inviting somebody on accident. +

+ +

Please keep the existence of the inner circle a secret

+ +

+ The inner circle is not publicly advertised on the site. This is to help ensure that "bad actors" won't + try and game the system (e.g., by begging somebody to invite them into the circle, or uploading a bare + minimum of nude pics for somebody to invite them only for them to delete their nudes and try and stay + in the inner circle). Plus, it adds an air of exclusivity to keep the existence of the circle on the + down low. +

+ +

Still continue to share at least some nudes on "public"

+ +

+ With the new Photo visibility option for "inner circle only" you may tag your best nudes for only members + of the inner circle to see. However, you should still continue to share at least some photos on + "Public" as you were doing previously. This is for a couple of reasons: +

+ +
    +
  • + Members who are not in the circle won't see your circle-only photos. If for example you + placed all of your nudes on circle-only you would appear to look the same as someone who + uploaded no nudes at all. +
  • +
  • + The "Shy Account" system of the main website still applies: if you have + not one public photo on your page you may be marked as a Shy Account and be limited from some site + features such as the Chat Room. +
  • +
+
diff --git a/web/templates/photo/upload.html b/web/templates/photo/upload.html index 60e3e8f..4190afe 100644 --- a/web/templates/photo/upload.html +++ b/web/templates/photo/upload.html @@ -292,8 +292,7 @@ + {{if or .EditPhoto.Gallery (not .EditPhoto)}}checked{{end}}> Show this photo in the site-wide Photo Gallery