added dark mode
This commit is contained in:
@@ -90,27 +90,27 @@ export default function SettingsPage() {
|
||||
return (
|
||||
<div className="p-4 space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<h1 className="text-2xl font-bold text-gray-900">Settings</h1>
|
||||
<h1 className="text-2xl font-bold text-gray-900 dark:text-gray-100">Settings</h1>
|
||||
{saved && (
|
||||
<span className="text-sm text-green-600 animate-fade-in-up">Saved</span>
|
||||
<span className="text-sm text-green-600 dark:text-green-400 animate-fade-in-up">Saved</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Session Experience */}
|
||||
<div>
|
||||
<h2 className="text-lg font-semibold text-gray-900 mb-3">Session Experience</h2>
|
||||
<div className="bg-white rounded-xl shadow-sm divide-y divide-gray-100">
|
||||
<h2 className="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-3">Session Experience</h2>
|
||||
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-sm divide-y divide-gray-100 dark:divide-gray-700">
|
||||
{/* Sound */}
|
||||
<div className="flex items-center justify-between p-4">
|
||||
<div className="flex items-center gap-3">
|
||||
{prefs.sound_enabled ? (
|
||||
<VolumeIcon size={20} className="text-indigo-500" />
|
||||
) : (
|
||||
<VolumeOffIcon size={20} className="text-gray-400" />
|
||||
<VolumeOffIcon size={20} className="text-gray-400 dark:text-gray-500" />
|
||||
)}
|
||||
<div>
|
||||
<p className="font-medium text-gray-900">Sound effects</p>
|
||||
<p className="text-sm text-gray-500">Subtle audio cues on step completion</p>
|
||||
<p className="font-medium text-gray-900 dark:text-gray-100">Sound effects</p>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">Subtle audio cues on step completion</p>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
@@ -119,7 +119,7 @@ export default function SettingsPage() {
|
||||
if (!prefs.sound_enabled) playStepComplete();
|
||||
}}
|
||||
className={`w-12 h-7 rounded-full transition-colors ${
|
||||
prefs.sound_enabled ? 'bg-indigo-500' : 'bg-gray-300'
|
||||
prefs.sound_enabled ? 'bg-indigo-500' : 'bg-gray-300 dark:bg-gray-600'
|
||||
}`}
|
||||
>
|
||||
<div className={`w-5 h-5 bg-white rounded-full shadow transition-transform ml-1 ${
|
||||
@@ -131,10 +131,10 @@ export default function SettingsPage() {
|
||||
{/* Haptics */}
|
||||
<div className="flex items-center justify-between p-4">
|
||||
<div className="flex items-center gap-3">
|
||||
<SparklesIcon size={20} className={prefs.haptic_enabled ? 'text-indigo-500' : 'text-gray-400'} />
|
||||
<SparklesIcon size={20} className={prefs.haptic_enabled ? 'text-indigo-500' : 'text-gray-400 dark:text-gray-500'} />
|
||||
<div>
|
||||
<p className="font-medium text-gray-900">Haptic feedback</p>
|
||||
<p className="text-sm text-gray-500">Gentle vibration on actions</p>
|
||||
<p className="font-medium text-gray-900 dark:text-gray-100">Haptic feedback</p>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">Gentle vibration on actions</p>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
@@ -143,7 +143,7 @@ export default function SettingsPage() {
|
||||
if (!prefs.haptic_enabled) hapticTap();
|
||||
}}
|
||||
className={`w-12 h-7 rounded-full transition-colors ${
|
||||
prefs.haptic_enabled ? 'bg-indigo-500' : 'bg-gray-300'
|
||||
prefs.haptic_enabled ? 'bg-indigo-500' : 'bg-gray-300 dark:bg-gray-600'
|
||||
}`}
|
||||
>
|
||||
<div className={`w-5 h-5 bg-white rounded-full shadow transition-transform ml-1 ${
|
||||
@@ -155,13 +155,13 @@ export default function SettingsPage() {
|
||||
{/* Launch Screen */}
|
||||
<div className="flex items-center justify-between p-4">
|
||||
<div>
|
||||
<p className="font-medium text-gray-900">Pre-routine launch screen</p>
|
||||
<p className="text-sm text-gray-500">Environment check and emotion bridge</p>
|
||||
<p className="font-medium text-gray-900 dark:text-gray-100">Pre-routine launch screen</p>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">Environment check and emotion bridge</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => updatePref('show_launch_screen', !prefs.show_launch_screen)}
|
||||
className={`w-12 h-7 rounded-full transition-colors ${
|
||||
prefs.show_launch_screen ? 'bg-indigo-500' : 'bg-gray-300'
|
||||
prefs.show_launch_screen ? 'bg-indigo-500' : 'bg-gray-300 dark:bg-gray-600'
|
||||
}`}
|
||||
>
|
||||
<div className={`w-5 h-5 bg-white rounded-full shadow transition-transform ml-1 ${
|
||||
@@ -174,8 +174,8 @@ export default function SettingsPage() {
|
||||
|
||||
{/* Notifications */}
|
||||
<div>
|
||||
<h2 className="text-lg font-semibold text-gray-900 mb-3">Notifications</h2>
|
||||
<div className="bg-white rounded-xl shadow-sm divide-y divide-gray-100">
|
||||
<h2 className="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-3">Notifications</h2>
|
||||
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-sm divide-y divide-gray-100 dark:divide-gray-700">
|
||||
{/* Push Notifications */}
|
||||
<PushNotificationToggle />
|
||||
|
||||
@@ -183,13 +183,13 @@ export default function SettingsPage() {
|
||||
<div className="p-4 space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="font-medium text-gray-900">ntfy</p>
|
||||
<p className="text-sm text-gray-500">Push notifications via ntfy.sh</p>
|
||||
<p className="font-medium text-gray-900 dark:text-gray-100">ntfy</p>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">Push notifications via ntfy.sh</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => updateNotif({ ntfy_enabled: !notif.ntfy_enabled })}
|
||||
className={`w-12 h-7 rounded-full transition-colors ${
|
||||
notif.ntfy_enabled ? 'bg-indigo-500' : 'bg-gray-300'
|
||||
notif.ntfy_enabled ? 'bg-indigo-500' : 'bg-gray-300 dark:bg-gray-600'
|
||||
}`}
|
||||
>
|
||||
<div className={`w-5 h-5 bg-white rounded-full shadow transition-transform ml-1 ${
|
||||
@@ -204,7 +204,7 @@ export default function SettingsPage() {
|
||||
value={notif.ntfy_topic}
|
||||
onChange={(e) => setNotif({ ...notif, ntfy_topic: e.target.value })}
|
||||
onBlur={() => updateNotif({ ntfy_topic: notif.ntfy_topic })}
|
||||
className="w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent text-gray-900 placeholder-gray-400"
|
||||
className="w-full px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 bg-white dark:bg-gray-700"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@@ -213,13 +213,13 @@ export default function SettingsPage() {
|
||||
<div className="p-4 space-y-3">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="font-medium text-gray-900">Discord</p>
|
||||
<p className="text-sm text-gray-500">Get DMs from the Synculous bot</p>
|
||||
<p className="font-medium text-gray-900 dark:text-gray-100">Discord</p>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">Get DMs from the Synculous bot</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => updateNotif({ discord_enabled: !notif.discord_enabled })}
|
||||
className={`w-12 h-7 rounded-full transition-colors ${
|
||||
notif.discord_enabled ? 'bg-indigo-500' : 'bg-gray-300'
|
||||
notif.discord_enabled ? 'bg-indigo-500' : 'bg-gray-300 dark:bg-gray-600'
|
||||
}`}
|
||||
>
|
||||
<div className={`w-5 h-5 bg-white rounded-full shadow transition-transform ml-1 ${
|
||||
@@ -234,7 +234,7 @@ export default function SettingsPage() {
|
||||
value={notif.discord_user_id}
|
||||
onChange={(e) => setNotif({ ...notif, discord_user_id: e.target.value })}
|
||||
onBlur={() => updateNotif({ discord_user_id: notif.discord_user_id })}
|
||||
className="w-full px-3 py-2 text-sm border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent text-gray-900 placeholder-gray-400"
|
||||
className="w-full px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 bg-white dark:bg-gray-700"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@@ -243,8 +243,8 @@ export default function SettingsPage() {
|
||||
|
||||
{/* Celebration Style */}
|
||||
<div>
|
||||
<h2 className="text-lg font-semibold text-gray-900 mb-3">Celebration Style</h2>
|
||||
<div className="bg-white rounded-xl shadow-sm divide-y divide-gray-100">
|
||||
<h2 className="text-lg font-semibold text-gray-900 dark:text-gray-100 mb-3">Celebration Style</h2>
|
||||
<div className="bg-white dark:bg-gray-800 rounded-xl shadow-sm divide-y divide-gray-100 dark:divide-gray-700">
|
||||
{[
|
||||
{ value: 'standard', label: 'Standard', desc: 'Full animated celebration with stats and rewards' },
|
||||
{ value: 'quick', label: 'Quick', desc: 'Brief confirmation, then back to dashboard' },
|
||||
@@ -256,13 +256,13 @@ export default function SettingsPage() {
|
||||
className="w-full flex items-center justify-between p-4 text-left"
|
||||
>
|
||||
<div>
|
||||
<p className="font-medium text-gray-900">{option.label}</p>
|
||||
<p className="text-sm text-gray-500">{option.desc}</p>
|
||||
<p className="font-medium text-gray-900 dark:text-gray-100">{option.label}</p>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400">{option.desc}</p>
|
||||
</div>
|
||||
<div className={`w-5 h-5 rounded-full border-2 flex items-center justify-center ${
|
||||
prefs.celebration_style === option.value
|
||||
? 'border-indigo-500'
|
||||
: 'border-gray-300'
|
||||
: 'border-gray-300 dark:border-gray-600'
|
||||
}`}>
|
||||
{prefs.celebration_style === option.value && (
|
||||
<div className="w-2.5 h-2.5 rounded-full bg-indigo-500" />
|
||||
|
||||
Reference in New Issue
Block a user