UI-tests und fixes aus tests
This commit is contained in:
1 parent
73da8fb849
commit
968d980be1
46 files changed
+3853
-61
No files matched your search
+29
-12
@@ -599,16 +599,30 @@ if (str_starts_with($route, '/api/')) {
|
||||
$bucketMap[$oldId] = $db->lastInsertId();
|
||||
}
|
||||
|
||||
// Import cards
|
||||
// Import cards (preserve all fields including CalDAV sync state)
|
||||
$cardMap = []; // old id → new id
|
||||
foreach ($data['cards'] as $c) {
|
||||
$oldId = $c['id'] ?? null;
|
||||
$bucketId = ($c['bucket_id'] && isset($bucketMap[$c['bucket_id']])) ? $bucketMap[$c['bucket_id']] : null;
|
||||
$stmt = $db->prepare('INSERT INTO cards (title, body, color, bucket_id, position, created_at, updated_at) VALUES (:title, :body, :color, :bucket_id, :position, :created_at, :updated_at)');
|
||||
$stmt = $db->prepare('INSERT INTO cards (title, body, color, bucket_id, position, tags, due_date, caldav_uid, caldav_etag, caldav_href, caldav_synced_at, caldav_rrule, relay_uid, created_at, updated_at) VALUES (:title, :body, :color, :bucket_id, :position, :tags, :due_date, :caldav_uid, :caldav_etag, :caldav_href, :caldav_synced_at, :caldav_rrule, :relay_uid, :created_at, :updated_at)');
|
||||
$stmt->execute([
|
||||
'title' => $c['title'], 'body' => $c['body'], 'color' => $c['color'],
|
||||
'bucket_id' => $bucketId, 'position' => $c['position'] ?? 0,
|
||||
'tags' => $c['tags'] ?? '', 'due_date' => $c['due_date'] ?? null,
|
||||
'caldav_uid' => $c['caldav_uid'] ?? null, 'caldav_etag' => $c['caldav_etag'] ?? null,
|
||||
'caldav_href' => $c['caldav_href'] ?? null, 'caldav_synced_at' => $c['caldav_synced_at'] ?? null,
|
||||
'caldav_rrule' => $c['caldav_rrule'] ?? null, 'relay_uid' => $c['relay_uid'] ?? null,
|
||||
'created_at' => $c['created_at'] ?? date('Y-m-d H:i:s'),
|
||||
'updated_at' => $c['updated_at'] ?? date('Y-m-d H:i:s'),
|
||||
]);
|
||||
if ($oldId) $cardMap[$oldId] = $db->lastInsertId();
|
||||
}
|
||||
// Resolve parent_id references (old id → new id)
|
||||
foreach ($data['cards'] as $c) {
|
||||
if (!empty($c['parent_id']) && isset($cardMap[$c['id']]) && isset($cardMap[$c['parent_id']])) {
|
||||
$db->prepare('UPDATE cards SET parent_id = ? WHERE id = ?')
|
||||
->execute([$cardMap[$c['parent_id']], $cardMap[$c['id']]]);
|
||||
}
|
||||
}
|
||||
|
||||
// Extract uploads
|
||||
@@ -1051,20 +1065,23 @@ if (str_starts_with($route, '/api/')) {
|
||||
</div>
|
||||
<div id="bucket-row" class="flex items-center px-6 py-1.5 relative">
|
||||
<div class="flex items-center gap-1 overflow-x-auto flex-1" id="bucket-bar"></div>
|
||||
<button id="board-split-toggle" class="flex items-center gap-1.5 px-2 py-1 text-[10px] font-pixel text-t-dim hover:text-t-accent transition-colors shrink-0 ml-2" title="split preview">
|
||||
<i class="ph ph-split-horizontal text-xs"></i>
|
||||
<button id="board-split-toggle" class="toolbar-toggle" title="split preview">
|
||||
<i class="ph ph-split-horizontal text-sm"></i>
|
||||
</button>
|
||||
<button id="superview-toggle" class="flex items-center gap-1.5 px-2 py-1 text-[10px] font-pixel text-t-dim hover:text-t-accent transition-colors shrink-0 ml-2" title="compact list view">
|
||||
<i class="ph ph-list text-xs"></i>
|
||||
<button id="superview-toggle" class="toolbar-toggle" title="compact list view">
|
||||
<i class="ph ph-list text-sm"></i>
|
||||
</button>
|
||||
<button id="hide-done" class="flex items-center gap-1.5 px-2 py-1 text-[10px] font-pixel text-t-dim hover:text-t-accent transition-colors shrink-0 ml-2" title="toggle done">
|
||||
<i class="ph ph-check-circle text-xs"></i>
|
||||
<button id="hide-done" class="toolbar-toggle" title="toggle done">
|
||||
<i class="ph ph-check-circle text-sm"></i>
|
||||
</button>
|
||||
<button id="hide-termine" class="flex items-center gap-1.5 px-2 py-1 text-[10px] font-pixel text-t-dim hover:text-t-accent transition-colors shrink-0 ml-2" title="toggle appointments">
|
||||
<i class="ph ph-calendar-x text-xs"></i>
|
||||
<button id="hide-termine" class="toolbar-toggle" title="toggle appointments">
|
||||
<i class="ph ph-calendar-x text-sm"></i>
|
||||
</button>
|
||||
<button id="sort-toggle" class="flex items-center gap-1.5 px-2 py-1 text-[10px] font-pixel text-t-dim hover:text-t-accent transition-colors shrink-0 ml-2">
|
||||
<i class="ph ph-sort-ascending text-xs"></i>
|
||||
<button id="hide-tagged" class="toolbar-toggle" title="toggle tagged cards">
|
||||
<i class="ph ph-hash text-sm"></i>
|
||||
</button>
|
||||
<button id="sort-toggle" class="toolbar-toggle">
|
||||
<i class="ph ph-sort-ascending text-sm"></i>
|
||||
<span id="sort-label">manual</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user