Replace notifications with activity feed

This commit is contained in:
Cauê Faleiros
2026-05-29 14:34:40 -03:00
parent 0f322e9c85
commit e64654c820
14 changed files with 154 additions and 313 deletions

View File

@@ -1,5 +1,5 @@
import React, { useState, useEffect, useRef } from 'react';
import { Camera, Save, Mail, User as UserIcon, Building, Shield, Loader2, CheckCircle2, Bell } from 'lucide-react';
import { Camera, Save, Mail, User as UserIcon, Building, Shield, Loader2, CheckCircle2 } from 'lucide-react';
import { getUserById, getTenants, getTeams, updateUser, uploadAvatar } from '../services/dataService';
import { User, Tenant } from '../types';
@@ -273,32 +273,6 @@ export const UserProfile: React.FC = () => {
<p className="text-xs text-zinc-400 dark:text-zinc-500 text-right">{bio.length}/500 caracteres</p>
</div>
<div className="space-y-2 pt-2">
<div className="flex items-center justify-between p-4 bg-zinc-50 dark:bg-zinc-900/50 rounded-xl border border-zinc-200 dark:border-zinc-800">
<div>
<h4 className="text-sm font-semibold text-zinc-900 dark:text-zinc-100 flex items-center gap-2">
<Bell size={16} className="text-brand-yellow" /> Notificações Sonoras
</h4>
<p className="text-xs text-zinc-500 dark:text-zinc-400 mt-1">
Reproduzir um som quando você receber uma nova notificação.
</p>
</div>
<label className="relative inline-flex items-center cursor-pointer">
<input
type="checkbox"
className="sr-only peer"
checked={user.sound_enabled ?? true}
onChange={async (e) => {
const newStatus = e.target.checked;
setUser({...user, sound_enabled: newStatus});
await updateUser(user.id, { sound_enabled: newStatus });
}}
/>
<div className="w-11 h-6 bg-zinc-200 peer-focus:outline-none rounded-full peer dark:bg-zinc-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-zinc-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-zinc-600 peer-checked:bg-brand-yellow"></div>
</label>
</div>
</div>
<div className="pt-4 flex items-center justify-end border-t border-zinc-100 dark:border-zinc-800 mt-6 transition-colors">
<button
type="button"