-
Notifications
You must be signed in to change notification settings - Fork 0
Sinthavong1337/eng 254 implement a settings page for user preferences and tag #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SengdowJones
wants to merge
26
commits into
main
Choose a base branch
from
sinthavong1337/eng-254-implement-a-settings-page-for-user-preferences-and-tag
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
bfeb06c
feat: replaces theme toggle with settings button in header, initializ…
SengdowJones f6dc53f
feat: add mock tag section for settings
SengdowJones 1993a07
Refactor settings page, add tag management, and update theme selector
cursoragent 9dbfb5b
Refine UI styling for settings and tag manager with improved theming
cursoragent 0e90bb4
Refactor settings page with custom profile management sections
cursoragent e14abd1
Enhance settings page with Clerk user profile and dynamic user info
cursoragent dfc3251
Refactor settings pages with dynamic routes and optimize user profile…
cursoragent fad12c5
Configure Next.js to allow remote images from Clerk
cursoragent 60582f9
Enhance Clerk UserProfile styling across settings pages
cursoragent 087f7a6
Remove Clerk user settings pages and simplify settings overview
cursoragent a9d7382
Refactor tag management UI with popover for edit and delete actions
cursoragent 72c19ad
Enhance tag creation and edit UI with improved design and preview
cursoragent 936ec63
Add stepper buttons for min days before item reuse input
cursoragent 8f33f23
Fix number input styling to remove spin buttons in TagManager
cursoragent d90f27a
Refactor TagManager: use shared Tag component everywhere, streamline …
SengdowJones 1e82903
feat(TagManager): align delete button left and action buttons right i…
SengdowJones 20d69fd
fix: make Tag appearance consistent across app by using compact={false}
SengdowJones f7ea936
refactor: replace native confirm dialog with design system dialog
SengdowJones 88917e9
feat: add keyboard navigation support for color selection
SengdowJones f5b1a69
refactor: eliminate type duplication in tag functions
SengdowJones 50fe85c
feat: make tags more compact in outfit suggestions
SengdowJones f092aec
feat: update authenticated header navigation
SengdowJones ebe2c7d
feat: improve dark mode color consistency with transparent buttons
SengdowJones da6e62a
fix: resolve nested button hydration error in TagManager
SengdowJones 2500b68
fix: align Settings page content with header elements
SengdowJones faea7b9
feat: add sign-out functionality and improve Settings page UX
SengdowJones File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| 'use client' | ||
|
|
||
| import { ThemeSelector } from "@/components/ui/theme-toggle" | ||
| import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card" | ||
| import { TagManager } from "@/components/TagManager" | ||
| import { useUser, useClerk } from "@clerk/nextjs" | ||
| import Image from "next/image" | ||
| import { User, Monitor, LogOut } from "lucide-react" | ||
| import { Button } from "@/components/ui/button" | ||
|
|
||
| export default function SettingsPage() { | ||
| const { user } = useUser() | ||
| const { signOut } = useClerk() | ||
|
|
||
| const handleSignOut = async () => { | ||
| await signOut() | ||
| } | ||
|
|
||
| return ( | ||
| <div className="max-w-4xl mx-auto py-10 space-y-8"> | ||
| <div className="space-y-2"> | ||
| <h1 className="text-3xl font-bold tracking-tight">Settings</h1> | ||
| <p className="text-muted-foreground"> | ||
| Manage your preferences, customize your experience, and organize your wardrobe. | ||
| </p> | ||
| </div> | ||
|
|
||
| <div className="grid gap-6"> | ||
| {/* Appearance Settings */} | ||
| <Card className="bg-card/80 shadow-md border border-border"> | ||
| <CardHeader> | ||
| <CardTitle className="flex items-center gap-2 text-lg font-semibold"> | ||
| <Monitor className="h-5 w-5" /> | ||
| Appearance | ||
| </CardTitle> | ||
| <CardDescription> | ||
| Customize how Shafa looks and feels across all your devices. | ||
| </CardDescription> | ||
| </CardHeader> | ||
| <CardContent> | ||
| <div className="space-y-3"> | ||
| <div> | ||
| <h4 className="text-sm font-medium mb-3">Theme Preference</h4> | ||
| <ThemeSelector /> | ||
| </div> | ||
| <p className="text-xs text-muted-foreground"> | ||
| Choose your preferred theme. System will automatically match your device's theme. | ||
| </p> | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
|
|
||
| {/* Tag Management */} | ||
| <TagManager /> | ||
|
|
||
| {/* User Profile */} | ||
| <Card className="bg-card/80 shadow-md border border-border"> | ||
| <CardHeader> | ||
| <CardTitle className="flex items-center gap-2 text-lg font-semibold"> | ||
| <User className="h-5 w-5" /> | ||
| Account & Profile | ||
| </CardTitle> | ||
| <CardDescription> | ||
| Manage your account information and access advanced profile settings. | ||
| </CardDescription> | ||
| </CardHeader> | ||
| <CardContent> | ||
| <div className="space-y-6"> | ||
| {/* Current User Info */} | ||
| {user && ( | ||
| <div className="p-4 rounded-lg border bg-background/50"> | ||
| <div className="flex items-center justify-between gap-4"> | ||
| <div className="flex items-center gap-4 min-w-0 flex-1"> | ||
| {user.imageUrl ? ( | ||
| <Image | ||
| src={user.imageUrl} | ||
| alt="Profile" | ||
| width={48} | ||
| height={48} | ||
| className="w-12 h-12 rounded-full object-cover flex-shrink-0" | ||
| /> | ||
| ) : ( | ||
| <div className="w-12 h-12 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0"> | ||
| <User className="h-6 w-6 text-primary" /> | ||
| </div> | ||
| )} | ||
| <div className="min-w-0 flex-1"> | ||
| <h3 className="font-medium text-foreground truncate"> | ||
| {user.fullName || user.firstName} | ||
| </h3> | ||
| <p className="text-sm text-muted-foreground truncate"> | ||
| {user.primaryEmailAddress?.emailAddress} | ||
| </p> | ||
| </div> | ||
| </div> | ||
| <Button | ||
| variant="outline" | ||
| size="sm" | ||
| onClick={handleSignOut} | ||
| className="flex-shrink-0 bg-transparent hover:bg-red-500/10 border-red-400/40 text-red-400 hover:text-red-300 hover:border-red-400/60 transition-colors" | ||
| > | ||
| <LogOut className="mr-1.5 h-3.5 w-3.5" /> | ||
| Sign out | ||
| </Button> | ||
| </div> | ||
| </div> | ||
| )} | ||
| </div> | ||
| </CardContent> | ||
| </Card> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.