~jan0sch/smederee

Showing details for patch 80a1b097387897a521c6ed12e9fdd4eb0aaeb1fc.
2023-08-27 (Sun), 11:37 AM - Jens Grassel - 80a1b097387897a521c6ed12e9fdd4eb0aaeb1fc

VCS: Show full path and filename in page title of the file browser.

- add full path and filename to the title attribute of the web page in the
  repository file browser
Summary of changes
1 files modified with 4 lines added and 1 lines removed
  • modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala with 4 added and 1 removed lines
diff -rN -u old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala
--- old-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala	2025-01-15 09:43:52.961780753 +0000
+++ new-smederee/modules/hub/src/main/scala/de/smederee/hub/VcsRepositoryRoutes.scala	2025-01-15 09:43:52.961780753 +0000
@@ -586,6 +586,9 @@
         case Some(repoId) => vcsMetadataRepo.findVcsRepositoryBranches(repoId).compile.toList
         case _            => Sync[F].delay(List.empty)
       }
+      title <- Sync[F].delay(
+        s"Smederee/~$repositoryOwnerName/$repositoryName/${filePath.segments.map(_.decoded()).mkString("/")}"
+      )
       resp <-
         repo match {
           case None => NotFound("Repository not found!")
@@ -602,7 +605,7 @@
                   csrf,
                   goBackUri.some,
                   linkToTicketService,
-                  s"Smederee/~$repositoryOwnerName/$repositoryName".some,
+                  title.some,
                   user
                 )(fileContent, listing, repositoryBaseUri, repo, branches)
               )