feat: complete triage, multi-task lists, kanban, workspace wiki, and admin management
MindSift CI & Docker Release / Build, Test in Container & Push (push) Failing after 16s

This commit is contained in:
sandrodach committed 2026-10-24 22:08:43 +02:00
1 parent 5c4e130862
commit 4ef71b61cd
12 files changed
+3940 -664

No files matched your search

+12 -173
View File
@@ -4,14 +4,7 @@ import {
CheckSquare,
FileText,
ShoppingCart,
Webhook,
Brain,
LogOut,
User as UserIcon,
Bell,
Shield,
ChevronRight,
Sparkles,
} from 'lucide-react';
import { DashboardStats, SharedList, Thought, User } from './lib/types';
import { api, clearToken, getToken, triggerHaptic } from './lib/api';
@@ -20,9 +13,9 @@ import { TriageDeck } from './features/triage/TriageDeck';
import { TasksView } from './features/triage/TasksView';
import { WorkspaceView } from './features/workspace/WorkspaceView';
import { SharedListsView } from './features/lists/SharedListsView';
import { EcosystemView } from './features/settings/EcosystemView';
import { SettingsModal } from './features/settings/SettingsModal';
type ActiveTab = 'triage' | 'tasks' | 'workspace' | 'lists' | 'ecosystem';
type ActiveTab = 'triage' | 'tasks' | 'workspace' | 'lists';
export const App: React.FC = () => {
const [user, setUser] = useState<User | null>(null);
@@ -41,14 +34,7 @@ export const App: React.FC = () => {
const [captureFocusCount, setCaptureFocusCount] = useState(0);
const [refreshRevision, setRefreshRevision] = useState(0);
// Profile & Auth Modal State (aligned with Template Screen 2)
const [showProfileModal, setShowProfileModal] = useState(false);
const [authMode, setAuthMode] = useState<'login' | 'register'>('login');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [displayName, setDisplayName] = useState('');
const [authError, setAuthError] = useState('');
const [notificationsEnabled, setNotificationsEnabled] = useState(true);
const refreshAll = async () => {
try {
@@ -129,26 +115,6 @@ export const App: React.FC = () => {
setCaptureFocusCount((c) => c + 1);
};
const handleAuthSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setAuthError('');
triggerHaptic(15);
try {
if (authMode === 'login') {
await api.login(email, password);
} else {
await api.register(email, password, displayName);
}
setShowProfileModal(false);
setEmail('');
setPassword('');
setDisplayName('');
await refreshAll();
} catch (err: any) {
setAuthError(err.message || 'Authentifizierung fehlgeschlagen');
}
};
const handleLogout = async () => {
triggerHaptic(20);
clearToken();
@@ -270,16 +236,6 @@ export const App: React.FC = () => {
<span>Geteilte Listen</span>
</button>
<button
onClick={() => {
triggerHaptic(10);
setActiveTab('ecosystem');
}}
className={`tab-btn ${activeTab === 'ecosystem' ? 'tab-btn-active' : ''}`}
>
<Webhook className="w-4 h-4" />
<span>Webhooks & Export</span>
</button>
</div>
</nav>
</header>
@@ -316,137 +272,20 @@ export const App: React.FC = () => {
{activeTab === 'lists' && (
<SharedListsView onRefreshGlobal={refreshAll} />
)}
{activeTab === 'ecosystem' && (
<EcosystemView onIngested={refreshAll} />
)}
</section>
</main>
{/* Profile & Settings Modal styled identically to Template Screen 2 */}
{/* Profile, Settings, Discord Alarms, Webhooks, Teams & Admin Modal */}
{showProfileModal && (
<div className="fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-4">
<div className="w-full max-w-sm bg-[#222428] border border-white/[0.08] shadow-2xl p-4 overflow-hidden">
{/* Screen 2: Top Profile Card */}
<div className="flex flex-col items-center text-center mb-4">
<div className="w-20 h-20 rounded-full bg-[#1d8cf8] text-white text-2xl font-bold flex items-center justify-center shadow-lg mb-3 ring-4 ring-white/[0.05]">
{user?.displayName ? user.displayName.slice(0, 1).toUpperCase() : 'U'}
</div>
<h2 className="text-xl font-bold text-white tracking-tight">
{user?.displayName || 'Standard Benutzer'}
</h2>
<p className="text-xs text-zinc-400 mt-0.5">
{user?.email || 'lokal@mindsift.local'}
</p>
{/* Template Screen 2: Blue Pill Edit Button */}
<button
onClick={() => setAuthMode(authMode === 'login' ? 'register' : 'login')}
className="mt-3 px-5 py-1.5 rounded-full bg-[#1d8cf8] hover:bg-[#167ad6] text-white text-xs font-semibold shadow-sm transition-all"
>
{authMode === 'login' ? 'Konto wechseln' : 'Neues Konto anlegen'}
</button>
</div>
{/* Settings Sections */}
<div className="space-y-2 mb-3">
{/* Notification toggle */}
<div className="p-2.5 bg-[#16171a] border border-white/[0.06] flex items-center justify-between">
<div className="flex items-center gap-2.5">
<div className="w-7 h-7 bg-[#1d8cf8]/20 text-[#1d8cf8] flex items-center justify-center">
<Bell className="w-3.5 h-3.5" />
</div>
<span className="text-xs font-medium text-white">Benachrichtigungen</span>
</div>
<button
type="button"
onClick={() => setNotificationsEnabled(!notificationsEnabled)}
className={`w-10 h-5 rounded-full transition-colors relative p-0.5 ${
notificationsEnabled ? 'bg-[#1d8cf8]' : 'bg-zinc-600'
}`}
>
<div
className={`w-4 h-4 rounded-full bg-white transition-transform ${
notificationsEnabled ? 'translate-x-5' : 'translate-x-0'
}`}
/>
</button>
</div>
{/* Security info */}
<div className="p-2.5 bg-[#16171a] border border-white/[0.06] flex items-center justify-between">
<div className="flex items-center gap-2.5">
<div className="w-7 h-7 bg-[#1d8cf8]/20 text-[#1d8cf8] flex items-center justify-center">
<Shield className="w-3.5 h-3.5" />
</div>
<div>
<span className="text-xs font-medium text-white block">Sicherheit</span>
<span className="text-[10px] text-zinc-400">Lokale SQLite Verschlüsselung</span>
</div>
</div>
<ChevronRight className="w-4 h-4 text-zinc-500" />
</div>
</div>
{/* Auth Switcher Form if switching accounts */}
<form onSubmit={handleAuthSubmit} className="space-y-2 mb-3">
{authMode === 'register' && (
<input
type="text"
value={displayName}
onChange={(e) => setDisplayName(e.target.value)}
placeholder="Anzeigename"
className="w-full h-8 px-2.5 bg-[#16171a] text-xs text-white placeholder-zinc-500 border border-white/[0.08] focus:border-[#1d8cf8] focus:outline-none"
required
/>
)}
<input
type="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="E-Mail"
className="w-full h-8 px-2.5 bg-[#16171a] text-xs text-white placeholder-zinc-500 border border-white/[0.08] focus:border-[#1d8cf8] focus:outline-none"
required
/>
<input
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
placeholder="Passwort"
className="w-full h-8 px-2.5 bg-[#16171a] text-xs text-white placeholder-zinc-500 border border-white/[0.08] focus:border-[#1d8cf8] focus:outline-none"
required
/>
{authError && <p className="text-xs text-red-400 px-1">{authError}</p>}
<button
type="submit"
className="w-full h-8 rounded-full bg-[#1d8cf8] hover:bg-[#167ad6] text-white font-medium text-xs transition-colors shadow-sm"
>
{authMode === 'login' ? 'Anmelden' : 'Registrieren'}
</button>
</form>
{/* Log Out Row matching Template Screen 2 */}
<div className="pt-2 border-t border-white/[0.06] flex items-center justify-between">
<button
type="button"
onClick={handleLogout}
className="text-xs text-[#ef4444] hover:underline flex items-center gap-1.5 font-medium py-1"
>
<LogOut className="w-3.5 h-3.5" />
<span>Abmelden</span>
</button>
<button
type="button"
onClick={() => setShowProfileModal(false)}
className="px-4 py-1.5 rounded-full bg-[#282a2f] hover:bg-[#32353a] text-xs text-zinc-300 font-medium transition-colors"
>
Fertig
</button>
</div>
</div>
</div>
<SettingsModal
currentUser={user}
onClose={() => setShowProfileModal(false)}
onUserUpdated={(u) => {
setUser(u);
refreshAll();
}}
onLoggedOut={handleLogout}
/>
)}
</div>
);