Spaces:
Running

axeronis commited on
Commit
4f7187d
·
1 Parent(s): 149efd3

feat: Global UX/UI polish, dark backgrounds, and Account Settings page

Browse files
frontend/app/channels/page.tsx CHANGED
@@ -159,7 +159,7 @@ export default function ChannelsPage() {
159
  ]
160
 
161
  return (
162
- <div className="min-h-screen bg-gradient-to-br from-slate-50 to-slate-100 p-8">
163
  <div className="max-w-5xl mx-auto">
164
  {/* Header */}
165
  <div className="mb-8">
 
159
  ]
160
 
161
  return (
162
+ <div className="min-h-screen bg-slate-100 p-8">
163
  <div className="max-w-5xl mx-auto">
164
  {/* Header */}
165
  <div className="mb-8">
frontend/app/knowledge/page.tsx CHANGED
@@ -84,7 +84,7 @@ export default function KnowledgePage() {
84
  }
85
 
86
  return (
87
- <div className="min-h-screen bg-slate-50/50 p-8">
88
  <div className="max-w-5xl mx-auto space-y-8">
89
  {/* Header */}
90
  <motion.div
 
84
  }
85
 
86
  return (
87
+ <div className="min-h-screen bg-slate-100 p-8">
88
  <div className="max-w-5xl mx-auto space-y-8">
89
  {/* Header */}
90
  <motion.div
frontend/app/layout.tsx CHANGED
@@ -15,7 +15,7 @@ export default function RootLayout({
15
  children: React.ReactNode
16
  }) {
17
  const pathname = usePathname()
18
-
19
  // Pages without sidebar (public pages)
20
  const publicPages = ['/', '/login', '/register']
21
  const isPublicPage = publicPages.includes(pathname)
@@ -29,9 +29,9 @@ export default function RootLayout({
29
  children
30
  ) : (
31
  // App layout (with sidebar)
32
- <div className="flex h-screen bg-gray-100">
33
  <Sidebar />
34
-
35
  {/* Main Content Area */}
36
  <main className="flex-1 overflow-auto">
37
  {children}
 
15
  children: React.ReactNode
16
  }) {
17
  const pathname = usePathname()
18
+
19
  // Pages without sidebar (public pages)
20
  const publicPages = ['/', '/login', '/register']
21
  const isPublicPage = publicPages.includes(pathname)
 
29
  children
30
  ) : (
31
  // App layout (with sidebar)
32
+ <div className="flex h-screen bg-slate-100">
33
  <Sidebar />
34
+
35
  {/* Main Content Area */}
36
  <main className="flex-1 overflow-auto">
37
  {children}
frontend/app/partner/page.tsx CHANGED
@@ -148,7 +148,7 @@ export default function PartnerDashboardPage() {
148
  }
149
 
150
  return (
151
- <div className="min-h-screen bg-gradient-to-br from-slate-50 via-indigo-50/20 to-purple-50/20">
152
  {/* Header */}
153
  <div className="bg-white border-b-2 border-indigo-100 shadow-sm">
154
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
 
148
  }
149
 
150
  return (
151
+ <div className="min-h-screen bg-slate-100">
152
  {/* Header */}
153
  <div className="bg-white border-b-2 border-indigo-100 shadow-sm">
154
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
frontend/app/settings/account/page.tsx ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use client'
2
+
3
+ import { useState } from 'react'
4
+ import { motion } from 'framer-motion'
5
+ import { User, Building, Camera, Save, Loader2, Mail, Shield } from 'lucide-react'
6
+ import { useAuth } from '@/contexts/AuthContext'
7
+ import { useToast } from '@/contexts/ToastContext'
8
+
9
+ export default function AccountSettingsPage() {
10
+ const { user } = useAuth()
11
+ const { success } = useToast()
12
+ const [isLoading, setIsLoading] = useState(false)
13
+ const [companyName, setCompanyName] = useState('My Company') // Mock initial value
14
+ const [fullName, setFullName] = useState(user?.full_name || '')
15
+
16
+ const handleSave = async () => {
17
+ setIsLoading(true)
18
+ // Simulate API call
19
+ await new Promise(resolve => setTimeout(resolve, 1000))
20
+ setIsLoading(false)
21
+ success('Changes saved', 'Your account settings have been updated successfully.')
22
+ }
23
+
24
+ return (
25
+ <div className="p-6 max-w-4xl mx-auto space-y-6 font-['Inter']">
26
+ <div>
27
+ <h1 className="text-2xl font-bold text-slate-900">Account Settings</h1>
28
+ <p className="text-slate-500">Manage your profile and company details</p>
29
+ </div>
30
+
31
+ <div className="grid gap-6">
32
+ {/* Profile Card */}
33
+ <motion.div
34
+ initial={{ opacity: 0, y: 20 }}
35
+ animate={{ opacity: 1, y: 0 }}
36
+ className="bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden"
37
+ >
38
+ <div className="p-6 border-b border-slate-100">
39
+ <h2 className="text-lg font-bold text-slate-900 flex items-center gap-2">
40
+ <User className="w-5 h-5 text-indigo-600" />
41
+ Profile Information
42
+ </h2>
43
+ <p className="text-sm text-slate-500 mt-1">Update your personal information and avatar</p>
44
+ </div>
45
+
46
+ <div className="p-6 space-y-6">
47
+ {/* Avatar Section */}
48
+ <div className="flex items-center gap-6">
49
+ <div className="relative group">
50
+ <div className="w-24 h-24 rounded-full bg-slate-100 flex items-center justify-center text-3xl font-bold text-slate-400 border-4 border-white shadow-lg overflow-hidden">
51
+ {/* Placeholder or User Avatar */}
52
+ {user?.full_name ? user.full_name.charAt(0).toUpperCase() : 'U'}
53
+ </div>
54
+ <button className="absolute bottom-0 right-0 p-2 bg-indigo-600 text-white rounded-full shadow-md hover:bg-indigo-700 transition-colors border-2 border-white">
55
+ <Camera className="w-4 h-4" />
56
+ </button>
57
+ </div>
58
+ <div>
59
+ <h3 className="font-bold text-slate-900">Profile Photo</h3>
60
+ <p className="text-sm text-slate-500 mb-3">Upload a new avatar or remove the current one.</p>
61
+ <div className="flex gap-3">
62
+ <button className="px-4 py-2 text-xs font-bold text-indigo-600 bg-indigo-50 rounded-lg hover:bg-indigo-100 transition-colors">
63
+ Upload New
64
+ </button>
65
+ <button className="px-4 py-2 text-xs font-bold text-red-600 bg-red-50 rounded-lg hover:bg-red-100 transition-colors">
66
+ Remove
67
+ </button>
68
+ </div>
69
+ </div>
70
+ </div>
71
+
72
+ <div className="grid grid-cols-2 gap-6">
73
+ <div className="space-y-2">
74
+ <label className="text-sm font-bold text-slate-700">Full Name</label>
75
+ <div className="relative">
76
+ <User className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" />
77
+ <input
78
+ type="text"
79
+ value={fullName}
80
+ onChange={(e) => setFullName(e.target.value)}
81
+ className="w-full pl-10 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-xl text-sm font-medium text-slate-900 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all"
82
+ placeholder="John Doe"
83
+ />
84
+ </div>
85
+ </div>
86
+
87
+ <div className="space-y-2">
88
+ <label className="text-sm font-bold text-slate-700">Email Address</label>
89
+ <div className="relative">
90
+ <Mail className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" />
91
+ <input
92
+ type="email"
93
+ value={user?.email || ''}
94
+ disabled
95
+ className="w-full pl-10 pr-4 py-2.5 bg-slate-100 border border-slate-200 rounded-xl text-sm font-medium text-slate-500 cursor-not-allowed"
96
+ />
97
+ </div>
98
+ <p className="text-[10px] text-slate-400 flex items-center gap-1">
99
+ <Shield className="w-3 h-3" />
100
+ Email cannot be changed
101
+ </p>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </motion.div>
106
+
107
+ {/* Company Card */}
108
+ <motion.div
109
+ initial={{ opacity: 0, y: 20 }}
110
+ animate={{ opacity: 1, y: 0 }}
111
+ transition={{ delay: 0.1 }}
112
+ className="bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden"
113
+ >
114
+ <div className="p-6 border-b border-slate-100">
115
+ <h2 className="text-lg font-bold text-slate-900 flex items-center gap-2">
116
+ <Building className="w-5 h-5 text-indigo-600" />
117
+ Company Details
118
+ </h2>
119
+ <p className="text-sm text-slate-500 mt-1">Manage your company information</p>
120
+ </div>
121
+
122
+ <div className="p-6 space-y-6">
123
+ <div className="space-y-2">
124
+ <label className="text-sm font-bold text-slate-700">Company Name</label>
125
+ <div className="relative">
126
+ <Building className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400" />
127
+ <input
128
+ type="text"
129
+ value={companyName}
130
+ onChange={(e) => setCompanyName(e.target.value)}
131
+ className="w-full pl-10 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-xl text-sm font-medium text-slate-900 focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-500 transition-all"
132
+ placeholder="Acme Inc."
133
+ />
134
+ </div>
135
+ </div>
136
+ </div>
137
+
138
+ <div className="p-4 bg-slate-50 border-t border-slate-100 flex justify-end">
139
+ <button
140
+ onClick={handleSave}
141
+ disabled={isLoading}
142
+ className="flex items-center gap-2 px-6 py-2.5 bg-indigo-600 text-white text-sm font-bold rounded-xl hover:bg-indigo-700 transition-all shadow-lg shadow-indigo-600/20 active:scale-95 disabled:opacity-70 disabled:cursor-not-allowed"
143
+ >
144
+ {isLoading ? <Loader2 className="w-4 h-4 animate-spin" /> : <Save className="w-4 h-4" />}
145
+ Save Changes
146
+ </button>
147
+ </div>
148
+ </motion.div>
149
+ </div>
150
+ </div>
151
+ )
152
+ }
frontend/app/settings/billing/page.tsx CHANGED
@@ -138,7 +138,7 @@ export default function BillingPage() {
138
  }
139
 
140
  return (
141
- <div className="min-h-screen bg-slate-50/50 p-8">
142
  <div className="max-w-7xl mx-auto">
143
  {/* Header */}
144
  <motion.div
 
138
  }
139
 
140
  return (
141
+ <div className="min-h-screen bg-slate-100 p-8">
142
  <div className="max-w-7xl mx-auto">
143
  {/* Header */}
144
  <motion.div
frontend/app/settings/brain/page.tsx CHANGED
@@ -244,7 +244,7 @@ export default function BrainSettingsPage() {
244
  }
245
 
246
  return (
247
- <div className="min-h-screen bg-slate-50/50 p-8">
248
  <div className="max-w-5xl mx-auto">
249
  {/* Header */}
250
  <motion.div
 
244
  }
245
 
246
  return (
247
+ <div className="min-h-screen bg-slate-100 p-8">
248
  <div className="max-w-5xl mx-auto">
249
  {/* Header */}
250
  <motion.div
frontend/app/settings/crm/page.tsx CHANGED
@@ -214,7 +214,7 @@ export default function CRMSettingsPage() {
214
  }
215
 
216
  return (
217
- <div className="min-h-screen bg-slate-50">
218
  <div className="max-w-6xl mx-auto p-8">
219
  {/* Header */}
220
  <div className="mb-8">
@@ -270,8 +270,8 @@ export default function CRMSettingsPage() {
270
  key={type.value}
271
  onClick={() => setNewIntegration({ ...newIntegration, crm_type: type.value })}
272
  className={`p-3 rounded-xl border text-left transition-all ${newIntegration.crm_type === type.value
273
- ? 'border-indigo-600 bg-indigo-50 ring-2 ring-indigo-500/20'
274
- : 'border-slate-200 hover:border-indigo-300 hover:bg-slate-50'
275
  }`}
276
  >
277
  <div className="font-medium text-slate-900">{type.label}</div>
 
214
  }
215
 
216
  return (
217
+ <div className="min-h-screen bg-slate-100">
218
  <div className="max-w-6xl mx-auto p-8">
219
  {/* Header */}
220
  <div className="mb-8">
 
270
  key={type.value}
271
  onClick={() => setNewIntegration({ ...newIntegration, crm_type: type.value })}
272
  className={`p-3 rounded-xl border text-left transition-all ${newIntegration.crm_type === type.value
273
+ ? 'border-indigo-600 bg-indigo-50 ring-2 ring-indigo-500/20'
274
+ : 'border-slate-200 hover:border-indigo-300 hover:bg-slate-50'
275
  }`}
276
  >
277
  <div className="font-medium text-slate-900">{type.label}</div>
frontend/app/settings/playbook/page.tsx CHANGED
@@ -240,7 +240,7 @@ export default function PlaybookEditorPage() {
240
  }
241
 
242
  return (
243
- <div className="min-h-screen bg-slate-50/50 p-8">
244
  <div className="max-w-7xl mx-auto">
245
  {/* Header */}
246
  <motion.div
 
240
  }
241
 
242
  return (
243
+ <div className="min-h-screen bg-slate-100 p-8">
244
  <div className="max-w-7xl mx-auto">
245
  {/* Header */}
246
  <motion.div
frontend/app/settings/team/page.tsx CHANGED
@@ -149,7 +149,7 @@ export default function TeamPage() {
149
  }
150
 
151
  return (
152
- <div className="min-h-screen bg-slate-50/50 p-8">
153
  <div className="max-w-5xl mx-auto">
154
  {/* Header */}
155
  <motion.div
 
149
  }
150
 
151
  return (
152
+ <div className="min-h-screen bg-slate-100 p-8">
153
  <div className="max-w-5xl mx-auto">
154
  {/* Header */}
155
  <motion.div
frontend/components/Sidebar.tsx CHANGED
@@ -2,7 +2,7 @@
2
 
3
  import Link from 'next/link'
4
  import { usePathname } from 'next/navigation'
5
- import { LayoutDashboard, MessageSquare, Database, DollarSign, Send, LogOut, Brain, Target, Plug, Zap, Users, ChevronRight, Sparkles, Command } from 'lucide-react'
6
  import { useAuth } from '@/contexts/AuthContext'
7
  import { motion, AnimatePresence } from 'framer-motion'
8
  import { cn } from '@/lib/utils'
@@ -233,6 +233,16 @@ export function Sidebar() {
233
  <DollarSign className={cn("w-5 h-5 transition-colors", isActive('/settings/billing') ? "text-white" : "text-slate-500 group-hover:text-indigo-400")} />
234
  <span>Тариф и Оплата</span>
235
  </Link>
 
 
 
 
 
 
 
 
 
 
236
  </div>
237
  </motion.div>
238
  </nav>
 
2
 
3
  import Link from 'next/link'
4
  import { usePathname } from 'next/navigation'
5
+ import { LayoutDashboard, MessageSquare, Database, DollarSign, Send, LogOut, Brain, Target, Plug, Zap, Users, ChevronRight, Sparkles, Command, User } from 'lucide-react'
6
  import { useAuth } from '@/contexts/AuthContext'
7
  import { motion, AnimatePresence } from 'framer-motion'
8
  import { cn } from '@/lib/utils'
 
233
  <DollarSign className={cn("w-5 h-5 transition-colors", isActive('/settings/billing') ? "text-white" : "text-slate-500 group-hover:text-indigo-400")} />
234
  <span>Тариф и Оплата</span>
235
  </Link>
236
+
237
+ <Link href="/settings/account" className={cn(
238
+ "flex items-center gap-3 px-4 py-2.5 rounded-xl text-sm font-medium transition-all duration-200 group relative",
239
+ isActive('/settings/account')
240
+ ? "text-white bg-indigo-600 shadow-lg shadow-indigo-900/20"
241
+ : "text-slate-400 hover:text-white hover:bg-white/5"
242
+ )}>
243
+ <User className={cn("w-5 h-5 transition-colors", isActive('/settings/account') ? "text-white" : "text-slate-500 group-hover:text-indigo-400")} />
244
+ <span>Аккаунт</span>
245
+ </Link>
246
  </div>
247
  </motion.div>
248
  </nav>