feat: google calendar integration, calendar tab, redesign home/devices tabs
Some checks failed
Deploy to VM / deploy (push) Failing after 1s

This commit is contained in:
Cosmo
2026-04-22 12:44:15 +00:00
parent b7facc25b8
commit 38a64ff9c8
6 changed files with 2837 additions and 142 deletions

View File

@@ -1,19 +1,19 @@
'use client'
import { Home, LayoutGrid, Thermometer, Settings } from 'lucide-react'
import { Home, Cpu, CalendarDays, Settings } from 'lucide-react'
type Tab = 'home' | 'rooms' | 'sensors' | 'settings'
type Tab = 'home' | 'devices' | 'calendar' | 'settings'
interface SidebarProps {
active: Tab
onChange: (tab: Tab) => void
}
const navItems: { id: Tab; icon: any }[] = [
{ id: 'home', icon: Home },
{ id: 'rooms', icon: LayoutGrid },
{ id: 'sensors', icon: Thermometer },
{ id: 'settings', icon: Settings },
const navItems: { id: Tab; icon: any; label: string }[] = [
{ id: 'home', icon: Home, label: 'Главная' },
{ id: 'devices', icon: Cpu, label: 'Устройства' },
{ id: 'calendar', icon: CalendarDays, label: 'Календарь' },
{ id: 'settings', icon: Settings, label: 'Настройки' },
]
export default function Sidebar({ active, onChange }: SidebarProps) {
@@ -56,12 +56,13 @@ export default function Sidebar({ active, onChange }: SidebarProps) {
</div>
{/* Nav items */}
{navItems.map(({ id, icon: Icon }) => {
{navItems.map(({ id, icon: Icon, label }) => {
const isActive = active === id
return (
<button
key={id}
onClick={() => onChange(id)}
title={label}
style={{
width: 48,
height: 48,