feat(workspace-switcher-stub): Workspace-Switcher-Dropdown (Stub mit single workspace) [tsc:fail]
This commit is contained in:
parent
1e97fb28f2
commit
fce954b096
@ -1,5 +1,8 @@
|
|||||||
{
|
{
|
||||||
"completed_features": [],
|
"completed_features": [],
|
||||||
"current_feature": "notification-bell",
|
"current_feature": "workspace-switcher-stub",
|
||||||
"started_at": "2026-05-23T08:33:42.059540"
|
"started_at": "2026-05-23T08:33:42.059540",
|
||||||
|
"attempted_features": [
|
||||||
|
"notification-bell"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@ -2804,3 +2804,20 @@ src/index.ts(27,25): error TS2769: No overload matches this call.
|
|||||||
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error.
|
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ 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 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||||
|
- `08:35:21` **INFO** Committed feature notification-bell
|
||||||
|
- `08:35:21` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-3 Feature: workspace-switcher-stub (2026-05-23 08:35:21)
|
||||||
|
|
||||||
|
- `08:35:21` **INFO** Description: Workspace-Switcher-Dropdown (Stub mit single workspace)
|
||||||
|
- `08:35:21` **INFO** Generating apps/web/src/components/WorkspaceSwitcher.tsx (WorkspaceSwitcher-Dropdown. Zeigt aktuellen workspace.name (aus api.ge…)
|
||||||
|
- `08:35:40` **INFO** wrote 2387 chars in 19.3s (attempt 1)
|
||||||
|
- `08:35:40` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `08:35:42` **WARN** tsc errors:
|
||||||
|
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>, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'.
|
||||||
|
Overload 2 of 3, '(plugin: FastifyPluginAsync<{ 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 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||||
|
|||||||
63
apps/web/src/components/WorkspaceSwitcher.tsx
Normal file
63
apps/web/src/components/WorkspaceSwitcher.tsx
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import React, { useState } from 'react';
|
||||||
|
import { useQuery } from '@tanstack/react-query';
|
||||||
|
import { ChevronDown } from 'lucide-react';
|
||||||
|
import { toast } from 'sonner';
|
||||||
|
import { api } from '@emberclone/shared/api';
|
||||||
|
import type { Workspace } from '@emberclone/shared/types';
|
||||||
|
|
||||||
|
export default function WorkspaceSwitcher() {
|
||||||
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
|
||||||
|
const { data: settings, isLoading } = useQuery({
|
||||||
|
queryKey: ['settings'],
|
||||||
|
queryFn: () => api.getSettings(),
|
||||||
|
});
|
||||||
|
|
||||||
|
const currentWorkspace = settings?.workspace;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="relative">
|
||||||
|
<button
|
||||||
|
onClick={() => setIsOpen(!isOpen)}
|
||||||
|
className="flex items-center gap-2 px-3 py-1.5 text-sm font-medium text-slate-700 bg-slate-100 hover:bg-slate-200 border border-slate-200 rounded-md transition-colors"
|
||||||
|
>
|
||||||
|
<span className="truncate max-w-[150px]">
|
||||||
|
{isLoading ? 'Laden...' : currentWorkspace?.name || 'Kein Workspace'}
|
||||||
|
</span>
|
||||||
|
<ChevronDown className={`w-4 h-4 transition-transform ${isOpen ? 'rotate-180' : ''}`} />
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{isOpen && (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
className="fixed inset-0 z-10"
|
||||||
|
onClick={() => setIsOpen(false)}
|
||||||
|
/>
|
||||||
|
<div className="absolute left-0 z-20 mt-2 w-56 origin-top-left bg-white border border-slate-200 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
|
||||||
|
<div className="py-1">
|
||||||
|
<button
|
||||||
|
disabled
|
||||||
|
className="flex items-center justify-between w-full px-4 py-2 text-sm text-slate-900 bg-slate-50 cursor-default"
|
||||||
|
>
|
||||||
|
<span className="truncate">{currentWorkspace?.name}</span>
|
||||||
|
<span className="text-[10px] font-bold uppercase tracking-wider text-slate-400">Aktiv</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div className="border-t border-slate-100 my-1" />
|
||||||
|
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
toast.info('Workspace-Erstellung kommt in v2');
|
||||||
|
setIsOpen(false);
|
||||||
|
}}
|
||||||
|
className="flex w-full px-4 py-2 text-sm text-slate-600 hover:bg-slate-50 transition-colors text-left"
|
||||||
|
>
|
||||||
|
Workspace anlegen…
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user