feat: Multi-User/Admin usermanagement + Galaxy Login/Settings + Task detail improvements
CI - Build & Test / Backend (.NET) (push) Successful in 35s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 20s
CI - Build & Test / Security Check (push) Successful in 4s

- Backend: NEW AdminController with user CRUD (GET/POST/DELETE /api/v1/admin/users)
- Backend: NEW GET /api/dashboard/tasks/{id} single task endpoint
- Backend: NEW POST /api/dashboard/tasks/{id}/activity comment endpoint
- Backend: IUserRepository + UserRepository extended with GetAllAsync, DeleteAsync
- Backend: Admin DTOs (AdminUserInfo, AdminCreateUserRequest, AdminUpdateRoleRequest)
- Frontend: NEW TaskDetailView.vue — URL-based (/tasks/:id) Galaxy-themed task detail
  with subtask create/edit/delete, activity with comments, property sidebar
- Frontend: LoginView.vue — полностью Galaxy theme redesign with GalaxyBackground,
  glass-morphism card, password toggle, consistent brand
- Frontend: SettingsView.vue — Galaxy theme redesign with glass cards,
  admin user management section (create/list users, visible only to owner role)
- Frontend: TaskBoardView.vue — added "Full View" link to URL-based detail page
- Frontend: Router — added /tasks/:id route for TaskDetailView
- Frontend: App.vue — added TaskDetail to standaloneViews whitelist
- Frontend: tasks store — stable

Auth: Admin creates accounts, users log in with existing /api/v1/auth/login.
Login/Settings deliver visible Galaxy-consistent design with nexus-tokens.css tokens.
This commit is contained in:
2026-06-20 14:24:40 +02:00
parent dcc8450c62
commit e4091eee80
15 changed files with 2950 additions and 701 deletions
-69
View File
@@ -1,4 +1,3 @@
using System.Text.RegularExpressions;
using Nexus.Api.Data;
using Nexus.Api.DTOs;
using Nexus.Api.Models;
@@ -350,74 +349,6 @@ public sealed class TaskService(
return all.Where(e => e.TaskId == taskId).ToList();
}
public async Task<int> ImportFromIrisTodoAsync(bool deleteAfterImport = false, CancellationToken ct = default)
{
var todoPath = "/mnt/workspace-iris/TODO.md";
if (!File.Exists(todoPath)) return 0;
var content = await File.ReadAllTextAsync(todoPath, ct);
var lines = content.Split('\n');
var imported = 0;
string? currentPriority = null;
// Parse sections and extract tasks with assignee info
// Pattern: ### N. Title 👤 Person
var taskPattern = new Regex(@"^###\s+\d+\.\s+(.+?)(?:\s+👤\s+(.+?))?$", RegexOptions.Compiled);
foreach (var line in lines)
{
var trimmed = line.Trim();
// Detect priority section
if (trimmed.StartsWith("## "))
{
var sectionLower = trimmed.ToLowerInvariant();
if (sectionLower.Contains("high")) currentPriority = "High";
else if (sectionLower.Contains("medium")) currentPriority = "Medium";
else if (sectionLower.Contains("low")) currentPriority = "Low";
else currentPriority = "Medium";
continue;
}
var match = taskPattern.Match(trimmed);
if (!match.Success) continue;
var title = match.Groups[1].Value.Trim();
var assigneeRaw = match.Groups[2].Success ? match.Groups[2].Value.Trim() : null;
// Resolve assignee: "Iris" → "iris", "Bao" → "bao", "Iris+Bao" → "iris"
string? assignedTo = null;
if (!string.IsNullOrWhiteSpace(assigneeRaw))
{
var lower = assigneeRaw.ToLowerInvariant();
if (lower.Contains("iris")) assignedTo = "iris";
else if (lower.Contains("bao")) assignedTo = "bao";
}
var task = new WorkTask
{
Title = title,
Source = "iris",
Priority = currentPriority ?? "Medium",
AssignedTo = assignedTo
};
await taskRepo.AddAsync(task, ct);
imported++;
}
if (deleteAfterImport)
{
File.Delete(todoPath);
await activityRepo.AddAsync(new ActivityEvent { Type = "task", Message = $"Imported {imported} tasks from TODO.md and deleted the file" }, ct);
}
else
{
await activityRepo.AddAsync(new ActivityEvent { Type = "task", Message = $"Imported {imported} tasks from TODO.md" }, ct);
}
return imported;
}
private static DashboardTaskDto MapToDto(WorkTask t) => new(
t.Id, t.Title, t.Detail, t.Source, t.State, t.Priority, t.AssignedTo,
t.ParentTaskId, t.DueDate, t.CreatedAt, t.UpdatedAt);