fix: federated spaces in folders + DnD double indicator line

Remove FK constraint on space_folder_members.space_id so federated
space IDs (which don't exist in the local spaces table) can be added
to folders without silently failing. Add migration to recreate the
table for existing databases and explicit cleanup on space deletion.

Offset drop indicator lines by 3px into the mb-1.5 gap so adjacent
items share one visual position instead of showing two lines.

Extract TransferOwnershipModal (~165 lines) to its own file.
This commit is contained in:
Jannis Braun
2026-03-12 04:18:01 +01:00
parent 585988802d
commit b776e0e5b0
6 changed files with 205 additions and 177 deletions
+2 -1
View File
@@ -174,7 +174,8 @@ function createTables(db: Database.Database): void {
CREATE TABLE IF NOT EXISTS space_folder_members (
folder_id TEXT NOT NULL REFERENCES space_folders(id) ON DELETE CASCADE,
space_id TEXT NOT NULL REFERENCES spaces(id) ON DELETE CASCADE,
space_id TEXT NOT NULL,
position INTEGER DEFAULT 0,
PRIMARY KEY (folder_id, space_id)
);