Added modals for popups, and fixed root-level bug.

This commit is contained in:
sarah committed 2026-09-21 21:38:12 +02:00
1 parent 9736a55e00
commit 104198036a
11 files changed
+312 -62

No files matched your search

+4 -3
View File
@@ -23,7 +23,7 @@ from Auth import (
)
from BookReader import ReadBookForFile
from Blame import LoadBlame, RenameUserInBlame, UpdateBlameOnSave
from Core import ResolvePath
from Core import NormalizeRelativePath, ResolvePath
from Embeds import BuildOgTags
from Editor import WriteTextFile
from Explorer import (
@@ -440,10 +440,11 @@ def PatchTreeEndpoint(
) -> dict:
RequirePathAccessible(Root, Path, CurrentUser)
ParentPath = Path.rsplit("/", 1)[0] if "/" in Path else ""
if Body.DestinationPath:
Destination = Body.DestinationPath
Destination = NormalizeRelativePath(ParentPath, Body.DestinationPath)
elif Body.NewName:
ParentPath = Path.rsplit("/", 1)[0] if "/" in Path else ""
Destination = f"{ParentPath}/{Body.NewName}" if ParentPath else Body.NewName
else:
raise HTTPException(status_code=400, detail="Provide NewName or DestinationPath.")