mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 05:11:14 -05:00
Refine profile privacy controls
This commit is contained in:
@@ -16,6 +16,10 @@ interface PrivacySettings {
|
||||
search_visibility: boolean;
|
||||
show_location: boolean;
|
||||
show_age: boolean;
|
||||
show_avatar: boolean;
|
||||
show_bio: boolean;
|
||||
show_activity_stats: boolean;
|
||||
show_home_park: boolean;
|
||||
}
|
||||
interface ProfilePrivacy {
|
||||
privacy_level: 'public' | 'private';
|
||||
@@ -39,7 +43,11 @@ export function PrivacyTab() {
|
||||
activity_visibility: 'public',
|
||||
search_visibility: true,
|
||||
show_location: false,
|
||||
show_age: false
|
||||
show_age: false,
|
||||
show_avatar: true,
|
||||
show_bio: true,
|
||||
show_activity_stats: true,
|
||||
show_home_park: false
|
||||
}
|
||||
});
|
||||
useEffect(() => {
|
||||
@@ -78,7 +86,11 @@ export function PrivacyTab() {
|
||||
activity_visibility: 'public',
|
||||
search_visibility: true,
|
||||
show_location: false,
|
||||
show_age: false
|
||||
show_age: false,
|
||||
show_avatar: true,
|
||||
show_bio: true,
|
||||
show_activity_stats: true,
|
||||
show_home_park: false
|
||||
};
|
||||
try {
|
||||
const {
|
||||
@@ -117,7 +129,11 @@ export function PrivacyTab() {
|
||||
activity_visibility: data.activity_visibility,
|
||||
search_visibility: data.search_visibility,
|
||||
show_location: data.show_location,
|
||||
show_age: data.show_age
|
||||
show_age: data.show_age,
|
||||
show_avatar: data.show_avatar,
|
||||
show_bio: data.show_bio,
|
||||
show_activity_stats: data.show_activity_stats,
|
||||
show_home_park: data.show_home_park
|
||||
};
|
||||
const {
|
||||
error: prefsError
|
||||
@@ -196,6 +212,55 @@ export function PrivacyTab() {
|
||||
<Switch checked={form.watch('show_location')} onCheckedChange={checked => form.setValue('show_location', checked)} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="space-y-1">
|
||||
<Label>Show Age/Birth Date</Label>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Display your birth date on your profile
|
||||
</p>
|
||||
</div>
|
||||
<Switch checked={form.watch('show_age')} onCheckedChange={checked => form.setValue('show_age', checked)} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="space-y-1">
|
||||
<Label>Show Avatar</Label>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Display your profile picture
|
||||
</p>
|
||||
</div>
|
||||
<Switch checked={form.watch('show_avatar')} onCheckedChange={checked => form.setValue('show_avatar', checked)} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="space-y-1">
|
||||
<Label>Show Bio</Label>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Display your profile bio/description
|
||||
</p>
|
||||
</div>
|
||||
<Switch checked={form.watch('show_bio')} onCheckedChange={checked => form.setValue('show_bio', checked)} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="space-y-1">
|
||||
<Label>Show Activity Statistics</Label>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Display your ride counts and park visits
|
||||
</p>
|
||||
</div>
|
||||
<Switch checked={form.watch('show_activity_stats')} onCheckedChange={checked => form.setValue('show_activity_stats', checked)} />
|
||||
</div>
|
||||
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="space-y-1">
|
||||
<Label>Show Home Park</Label>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Display your home park preference
|
||||
</p>
|
||||
</div>
|
||||
<Switch checked={form.watch('show_home_park')} onCheckedChange={checked => form.setValue('show_home_park', checked)} />
|
||||
</div>
|
||||
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user