feat(repository): sort folders first, then special-0-9a-z, also show path@@ -1,5 +1,5 @@
{
- "_generatedAtUnix": 1663709447382,
+ "_generatedAtUnix": 1663710346170,
"_hashAlgorithm": "sha1",
"_version": 2,
"islands": {
@@ -58,7 +58,7 @@
"pathSource": "./app/views/repository/RepositoryCreateView.tsx"
},
"RepositoryDetailsView": {
- "hash": "c63cf850a8c1a9fecd09fb2823fabba543616338",
+ "hash": "9bd8849b7ac7baab21e1c6d0c8bd40549257bf72",
"pathSource": "./app/views/repository/RepositoryDetailsView.tsx"
},
"RepositoryExploreView": {
@@ -70,7 +70,18 @@ const makeGetRepositoryFiles: ServiceMethodFactory<
type,
} as RepositoryFile;
})
- .filter((x): x is RepositoryFile => x != null);
+ .filter((x): x is RepositoryFile => x != null)
+ .sort((a, b) => {
+ if (a.type === "blob" && b.type === "tree") {
+ return 1;
+ } else if (a.type === "blob" && b.type === "blob") {
+ return 0;
+ } else if (a.type === "tree" && b.type === "tree") {
+ return 0;
+ } else {
+ return -1;
+ }
+ });
return repoFiles;
} catch (_) {
@@ -54,6 +54,9 @@ const RepositoryDetailsView: ReactView<RepositoryDetailsViewProps> = ({
<a href={`/${parentOrg.slug}/${repo.slug}`}>
{repo.displayName || repo.slug}
</a>
+ {path != null && path.trim() !== "" && path !== "/"
+ ? ` / ${path}`
+ : ""}
{" ∙ "}
<span style={{ textTransform: "capitalize" }}>
({repo.visibility.toLowerCase()})