mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 08:28:39 +00:00
Implement profile and level privacy settings (#841)
* Create interactions management page and basic GET logic * Fix client side query and add blocked count as well as comments nitpick * Implement basic backend logic for interactions management * Remove errant null/whitespace checks and add border to blocked users partials * Implement user page's respect to profile privacy settings * Fix issue where user can't view their own profile if privacy settings are tightened * Fix other issues with profile access * Remove excess conditional expression from PSN privtype check * Check if access is allowed within request handler and hide bio/RA if private * Fix PSN privacy level check * Display private users in search and add base UI class to level lock icon * Rename everything from interactions to privacy for clarity * Dagg requested an eyeball Co-authored-by: vilijur <69403080+vilijur@users.noreply.github.com> * Clarify profile settings page title * Implement level privacy settings * Formatting nitpicks within UserPrivacyPage * Add discard changes buttons * Apply suggestion from code review * Consolidate privacy settings areas together * Grammar nitpick for comments enable/disable dropdown * Remove un-needed blue UI segment * Allow mods to issue disable comments case regardless of privacy settings Also addresses a few frontend and backend nitpicks left unaddressed by previous commits * Remove limiting AND operator expression * Grammar clarity on disable comments button * Add missing hidden button divider under Wipe Earth Decorations * No eyeball -m88youngling Removes eyeball from actual privacy settings page to match styling * Use long-text description for privacy type dropdowns * Use long-text description for comments toggle dropdown * Implement slot page privacy * Grammar nitpicks with Daggintosh * Daggintosh grammar review second edition * Once again put request handler arguments on one line * Rename LevelsPrivate variable to SlotsPrivate for internal consistency * Fix issue with PSN slot privacy type * Un-break comments * Apply most of the suggestions from code review * Correct form dropdown values for privacy types * Potentially fix broken privacy type extension * Slightly rework access calculation extension method * Fix issues with if statements * Apply suggestions from code review * Make everything translatable --------- Co-authored-by: vilijur <69403080+vilijur@users.noreply.github.com>
This commit is contained in:
parent
f084189a29
commit
6558d09c8d
16 changed files with 645 additions and 353 deletions
42
ProjectLighthouse.Localization/Privacy.resx
Normal file
42
ProjectLighthouse.Localization/Privacy.resx
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="enable_comments" xml:space="preserve">
|
||||
<value>Enable commenting on your profile.</value>
|
||||
</data>
|
||||
<data name="disable_comments" xml:space="preserve">
|
||||
<value>Disable commenting on your profile.</value>
|
||||
</data>
|
||||
<data name="no_blocked_users" xml:space="preserve">
|
||||
<value>You have not blocked any users.</value>
|
||||
</data>
|
||||
<data name="blocked_users" xml:space="preserve">
|
||||
<value>You have blocked {0} user(s).</value>
|
||||
</data>
|
||||
<data name="privacy_all" xml:space="preserve">
|
||||
<value>Share your {0} with everyone!</value>
|
||||
</data>
|
||||
<data name="privacy_psn" xml:space="preserve">
|
||||
<value>Only share your {0} with users who are playing in-game.</value>
|
||||
</data>
|
||||
<data name="privacy_game" xml:space="preserve">
|
||||
<value>Only share your {0} with users who are signed into the website or playing in-game.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -48,6 +48,10 @@
|
|||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Moderation.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Privacy.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Privacy.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
16
ProjectLighthouse.Localization/StringLists/PrivacyStrings.cs
Normal file
16
ProjectLighthouse.Localization/StringLists/PrivacyStrings.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
namespace LBPUnion.ProjectLighthouse.Localization.StringLists;
|
||||
|
||||
public static class PrivacyStrings
|
||||
{
|
||||
public static readonly TranslatableString BlockedUsers = create("blocked_users");
|
||||
public static readonly TranslatableString NoBlockedUsers = create("no_blocked_users");
|
||||
|
||||
public static readonly TranslatableString EnableComments = create("enable_comments");
|
||||
public static readonly TranslatableString DisableComments = create("disable_comments");
|
||||
|
||||
public static readonly TranslatableString PrivacyAll = create("privacy_all");
|
||||
public static readonly TranslatableString PrivacyPSN = create("privacy_psn");
|
||||
public static readonly TranslatableString PrivacyGame = create("privacy_game");
|
||||
|
||||
private static TranslatableString create(string key) => new(TranslationAreas.Privacy, key);
|
||||
}
|
|
@ -13,4 +13,5 @@ public enum TranslationAreas
|
|||
ModPanel,
|
||||
TwoFactor,
|
||||
Moderation,
|
||||
Privacy,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue