Initial commit: Plan EAL v3 Dashboard
- React 19 + Vite 7 + TypeScript - Tailwind CSS 4 com glassmorphism - Framer Motion animações - Bento Grid layout - Sparkline charts SVG - Progress ring animado DeskCRM Task: #1604 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
node_modules/
|
||||
dist/
|
||||
.env
|
||||
.env.local
|
||||
*.log
|
||||
.DS_Store
|
||||
.vite/
|
||||
73
README.md
Normal file
73
README.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# React + TypeScript + Vite
|
||||
|
||||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
||||
|
||||
Currently, two official plugins are available:
|
||||
|
||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
|
||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
||||
|
||||
## React Compiler
|
||||
|
||||
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
||||
|
||||
## Expanding the ESLint configuration
|
||||
|
||||
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
||||
|
||||
```js
|
||||
export default defineConfig([
|
||||
globalIgnores(['dist']),
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
extends: [
|
||||
// Other configs...
|
||||
|
||||
// Remove tseslint.configs.recommended and replace with this
|
||||
tseslint.configs.recommendedTypeChecked,
|
||||
// Alternatively, use this for stricter rules
|
||||
tseslint.configs.strictTypeChecked,
|
||||
// Optionally, add this for stylistic rules
|
||||
tseslint.configs.stylisticTypeChecked,
|
||||
|
||||
// Other configs...
|
||||
],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
// other options...
|
||||
},
|
||||
},
|
||||
])
|
||||
```
|
||||
|
||||
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import reactX from 'eslint-plugin-react-x'
|
||||
import reactDom from 'eslint-plugin-react-dom'
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores(['dist']),
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
extends: [
|
||||
// Other configs...
|
||||
// Enable lint rules for React
|
||||
reactX.configs['recommended-typescript'],
|
||||
// Enable lint rules for React DOM
|
||||
reactDom.configs.recommended,
|
||||
],
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
},
|
||||
// other options...
|
||||
},
|
||||
},
|
||||
])
|
||||
```
|
||||
19
README.txt
Normal file
19
README.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
DeskCRM Task: #1604
|
||||
Project: SDK Dashboard - Biblioteca de Componentes
|
||||
Description: Plan-EAL v3 - Dashboard Monitoring com design profissional (glassmorphism, bento grid, Framer Motion)
|
||||
Created: 2026-02-03
|
||||
Status: Pronto para deploy (aguarda novo domínio/EasyPanel)
|
||||
|
||||
Stack:
|
||||
- React 19 + Vite 7 + TypeScript
|
||||
- Tailwind CSS 4
|
||||
- Framer Motion (animações)
|
||||
- Recharts (gráficos)
|
||||
- Lucide React (ícones)
|
||||
|
||||
Componentes:
|
||||
- MetricCard, ServerCard, PerformanceChart
|
||||
- ServicesList, ActivityFeed, UptimeChart
|
||||
|
||||
Dev server: npm run dev (porta 3050)
|
||||
Build: npm run build
|
||||
23
eslint.config.js
Normal file
23
eslint.config.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import reactHooks from 'eslint-plugin-react-hooks'
|
||||
import reactRefresh from 'eslint-plugin-react-refresh'
|
||||
import tseslint from 'typescript-eslint'
|
||||
import { defineConfig, globalIgnores } from 'eslint/config'
|
||||
|
||||
export default defineConfig([
|
||||
globalIgnores(['dist']),
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
extends: [
|
||||
js.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
reactHooks.configs.flat.recommended,
|
||||
reactRefresh.configs.vite,
|
||||
],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
},
|
||||
},
|
||||
])
|
||||
14
index.html
Normal file
14
index.html
Normal file
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<html lang="pt">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="theme-color" content="#0a0a0f" />
|
||||
<title>Plan EAL · Descomplicar Dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
4432
package-lock.json
generated
Normal file
4432
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
package.json
Normal file
39
package.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "plan-eal-v3",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"clsx": "^2.1.1",
|
||||
"framer-motion": "^12.30.1",
|
||||
"lucide-react": "^0.563.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"recharts": "^3.7.0",
|
||||
"tailwind-merge": "^3.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@tailwindcss/postcss": "^4.1.18",
|
||||
"@types/node": "^24.10.10",
|
||||
"@types/react": "^19.2.5",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^5.1.1",
|
||||
"autoprefixer": "^10.4.24",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-plugin-react-hooks": "^7.0.1",
|
||||
"eslint-plugin-react-refresh": "^0.4.24",
|
||||
"globals": "^16.5.0",
|
||||
"postcss": "^8.5.6",
|
||||
"tailwindcss": "^4.1.18",
|
||||
"typescript": "~5.9.3",
|
||||
"typescript-eslint": "^8.46.4",
|
||||
"vite": "^7.2.4"
|
||||
}
|
||||
}
|
||||
5
postcss.config.js
Normal file
5
postcss.config.js
Normal file
@@ -0,0 +1,5 @@
|
||||
export default {
|
||||
plugins: {
|
||||
'@tailwindcss/postcss': {},
|
||||
},
|
||||
}
|
||||
10
public/favicon.svg
Normal file
10
public/favicon.svg
Normal file
@@ -0,0 +1,10 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs>
|
||||
<linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" stop-color="#6366f1"/>
|
||||
<stop offset="100%" stop-color="#8b5cf6"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="32" height="32" rx="8" fill="url(#g)"/>
|
||||
<path d="M10 16l4 4 8-8" stroke="#fff" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 445 B |
1
public/vite.svg
Normal file
1
public/vite.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
42
src/App.css
Normal file
42
src/App.css
Normal file
@@ -0,0 +1,42 @@
|
||||
#root {
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 6em;
|
||||
padding: 1.5em;
|
||||
will-change: filter;
|
||||
transition: filter 300ms;
|
||||
}
|
||||
.logo:hover {
|
||||
filter: drop-shadow(0 0 2em #646cffaa);
|
||||
}
|
||||
.logo.react:hover {
|
||||
filter: drop-shadow(0 0 2em #61dafbaa);
|
||||
}
|
||||
|
||||
@keyframes logo-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
a:nth-of-type(2) .logo {
|
||||
animation: logo-spin infinite 20s linear;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
.read-the-docs {
|
||||
color: #888;
|
||||
}
|
||||
898
src/App.tsx
Normal file
898
src/App.tsx
Normal file
@@ -0,0 +1,898 @@
|
||||
import { useState, useEffect, useCallback } from 'react'
|
||||
import { motion, AnimatePresence } from 'framer-motion'
|
||||
import {
|
||||
Calendar,
|
||||
CalendarDays,
|
||||
AlertTriangle,
|
||||
Clock,
|
||||
Zap,
|
||||
RefreshCw,
|
||||
XCircle,
|
||||
FolderKanban,
|
||||
TrendingUp,
|
||||
FileText,
|
||||
Phone,
|
||||
MessageSquare,
|
||||
CreditCard,
|
||||
Coffee,
|
||||
TestTube,
|
||||
ArrowUpRight,
|
||||
Ticket,
|
||||
CheckCircle2,
|
||||
Timer,
|
||||
Sparkles,
|
||||
LayoutDashboard,
|
||||
Activity,
|
||||
Target,
|
||||
} from 'lucide-react'
|
||||
|
||||
// Types
|
||||
interface Evento {
|
||||
titulo: string
|
||||
hora: string
|
||||
data?: string
|
||||
tipo: 'personal' | 'work'
|
||||
link: string
|
||||
}
|
||||
|
||||
interface Tarefa {
|
||||
id: number
|
||||
name: string
|
||||
projeto: string
|
||||
dias?: number
|
||||
dias_atraso?: number
|
||||
}
|
||||
|
||||
interface Lead {
|
||||
id: number
|
||||
name: string
|
||||
company: string
|
||||
source: string
|
||||
dias: number
|
||||
dias_sem_contacto?: number
|
||||
}
|
||||
|
||||
interface Projeto {
|
||||
id: number
|
||||
name: string
|
||||
cliente: string
|
||||
total: number
|
||||
concluidas: number
|
||||
}
|
||||
|
||||
interface Cliente360 {
|
||||
client_name: string
|
||||
desk_project_id: number
|
||||
total_invoiced: number
|
||||
total_delivered: number
|
||||
balance: number
|
||||
status: 'credit' | 'debt' | 'ok'
|
||||
}
|
||||
|
||||
interface DashboardData {
|
||||
data_formatada: string
|
||||
is_monday: boolean
|
||||
eventos_hoje: Evento[]
|
||||
eventos_semana: Evento[]
|
||||
monday_mood: Tarefa[]
|
||||
urgente: Tarefa[]
|
||||
alta: Tarefa[]
|
||||
vencidas: Tarefa[]
|
||||
em_testes: Tarefa[]
|
||||
esta_semana: Tarefa[]
|
||||
tickets: { ticketid: number; subject: string }[]
|
||||
proposta: Lead[]
|
||||
contactar: Lead[]
|
||||
followup: Lead[]
|
||||
projectos: Projeto[]
|
||||
billing_360: Cliente360[]
|
||||
resumo: {
|
||||
tarefas: number
|
||||
tickets: number
|
||||
projectos: number
|
||||
leads: number
|
||||
horas: number
|
||||
horas_pct: number
|
||||
pipeline_valor: number
|
||||
}
|
||||
}
|
||||
|
||||
// Animation variants
|
||||
const containerVariants = {
|
||||
hidden: { opacity: 0 },
|
||||
show: {
|
||||
opacity: 1,
|
||||
transition: { staggerChildren: 0.06 }
|
||||
}
|
||||
}
|
||||
|
||||
const itemVariants = {
|
||||
hidden: { opacity: 0, y: 20, scale: 0.95 },
|
||||
show: {
|
||||
opacity: 1,
|
||||
y: 0,
|
||||
scale: 1,
|
||||
transition: { type: 'spring', stiffness: 300, damping: 30 }
|
||||
}
|
||||
}
|
||||
|
||||
// Sparkline Mini Chart
|
||||
const Sparkline = ({ data, color }: { data: number[], color: string }) => {
|
||||
const max = Math.max(...data)
|
||||
const min = Math.min(...data)
|
||||
const range = max - min || 1
|
||||
const points = data.map((v, i) => `${(i / (data.length - 1)) * 100},${100 - ((v - min) / range) * 80}`).join(' ')
|
||||
|
||||
return (
|
||||
<svg className="w-20 h-8" viewBox="0 0 100 100" preserveAspectRatio="none">
|
||||
<defs>
|
||||
<linearGradient id={`grad-${color}`} x1="0%" y1="0%" x2="0%" y2="100%">
|
||||
<stop offset="0%" stopColor={color} stopOpacity="0.3" />
|
||||
<stop offset="100%" stopColor={color} stopOpacity="0" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<polygon
|
||||
fill={`url(#grad-${color})`}
|
||||
points={`0,100 ${points} 100,100`}
|
||||
/>
|
||||
<polyline
|
||||
fill="none"
|
||||
stroke={color}
|
||||
strokeWidth="3"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
points={points}
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
}
|
||||
|
||||
// Hero Stat Card - Big impact numbers
|
||||
const HeroStat = ({
|
||||
icon: Icon,
|
||||
label,
|
||||
value,
|
||||
sub,
|
||||
trend,
|
||||
sparkData,
|
||||
status,
|
||||
gradient,
|
||||
}: {
|
||||
icon: React.ElementType
|
||||
label: string
|
||||
value: string | number
|
||||
sub: string
|
||||
trend?: string
|
||||
sparkData?: number[]
|
||||
status?: 'ok' | 'warning' | 'critical'
|
||||
gradient: string
|
||||
}) => {
|
||||
const statusGlow = {
|
||||
ok: 'shadow-emerald-500/20',
|
||||
warning: 'shadow-amber-500/20',
|
||||
critical: 'shadow-red-500/20',
|
||||
}
|
||||
const trendColor = trend?.startsWith('+') ? 'text-emerald-400' : trend?.startsWith('-') ? 'text-red-400' : 'text-zinc-400'
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
variants={itemVariants}
|
||||
whileHover={{ scale: 1.02, y: -4 }}
|
||||
className={`relative overflow-hidden rounded-2xl bg-gradient-to-br ${gradient} p-6 border border-white/10 ${status ? statusGlow[status] : ''} shadow-2xl`}
|
||||
>
|
||||
<div className="absolute -right-8 -top-8 opacity-10">
|
||||
<Icon className="w-32 h-32" />
|
||||
</div>
|
||||
<div className="relative z-10">
|
||||
<div className="flex items-start justify-between mb-4">
|
||||
<div className="w-12 h-12 rounded-xl bg-white/10 backdrop-blur flex items-center justify-center">
|
||||
<Icon className="w-6 h-6 text-white" />
|
||||
</div>
|
||||
{sparkData && <Sparkline data={sparkData} color="#fff" />}
|
||||
</div>
|
||||
<div className="text-sm text-white/70 mb-1">{label}</div>
|
||||
<div className="flex items-baseline gap-3">
|
||||
<span className="text-4xl font-bold text-white tracking-tight">{value}</span>
|
||||
{trend && <span className={`text-sm font-medium ${trendColor}`}>{trend}</span>}
|
||||
</div>
|
||||
<div className="text-sm text-white/50 mt-2">{sub}</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
)
|
||||
}
|
||||
|
||||
// Status Pill
|
||||
const StatusPill = ({ children, variant }: { children: React.ReactNode; variant: string }) => {
|
||||
const styles: Record<string, string> = {
|
||||
project: 'bg-blue-500/20 text-blue-300 ring-blue-500/30',
|
||||
lead: 'bg-emerald-500/20 text-emerald-300 ring-emerald-500/30',
|
||||
followup: 'bg-violet-500/20 text-violet-300 ring-violet-500/30',
|
||||
overdue: 'bg-red-500/20 text-red-300 ring-red-500/30',
|
||||
testing: 'bg-cyan-500/20 text-cyan-300 ring-cyan-500/30',
|
||||
personal: 'bg-violet-500/20 text-violet-300 ring-violet-500/30',
|
||||
work: 'bg-amber-500/20 text-amber-300 ring-amber-500/30',
|
||||
credit: 'bg-emerald-500/20 text-emerald-300 ring-emerald-500/30',
|
||||
debt: 'bg-red-500/20 text-red-300 ring-red-500/30',
|
||||
ok: 'bg-amber-500/20 text-amber-300 ring-amber-500/30',
|
||||
days: 'bg-zinc-700/50 text-zinc-300 ring-zinc-600/30',
|
||||
}
|
||||
return (
|
||||
<span className={`inline-flex items-center px-2 py-0.5 rounded-md text-[11px] font-semibold ring-1 ring-inset ${styles[variant] || 'bg-zinc-700/50 text-zinc-300'}`}>
|
||||
{children}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
||||
// Glass Card with accent
|
||||
const GlassCard = ({
|
||||
title,
|
||||
icon: Icon,
|
||||
count,
|
||||
value,
|
||||
accent,
|
||||
size = 'normal',
|
||||
children,
|
||||
}: {
|
||||
title: string
|
||||
icon: React.ElementType
|
||||
count?: number
|
||||
value?: string
|
||||
accent?: 'amber' | 'cyan' | 'violet' | 'emerald' | 'red' | 'blue'
|
||||
size?: 'normal' | 'tall' | 'wide'
|
||||
children: React.ReactNode
|
||||
}) => {
|
||||
const accentColors = {
|
||||
amber: 'from-amber-500/10 border-amber-500/30 hover:border-amber-500/50',
|
||||
cyan: 'from-cyan-500/10 border-cyan-500/30 hover:border-cyan-500/50',
|
||||
violet: 'from-violet-500/10 border-violet-500/30 hover:border-violet-500/50',
|
||||
emerald: 'from-emerald-500/10 border-emerald-500/30 hover:border-emerald-500/50',
|
||||
red: 'from-red-500/10 border-red-500/30 hover:border-red-500/50',
|
||||
blue: 'from-blue-500/10 border-blue-500/30 hover:border-blue-500/50',
|
||||
}
|
||||
const sizeClasses = {
|
||||
normal: '',
|
||||
tall: 'md:row-span-2',
|
||||
wide: 'md:col-span-2',
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.div
|
||||
variants={itemVariants}
|
||||
whileHover={{ y: -2 }}
|
||||
className={`group relative overflow-hidden rounded-2xl bg-gradient-to-br ${accent ? accentColors[accent] : 'from-white/5 border-white/10 hover:border-white/20'} to-transparent backdrop-blur-xl border transition-all duration-300 ${sizeClasses[size]}`}
|
||||
>
|
||||
{/* Glow effect on hover */}
|
||||
<div className={`absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500 bg-gradient-to-r ${accent ? `from-${accent}-500/5` : 'from-brand-500/5'} to-transparent`} />
|
||||
|
||||
<div className="relative z-10">
|
||||
<div className="flex items-center justify-between px-5 py-4 border-b border-white/5">
|
||||
<h3 className="text-sm font-semibold text-white flex items-center gap-2">
|
||||
<Icon className={`w-4 h-4 ${accent ? `text-${accent}-400` : 'text-brand-400'}`} />
|
||||
{title}
|
||||
</h3>
|
||||
<div className="flex items-center gap-2">
|
||||
{count !== undefined && (
|
||||
<span className="px-2.5 py-0.5 rounded-full bg-white/10 text-xs font-semibold text-white/80">
|
||||
{count}
|
||||
</span>
|
||||
)}
|
||||
{value && (
|
||||
<span className="px-2.5 py-0.5 rounded-full bg-emerald-500/20 text-xs font-bold text-emerald-400">
|
||||
{value}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="p-3 max-h-[320px] overflow-y-auto space-y-1.5 scrollbar-thin">
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
)
|
||||
}
|
||||
|
||||
// List Item with hover effect
|
||||
const ListItem = ({
|
||||
href,
|
||||
children,
|
||||
badges,
|
||||
}: {
|
||||
href: string
|
||||
children: React.ReactNode
|
||||
badges?: React.ReactNode
|
||||
}) => (
|
||||
<motion.a
|
||||
href={href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
whileHover={{ x: 4 }}
|
||||
className="flex items-start justify-between gap-3 p-3 rounded-xl bg-white/[0.02] hover:bg-white/[0.06] border border-transparent hover:border-white/10 transition-all group cursor-pointer"
|
||||
>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="text-sm text-zinc-200 group-hover:text-white transition-colors truncate">
|
||||
{children}
|
||||
</div>
|
||||
{badges && <div className="mt-1.5 flex flex-wrap gap-1.5">{badges}</div>}
|
||||
</div>
|
||||
<ArrowUpRight className="w-4 h-4 text-zinc-600 group-hover:text-brand-400 transition-colors flex-shrink-0 mt-0.5" />
|
||||
</motion.a>
|
||||
)
|
||||
|
||||
// Progress Ring
|
||||
const ProgressRing = ({ progress, size = 120 }: { progress: number; size?: number }) => {
|
||||
const strokeWidth = 8
|
||||
const radius = (size - strokeWidth) / 2
|
||||
const circumference = radius * 2 * Math.PI
|
||||
const offset = circumference - (progress / 100) * circumference
|
||||
|
||||
return (
|
||||
<div className="relative" style={{ width: size, height: size }}>
|
||||
<svg className="transform -rotate-90" width={size} height={size}>
|
||||
<circle
|
||||
className="text-white/5"
|
||||
strokeWidth={strokeWidth}
|
||||
stroke="currentColor"
|
||||
fill="transparent"
|
||||
r={radius}
|
||||
cx={size / 2}
|
||||
cy={size / 2}
|
||||
/>
|
||||
<motion.circle
|
||||
className="text-brand-500"
|
||||
strokeWidth={strokeWidth}
|
||||
strokeLinecap="round"
|
||||
stroke="currentColor"
|
||||
fill="transparent"
|
||||
r={radius}
|
||||
cx={size / 2}
|
||||
cy={size / 2}
|
||||
initial={{ strokeDashoffset: circumference }}
|
||||
animate={{ strokeDashoffset: offset }}
|
||||
transition={{ duration: 1, delay: 0.5, ease: 'easeOut' }}
|
||||
style={{ strokeDasharray: circumference }}
|
||||
/>
|
||||
</svg>
|
||||
<div className="absolute inset-0 flex flex-col items-center justify-center">
|
||||
<span className="text-3xl font-bold text-white">{progress}%</span>
|
||||
<span className="text-xs text-zinc-500">completo</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Summary Widget - Bento style
|
||||
const SummaryWidget = ({ data }: { data: DashboardData['resumo'] }) => (
|
||||
<motion.div
|
||||
variants={itemVariants}
|
||||
className="relative overflow-hidden rounded-2xl bg-gradient-to-br from-brand-500/10 to-violet-500/5 border border-brand-500/20 p-6 md:col-span-2"
|
||||
>
|
||||
<div className="absolute -right-20 -bottom-20 opacity-5">
|
||||
<Target className="w-64 h-64" />
|
||||
</div>
|
||||
<div className="relative z-10">
|
||||
<h3 className="text-lg font-semibold text-white flex items-center gap-2 mb-6">
|
||||
<Activity className="w-5 h-5 text-brand-400" />
|
||||
Resumo da Semana
|
||||
</h3>
|
||||
<div className="flex flex-col md:flex-row items-center gap-8">
|
||||
<ProgressRing progress={data.horas_pct} />
|
||||
<div className="flex-1 grid grid-cols-2 md:grid-cols-4 gap-4">
|
||||
{[
|
||||
{ label: 'Tarefas', value: data.tarefas, icon: CheckCircle2, color: 'text-brand-400' },
|
||||
{ label: 'Tickets', value: data.tickets, icon: Ticket, color: 'text-amber-400' },
|
||||
{ label: 'Projectos', value: data.projectos, icon: FolderKanban, color: 'text-cyan-400' },
|
||||
{ label: 'Leads', value: data.leads, icon: TrendingUp, color: 'text-emerald-400' },
|
||||
].map((item) => (
|
||||
<motion.div
|
||||
key={item.label}
|
||||
whileHover={{ scale: 1.05 }}
|
||||
className="bg-white/5 rounded-xl p-4 text-center border border-white/5"
|
||||
>
|
||||
<item.icon className={`w-5 h-5 ${item.color} mx-auto mb-2`} />
|
||||
<div className={`text-2xl font-bold ${item.color}`}>{item.value}</div>
|
||||
<div className="text-xs text-zinc-500">{item.label}</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-6 bg-white/5 rounded-xl p-4">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<span className="text-sm text-zinc-400">Horas trabalhadas</span>
|
||||
<span className="text-sm font-medium text-white">{data.horas}h / 40h</span>
|
||||
</div>
|
||||
<div className="h-2 rounded-full bg-white/10 overflow-hidden">
|
||||
<motion.div
|
||||
initial={{ width: 0 }}
|
||||
animate={{ width: `${data.horas_pct}%` }}
|
||||
transition={{ duration: 1, delay: 0.5 }}
|
||||
className="h-full rounded-full bg-gradient-to-r from-brand-500 via-violet-500 to-pink-500"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
)
|
||||
|
||||
// Main App
|
||||
function App() {
|
||||
const [data, setData] = useState<DashboardData | null>(null)
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [refreshing, setRefreshing] = useState(false)
|
||||
|
||||
const fetchData = useCallback(async () => {
|
||||
setRefreshing(true)
|
||||
try {
|
||||
const response = await fetch('/api.php')
|
||||
if (!response.ok) throw new Error('Failed to fetch')
|
||||
const json = await response.json()
|
||||
setData(json)
|
||||
} catch {
|
||||
setData(getMockData())
|
||||
} finally {
|
||||
setLoading(false)
|
||||
setRefreshing(false)
|
||||
}
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
fetchData()
|
||||
}, [fetchData])
|
||||
|
||||
const getGreeting = () => {
|
||||
const hour = new Date().getHours()
|
||||
if (hour < 12) return 'Bom dia'
|
||||
if (hour < 19) return 'Boa tarde'
|
||||
return 'Boa noite'
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="min-h-screen bg-mesh flex items-center justify-center">
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.8 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
className="text-center"
|
||||
>
|
||||
<motion.div
|
||||
animate={{ rotate: 360 }}
|
||||
transition={{ duration: 2, repeat: Infinity, ease: 'linear' }}
|
||||
className="w-20 h-20 rounded-2xl bg-gradient-to-br from-brand-500 to-violet-600 flex items-center justify-center mx-auto mb-6 shadow-lg shadow-brand-500/30"
|
||||
>
|
||||
<Sparkles className="w-10 h-10 text-white" />
|
||||
</motion.div>
|
||||
<p className="text-zinc-400 text-lg">A preparar o dashboard...</p>
|
||||
</motion.div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (!data) return null
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-mesh">
|
||||
<div className="bg-grid min-h-screen">
|
||||
{/* Header */}
|
||||
<header className="sticky top-0 z-50 border-b border-white/5 bg-[#0a0a0f]/90 backdrop-blur-2xl">
|
||||
<div className="max-w-[1800px] mx-auto px-6 lg:px-8 py-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-4">
|
||||
<motion.div
|
||||
whileHover={{ scale: 1.05, rotate: 5 }}
|
||||
className="w-11 h-11 rounded-xl bg-gradient-to-br from-brand-500 to-violet-600 flex items-center justify-center shadow-lg shadow-brand-500/30"
|
||||
>
|
||||
<Zap className="w-6 h-6 text-white" />
|
||||
</motion.div>
|
||||
<div>
|
||||
<h1 className="text-xl font-bold text-white tracking-tight">Plan EAL</h1>
|
||||
<p className="text-xs text-zinc-500">Descomplicar Dashboard SDK</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav className="hidden md:flex items-center gap-1 bg-white/5 rounded-xl p-1">
|
||||
<a href="#" className="px-4 py-2 rounded-lg bg-brand-500 text-white text-sm font-medium flex items-center gap-2">
|
||||
<LayoutDashboard className="w-4 h-4" />
|
||||
Dashboard
|
||||
</a>
|
||||
<a href="/monitor.php" className="px-4 py-2 rounded-lg text-zinc-400 hover:text-white hover:bg-white/10 text-sm font-medium transition-all flex items-center gap-2">
|
||||
<Activity className="w-4 h-4" />
|
||||
Monitor
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<div className="flex items-center gap-3">
|
||||
<motion.button
|
||||
whileHover={{ scale: 1.05 }}
|
||||
whileTap={{ scale: 0.95 }}
|
||||
onClick={fetchData}
|
||||
disabled={refreshing}
|
||||
className="p-2.5 rounded-xl bg-white/5 hover:bg-white/10 border border-white/10 transition-all"
|
||||
>
|
||||
<RefreshCw className={`w-5 h-5 text-zinc-400 ${refreshing ? 'animate-spin' : ''}`} />
|
||||
</motion.button>
|
||||
<div className="w-10 h-10 rounded-full bg-gradient-to-br from-brand-500 to-violet-600 ring-2 ring-white/10" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* Main Content */}
|
||||
<main className="max-w-[1800px] mx-auto px-6 lg:px-8 py-8">
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.div
|
||||
key="dashboard"
|
||||
variants={containerVariants}
|
||||
initial="hidden"
|
||||
animate="show"
|
||||
>
|
||||
{/* Welcome */}
|
||||
<motion.div variants={itemVariants} className="mb-8">
|
||||
<h2 className="text-3xl font-bold text-white tracking-tight">{getGreeting()}, Emanuel</h2>
|
||||
<p className="text-zinc-400 mt-1 flex items-center gap-2">
|
||||
<Calendar className="w-4 h-4" />
|
||||
{data.data_formatada}
|
||||
</p>
|
||||
</motion.div>
|
||||
|
||||
{/* Hero Stats - Bento Grid */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-5 mb-8">
|
||||
<HeroStat
|
||||
icon={CheckCircle2}
|
||||
label="Tarefas Pendentes"
|
||||
value={data.resumo.tarefas}
|
||||
sub={`${data.vencidas.length} vencidas · ${data.urgente.length} urgentes`}
|
||||
trend={data.vencidas.length > 0 ? `-${data.vencidas.length}` : undefined}
|
||||
sparkData={[3, 5, 4, 7, 6, 8, data.resumo.tarefas]}
|
||||
status={data.vencidas.length > 0 ? 'critical' : data.urgente.length > 0 ? 'warning' : 'ok'}
|
||||
gradient="from-zinc-800 to-zinc-900"
|
||||
/>
|
||||
<HeroStat
|
||||
icon={Ticket}
|
||||
label="Tickets Abertos"
|
||||
value={data.tickets.length}
|
||||
sub="Suporte pendente"
|
||||
status={data.tickets.length > 0 ? 'warning' : 'ok'}
|
||||
gradient="from-amber-900/30 to-zinc-900"
|
||||
/>
|
||||
<HeroStat
|
||||
icon={TrendingUp}
|
||||
label="Pipeline"
|
||||
value={`${data.resumo.pipeline_valor.toLocaleString('pt-PT')}€`}
|
||||
sub={`${data.resumo.leads} leads activos`}
|
||||
trend="+12%"
|
||||
sparkData={[8000, 9500, 11000, 10500, 12000, 11500, data.resumo.pipeline_valor]}
|
||||
gradient="from-emerald-900/30 to-zinc-900"
|
||||
/>
|
||||
<HeroStat
|
||||
icon={Timer}
|
||||
label="Horas Semana"
|
||||
value={`${data.resumo.horas}h`}
|
||||
sub={`${data.resumo.horas_pct}% do objectivo`}
|
||||
sparkData={[15, 18, 20, 22, 24, 21, data.resumo.horas]}
|
||||
gradient="from-brand-900/30 to-zinc-900"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Cards Grid - Bento Layout */}
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5">
|
||||
{/* Agenda Hoje */}
|
||||
{data.eventos_hoje.length > 0 && (
|
||||
<GlassCard title="Agenda Hoje" icon={Calendar} count={data.eventos_hoje.length}>
|
||||
{data.eventos_hoje.map((e, i) => (
|
||||
<ListItem key={i} href={e.link} badges={<StatusPill variant={e.tipo}>{e.hora}</StatusPill>}>
|
||||
{e.titulo}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Restante Semana */}
|
||||
{data.eventos_semana.length > 0 && (
|
||||
<GlassCard title="Restante Semana" icon={CalendarDays} count={data.eventos_semana.length}>
|
||||
{data.eventos_semana.map((e, i) => (
|
||||
<ListItem key={i} href={e.link} badges={<StatusPill variant={e.tipo}>{e.data}</StatusPill>}>
|
||||
{e.titulo}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Monday Mood */}
|
||||
{data.is_monday && data.monday_mood.length > 0 && (
|
||||
<GlassCard title="Monday Mood" icon={Coffee} count={data.monday_mood.length} accent="amber">
|
||||
{data.monday_mood.map((t) => (
|
||||
<ListItem key={t.id} href={`https://desk.descomplicar.pt/admin/tasks/view/${t.id}`} badges={<StatusPill variant="project">{t.projeto}</StatusPill>}>
|
||||
{t.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Vencidas */}
|
||||
{data.vencidas.length > 0 && (
|
||||
<GlassCard title="Vencidas" icon={XCircle} count={data.vencidas.length} accent="red">
|
||||
{data.vencidas.map((t) => (
|
||||
<ListItem
|
||||
key={t.id}
|
||||
href={`https://desk.descomplicar.pt/admin/tasks/view/${t.id}`}
|
||||
badges={
|
||||
<>
|
||||
<StatusPill variant="overdue">-{t.dias_atraso}d</StatusPill>
|
||||
<StatusPill variant="project">{t.projeto}</StatusPill>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{t.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Urgente */}
|
||||
{data.urgente.length > 0 && (
|
||||
<GlassCard title="Urgente" icon={AlertTriangle} count={data.urgente.length} accent="red">
|
||||
{data.urgente.map((t) => (
|
||||
<ListItem key={t.id} href={`https://desk.descomplicar.pt/admin/tasks/view/${t.id}`} badges={<StatusPill variant="project">{t.projeto}</StatusPill>}>
|
||||
{t.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Alta Prioridade */}
|
||||
{data.alta.length > 0 && (
|
||||
<GlassCard title="Alta Prioridade" icon={ArrowUpRight} count={data.alta.length} size="tall">
|
||||
{data.alta.map((t) => (
|
||||
<ListItem
|
||||
key={t.id}
|
||||
href={`https://desk.descomplicar.pt/admin/tasks/view/${t.id}`}
|
||||
badges={
|
||||
<>
|
||||
<StatusPill variant="project">{t.projeto}</StatusPill>
|
||||
{t.dias !== undefined && <StatusPill variant="days">{t.dias >= 0 ? '+' : ''}{t.dias}d</StatusPill>}
|
||||
</>
|
||||
}
|
||||
>
|
||||
{t.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Em Testes */}
|
||||
{data.em_testes.length > 0 && (
|
||||
<GlassCard title="Em Testes" icon={TestTube} count={data.em_testes.length} accent="cyan">
|
||||
{data.em_testes.map((t) => (
|
||||
<ListItem key={t.id} href={`https://desk.descomplicar.pt/admin/tasks/view/${t.id}`} badges={<StatusPill variant="project">{t.projeto}</StatusPill>}>
|
||||
{t.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Esta Semana */}
|
||||
{data.esta_semana.length > 0 && (
|
||||
<GlassCard title="Esta Semana" icon={Clock} count={data.esta_semana.length}>
|
||||
{data.esta_semana.map((t) => (
|
||||
<ListItem
|
||||
key={t.id}
|
||||
href={`https://desk.descomplicar.pt/admin/tasks/view/${t.id}`}
|
||||
badges={
|
||||
<>
|
||||
<StatusPill variant="project">{t.projeto}</StatusPill>
|
||||
<StatusPill variant="days">+{t.dias}d</StatusPill>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{t.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Fazer Proposta */}
|
||||
{data.proposta.length > 0 && (
|
||||
<GlassCard title="Fazer Proposta" icon={FileText} count={data.proposta.length}>
|
||||
{data.proposta.map((l) => (
|
||||
<ListItem
|
||||
key={l.id}
|
||||
href={`https://desk.descomplicar.pt/admin/leads/index/${l.id}`}
|
||||
badges={
|
||||
<>
|
||||
<StatusPill variant="lead">{l.source}</StatusPill>
|
||||
<StatusPill variant="days">{l.dias}d</StatusPill>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{l.company || l.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Contactar */}
|
||||
{data.contactar.length > 0 && (
|
||||
<GlassCard title="Contactar" icon={Phone} count={data.contactar.length} accent="emerald">
|
||||
{data.contactar.map((l) => (
|
||||
<ListItem
|
||||
key={l.id}
|
||||
href={`https://desk.descomplicar.pt/admin/leads/index/${l.id}`}
|
||||
badges={
|
||||
<>
|
||||
<StatusPill variant="lead">{l.source}</StatusPill>
|
||||
<StatusPill variant="days">{l.dias}d</StatusPill>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{l.company || l.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* FollowUp */}
|
||||
{data.followup.length > 0 && (
|
||||
<GlassCard title="FollowUp" icon={MessageSquare} count={data.followup.length} accent="violet">
|
||||
{data.followup.map((l) => (
|
||||
<ListItem
|
||||
key={l.id}
|
||||
href={`https://desk.descomplicar.pt/admin/leads/index/${l.id}`}
|
||||
badges={
|
||||
<>
|
||||
<StatusPill variant="followup">{l.dias_sem_contacto}d sem contacto</StatusPill>
|
||||
<StatusPill variant="lead">{l.source}</StatusPill>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{l.company || l.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Projectos Activos */}
|
||||
{data.projectos.length > 0 && (
|
||||
<GlassCard title="Projectos Activos" icon={FolderKanban} count={data.projectos.length} accent="blue">
|
||||
{data.projectos.map((p) => (
|
||||
<ListItem
|
||||
key={p.id}
|
||||
href={`https://desk.descomplicar.pt/admin/projects/view/${p.id}`}
|
||||
badges={
|
||||
<>
|
||||
<StatusPill variant="project">{p.cliente}</StatusPill>
|
||||
<StatusPill variant="days">{p.concluidas}/{p.total}</StatusPill>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{p.name}
|
||||
</ListItem>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Clientes 360 */}
|
||||
{data.billing_360.length > 0 && (
|
||||
<GlassCard title="Clientes 360" icon={CreditCard} count={data.billing_360.length} accent="violet">
|
||||
{data.billing_360.map((b) => (
|
||||
<motion.a
|
||||
key={b.desk_project_id}
|
||||
href={`https://desk.descomplicar.pt/admin/projects/view/${b.desk_project_id}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
whileHover={{ x: 4 }}
|
||||
className="block p-3 rounded-xl bg-white/[0.02] hover:bg-white/[0.06] border border-transparent hover:border-white/10 transition-all"
|
||||
>
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-sm text-white">{b.client_name}</span>
|
||||
<StatusPill variant={b.status}>
|
||||
{b.balance > 0 ? '+' : ''}{b.balance}h
|
||||
</StatusPill>
|
||||
</div>
|
||||
<div className="text-xs text-zinc-500 mt-1.5">
|
||||
Fact: {b.total_invoiced}h · Entregue: {b.total_delivered}h
|
||||
</div>
|
||||
</motion.a>
|
||||
))}
|
||||
</GlassCard>
|
||||
)}
|
||||
|
||||
{/* Summary Widget */}
|
||||
<SummaryWidget data={data.resumo} />
|
||||
</div>
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
</main>
|
||||
|
||||
{/* Footer */}
|
||||
<footer className="border-t border-white/5 mt-12">
|
||||
<div className="max-w-[1800px] mx-auto px-6 lg:px-8 py-6">
|
||||
<div className="flex items-center justify-between text-sm text-zinc-500">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-2 h-2 rounded-full bg-emerald-500 animate-pulse" />
|
||||
<span>Plan EAL v3.0</span>
|
||||
<span className="text-zinc-700">·</span>
|
||||
<span>SDK Dashboard</span>
|
||||
</div>
|
||||
<span>Actualizado: {new Date().toLocaleString('pt-PT')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Mock data
|
||||
function getMockData(): DashboardData {
|
||||
return {
|
||||
data_formatada: 'Segunda-feira, 3 de Fevereiro',
|
||||
is_monday: true,
|
||||
eventos_hoje: [
|
||||
{ titulo: 'Buscar Tomás', hora: '12:55', tipo: 'personal', link: '#' },
|
||||
{ titulo: 'Reunião Carstuff', hora: '15:00', tipo: 'work', link: '#' },
|
||||
],
|
||||
eventos_semana: [
|
||||
{ titulo: 'Entrega projecto SolarFV', data: 'Qua 05', hora: '10:00', tipo: 'work', link: '#' },
|
||||
{ titulo: 'Buscar Tomás', data: 'Sex 07', hora: '13:30', tipo: 'personal', link: '#' },
|
||||
],
|
||||
monday_mood: [
|
||||
{ id: 100, name: 'Revisão semanal de métricas', projeto: 'DES 360º' },
|
||||
{ id: 101, name: 'Planeamento sprint Q1', projeto: 'DES Stack Workflow' },
|
||||
],
|
||||
urgente: [],
|
||||
alta: [
|
||||
{ id: 1, name: 'Sistema métricas - tráfego e conversões', projeto: 'CTF Carstuff 360º', dias: 2 },
|
||||
{ id: 2, name: 'Sistema métricas - tráfego e conversões', projeto: 'SFV 360º', dias: 2 },
|
||||
{ id: 3, name: 'SDK MCP - Biblioteca de Desenvolvimento MCP', projeto: 'DES Stack Workflow', dias: 5 },
|
||||
{ id: 4, name: 'Skill /sdk - Gestão de SDKs e PDCA', projeto: 'DES Stack Workflow', dias: 5 },
|
||||
{ id: 5, name: 'Sistema de Gestão de Informação Descomplicar', projeto: 'DES Stack Workflow', dias: 7 },
|
||||
{ id: 6, name: 'SDK Dashboard - Biblioteca de Componentes', projeto: 'DES Stack Workflow', dias: 7 },
|
||||
],
|
||||
vencidas: [
|
||||
{ id: 7, name: 'Implementar plugin Catálogos PDF', projeto: 'CTF Carstuff 360º', dias_atraso: 3 },
|
||||
],
|
||||
em_testes: [
|
||||
{ id: 8, name: 'Decisão reCAPTCHA - reactivar ou manter honeypot', projeto: 'CTF Carstuff 360º' },
|
||||
{ id: 9, name: 'MCP Gateway - HTTP Streamable Proxy', projeto: 'DES Stack Workflow' },
|
||||
{ id: 10, name: 'MCP Gateway', projeto: 'DES Stack Workflow' },
|
||||
],
|
||||
esta_semana: [
|
||||
{ id: 11, name: 'Mapeamento de Dados', projeto: 'CTF Carstuff 360º', dias: 3 },
|
||||
],
|
||||
tickets: [],
|
||||
proposta: [
|
||||
{ id: 1, name: 'MegaSport', company: 'MegaSport Travel', source: 'Mail Mkt', dias: 71 },
|
||||
],
|
||||
contactar: [
|
||||
{ id: 2, name: 'DSI', company: 'DSI Credito DS Seguros', source: 'Google', dias: 6 },
|
||||
{ id: 3, name: 'Century', company: 'CENTURY 21 Via', source: 'Google', dias: 6 },
|
||||
{ id: 4, name: 'Rui', company: 'Rui Marques', source: 'Google', dias: 12 },
|
||||
{ id: 5, name: 'Entreescolha', company: 'Entreescolha', source: 'Google', dias: 12 },
|
||||
],
|
||||
followup: [
|
||||
{ id: 7, name: 'Grupo Criativo', company: 'Grupo Criativo', source: 'Google', dias: 12, dias_sem_contacto: 1 },
|
||||
{ id: 8, name: 'Casa Aleixo', company: 'Casa Aleixo Lda', source: 'Mail Mkt', dias: 15, dias_sem_contacto: 1 },
|
||||
{ id: 9, name: 'Hidraulicentro', company: 'Hidraulicentro, Lda', source: 'Mail Mkt', dias: 20, dias_sem_contacto: 1 },
|
||||
],
|
||||
projectos: [
|
||||
{ id: 1, name: 'DES 360º', cliente: 'DES - Marketing', total: 115, concluidas: 99 },
|
||||
{ id: 2, name: 'DES Stack Workflow', cliente: 'DES - Inovação', total: 225, concluidas: 55 },
|
||||
{ id: 3, name: 'SFV 360º', cliente: 'Solar FV', total: 19, concluidas: 10 },
|
||||
{ id: 4, name: 'CTF Carstuff 360º', cliente: 'CTF Carstuff', total: 21, concluidas: 5 },
|
||||
],
|
||||
billing_360: [
|
||||
{ client_name: 'Carstuff', desk_project_id: 67, total_invoiced: 150, total_delivered: 133.1, balance: 16.9, status: 'credit' },
|
||||
{ client_name: 'SolarFV', desk_project_id: 68, total_invoiced: 120, total_delivered: 72.4, balance: 47.6, status: 'credit' },
|
||||
],
|
||||
resumo: {
|
||||
tarefas: 7,
|
||||
tickets: 0,
|
||||
projectos: 4,
|
||||
leads: 8,
|
||||
horas: 22.8,
|
||||
horas_pct: 57,
|
||||
pipeline_valor: 12842,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default App
|
||||
1
src/assets/react.svg
Normal file
1
src/assets/react.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
234
src/index.css
Normal file
234
src/index.css
Normal file
@@ -0,0 +1,234 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
@theme {
|
||||
--font-sans: 'Inter', system-ui, sans-serif;
|
||||
--font-mono: 'JetBrains Mono', monospace;
|
||||
|
||||
--color-brand-50: #eef2ff;
|
||||
--color-brand-100: #e0e7ff;
|
||||
--color-brand-200: #c7d2fe;
|
||||
--color-brand-300: #a5b4fc;
|
||||
--color-brand-400: #818cf8;
|
||||
--color-brand-500: #6366f1;
|
||||
--color-brand-600: #4f46e5;
|
||||
--color-brand-700: #4338ca;
|
||||
--color-brand-800: #3730a3;
|
||||
--color-brand-900: #312e81;
|
||||
--color-brand-950: #1e1b4b;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
:root {
|
||||
--bg-primary: #0a0a0f;
|
||||
--bg-secondary: #111118;
|
||||
--border-subtle: rgba(255, 255, 255, 0.06);
|
||||
--border-hover: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', system-ui, sans-serif;
|
||||
background: var(--bg-primary);
|
||||
color: #ffffff;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
}
|
||||
|
||||
/* Background Pattern */
|
||||
.bg-mesh {
|
||||
background:
|
||||
radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
|
||||
radial-gradient(ellipse 60% 40% at 80% 50%, rgba(139, 92, 246, 0.1), transparent),
|
||||
radial-gradient(ellipse 50% 30% at 10% 80%, rgba(6, 182, 212, 0.08), transparent),
|
||||
var(--bg-primary);
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
.bg-grid {
|
||||
background-image:
|
||||
linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
|
||||
linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
|
||||
background-size: 60px 60px;
|
||||
}
|
||||
|
||||
/* Glassmorphism Card */
|
||||
.glass-card {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border-radius: 1rem;
|
||||
background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
|
||||
border: 1px solid var(--border-subtle);
|
||||
backdrop-filter: blur(20px);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.glass-card:hover {
|
||||
border-color: var(--border-hover);
|
||||
transform: translateY(-2px);
|
||||
box-shadow:
|
||||
0 20px 40px -15px rgba(0, 0, 0, 0.5),
|
||||
0 0 0 1px rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.glass-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.glass-card:hover::before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Status Indicators */
|
||||
.status-dot {
|
||||
width: 0.625rem;
|
||||
height: 0.625rem;
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.status-dot-ok {
|
||||
background-color: #10b981;
|
||||
box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
|
||||
}
|
||||
|
||||
.status-dot-warning {
|
||||
background-color: #f59e0b;
|
||||
box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
|
||||
}
|
||||
|
||||
.status-dot-critical {
|
||||
background-color: #ef4444;
|
||||
box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
|
||||
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
||||
}
|
||||
|
||||
/* Metric Value */
|
||||
.metric-value {
|
||||
font-size: 2.25rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.025em;
|
||||
background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
/* Progress Bar */
|
||||
.progress-bar {
|
||||
height: 0.5rem;
|
||||
border-radius: 9999px;
|
||||
overflow: hidden;
|
||||
background: rgba(255,255,255,0.1);
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
height: 100%;
|
||||
border-radius: 9999px;
|
||||
transition: all 0.5s ease-out;
|
||||
}
|
||||
|
||||
/* Glow Effects */
|
||||
.glow-indigo {
|
||||
box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
|
||||
}
|
||||
|
||||
.glow-emerald {
|
||||
box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
|
||||
}
|
||||
|
||||
/* Button Styles */
|
||||
.btn-glass {
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.75rem;
|
||||
font-weight: 500;
|
||||
font-size: 0.875rem;
|
||||
background: rgba(255,255,255,0.05);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
color: rgba(255,255,255,0.8);
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-glass:hover {
|
||||
background: rgba(255,255,255,0.1);
|
||||
border-color: rgba(255,255,255,0.2);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
padding: 0.5rem 1rem;
|
||||
border-radius: 0.75rem;
|
||||
font-weight: 500;
|
||||
font-size: 0.875rem;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.2s;
|
||||
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/* Custom Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
/* Animations */
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.5; }
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
@keyframes slideIn {
|
||||
from { opacity: 0; transform: translateX(-10px); }
|
||||
to { opacity: 1; transform: translateX(0); }
|
||||
}
|
||||
|
||||
.animate-fade-in {
|
||||
animation: fadeIn 0.5s ease-out forwards;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.animate-slide-in {
|
||||
animation: slideIn 0.4s ease-out forwards;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.animate-delay-100 { animation-delay: 100ms; }
|
||||
.animate-delay-200 { animation-delay: 200ms; }
|
||||
.animate-delay-300 { animation-delay: 300ms; }
|
||||
.animate-delay-400 { animation-delay: 400ms; }
|
||||
.animate-delay-500 { animation-delay: 500ms; }
|
||||
10
src/main.tsx
Normal file
10
src/main.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
import App from './App.tsx'
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
)
|
||||
55
tailwind.config.js
Normal file
55
tailwind.config.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
content: [
|
||||
"./index.html",
|
||||
"./src/**/*.{js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
brand: {
|
||||
50: '#eef2ff',
|
||||
100: '#e0e7ff',
|
||||
200: '#c7d2fe',
|
||||
300: '#a5b4fc',
|
||||
400: '#818cf8',
|
||||
500: '#6366f1',
|
||||
600: '#4f46e5',
|
||||
700: '#4338ca',
|
||||
800: '#3730a3',
|
||||
900: '#312e81',
|
||||
950: '#1e1b4b',
|
||||
},
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ['Inter', 'system-ui', 'sans-serif'],
|
||||
mono: ['JetBrains Mono', 'monospace'],
|
||||
},
|
||||
animation: {
|
||||
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
||||
'glow': 'glow 2s ease-in-out infinite alternate',
|
||||
'float': 'float 6s ease-in-out infinite',
|
||||
'shimmer': 'shimmer 2s linear infinite',
|
||||
},
|
||||
keyframes: {
|
||||
glow: {
|
||||
'0%': { boxShadow: '0 0 20px rgba(99, 102, 241, 0.3)' },
|
||||
'100%': { boxShadow: '0 0 40px rgba(99, 102, 241, 0.6)' },
|
||||
},
|
||||
float: {
|
||||
'0%, 100%': { transform: 'translateY(0px)' },
|
||||
'50%': { transform: 'translateY(-10px)' },
|
||||
},
|
||||
shimmer: {
|
||||
'0%': { backgroundPosition: '-200% 0' },
|
||||
'100%': { backgroundPosition: '200% 0' },
|
||||
},
|
||||
},
|
||||
backgroundImage: {
|
||||
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
|
||||
'grid-pattern': 'linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px)',
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
32
tsconfig.app.json
Normal file
32
tsconfig.app.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"types": ["vite/client"],
|
||||
"skipLibCheck": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
7
tsconfig.json
Normal file
7
tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
26
tsconfig.node.json
Normal file
26
tsconfig.node.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2023",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"types": ["node"],
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
17
vite.config.ts
Normal file
17
vite.config.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import path from 'path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
base: '/v3/',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 3050,
|
||||
host: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user