aboutsummaryrefslogtreecommitdiff
path: root/packages/client/src/views/RepositoryTree.vue
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-07-03 17:45:18 +0200
committerHampusM <hampus@hampusmat.com>2021-07-03 17:45:18 +0200
commit505c18041bebf533ec63fed3790f54f5c6e1843b (patch)
treea1e4661449e8757ac6b0ad83088759c1609ebc96 /packages/client/src/views/RepositoryTree.vue
parent7ee871e391cd2d2057175d54767fc71e708e32eb (diff)
Made a bunch of frontend stuff work
Diffstat (limited to 'packages/client/src/views/RepositoryTree.vue')
-rw-r--r--packages/client/src/views/RepositoryTree.vue7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/client/src/views/RepositoryTree.vue b/packages/client/src/views/RepositoryTree.vue
index 351591a..6a788d3 100644
--- a/packages/client/src/views/RepositoryTree.vue
+++ b/packages/client/src/views/RepositoryTree.vue
@@ -58,23 +58,22 @@ export default {
const tree = ref(null);
const blob_content = ref(null);
const is_loading = ref(true);
- const fetch_failed = ref(null);
+ const fetch_failed = ref("");
const path = ref("");
const fetchTree = async(repository) => {
blob_content.value = null;
tree.value = null;
-
path.value = props.pathArr ? props.pathArr.join("/") : undefined;
const tree_data = await fetchData(`repos/${repository}/tree${path.value ? "?path=" + path.value : ""}`, fetch_failed, is_loading, "tree");
if(tree_data) {
if(tree_data.type === "tree") {
- let tree_trees = tree_data.tree.filter((entry) => entry.type === "tree");
+ let tree_trees = tree_data.content.filter((entry) => entry.type === "tree");
tree_trees = tree_trees.sort((a, b) => a.name.localeCompare(b.name));
- let tree_blobs = tree_data.tree.filter((entry) => entry.type === "blob");
+ let tree_blobs = tree_data.content.filter((entry) => entry.type === "blob");
tree_blobs = tree_blobs.sort((a, b) => a.name.localeCompare(b.name));
tree.value = tree_trees.concat(tree_blobs);