feat(status-dot-component): StatusDot für Indicator (online/offline/busy) [tsc:fail]
This commit is contained in:
parent
d50d5253ca
commit
0b4d4029a0
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"completed_features": [],
|
"completed_features": [],
|
||||||
"current_feature": "card-component",
|
"current_feature": "status-dot-component",
|
||||||
"started_at": "2026-05-23T09:38:26.946771",
|
"started_at": "2026-05-23T09:38:26.946771",
|
||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"tooltip-component",
|
"tooltip-component",
|
||||||
"badge-component"
|
"badge-component",
|
||||||
|
"card-component"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -3615,3 +3615,21 @@ src/index.ts(27,25): error TS2769: No overload matches this call.
|
|||||||
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||||
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
||||||
|
- `09:39:04` **INFO** Committed feature card-component
|
||||||
|
- `09:39:05` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-3 Feature: status-dot-component (2026-05-23 09:39:05)
|
||||||
|
|
||||||
|
- `09:39:05` **INFO** Description: StatusDot für Indicator (online/offline/busy)
|
||||||
|
- `09:39:05` **INFO** Generating apps/web/src/components/StatusDot.tsx (StatusDot-Component. Props: status ('online'|'offline'|'busy'|'away'),…)
|
||||||
|
- `09:39:15` **INFO** wrote 952 chars in 10.3s (attempt 1)
|
||||||
|
- `09:39:15` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `09:39:17` **WARN** tsc errors:
|
||||||
|
src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
||||||
|
src/db/schema.ts(45,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||||
|
src/db/schema.ts(49,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
||||||
|
src/db/schema.ts(53,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
|
||||||
|
src/index.ts(27,25): error TS2769: No overload matches this call.
|
||||||
|
Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
||||||
|
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>,
|
||||||
|
|||||||
46
apps/web/src/components/StatusDot.tsx
Normal file
46
apps/web/src/components/StatusDot.tsx
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { clsx, type ClassValue } from 'clsx';
|
||||||
|
import { twMerge } from 'tailwind-merge';
|
||||||
|
|
||||||
|
function cn(...inputs: ClassValue[]) {
|
||||||
|
return twMerge(clsx(inputs));
|
||||||
|
}
|
||||||
|
|
||||||
|
type Status = 'online' | 'offline' | 'busy' | 'away';
|
||||||
|
|
||||||
|
interface StatusDotProps {
|
||||||
|
status: Status;
|
||||||
|
size?: 'sm' | 'md' | 'lg';
|
||||||
|
pulse?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const statusColors: Record<Status, string> = {
|
||||||
|
online: 'bg-green-500',
|
||||||
|
offline: 'bg-gray-400',
|
||||||
|
busy: 'bg-red-500',
|
||||||
|
away: 'bg-yellow-500',
|
||||||
|
};
|
||||||
|
|
||||||
|
const sizeClasses: Record<'sm' | 'md' | 'lg', string> = {
|
||||||
|
sm: 'w-1.5 h-1.5',
|
||||||
|
md: 'w-2 h-2',
|
||||||
|
lg: 'w-3 h-3',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function StatusDot({
|
||||||
|
status,
|
||||||
|
size = 'md',
|
||||||
|
pulse = false
|
||||||
|
}: StatusDotProps) {
|
||||||
|
return (
|
||||||
|
<span
|
||||||
|
className={cn(
|
||||||
|
'rounded-full inline-block',
|
||||||
|
statusColors[status],
|
||||||
|
sizeClasses[size],
|
||||||
|
pulse && status === 'online' && 'animate-pulse'
|
||||||
|
)}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user