From 371e3f13e0a046aeca3a2895e4a85f8b51059edf Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 2 Jun 2021 20:13:48 +0200 Subject: Added a tree page --- src/app.js | 9 +++ src/frontend/components/RepositoryNavbar.vue | 8 +- src/frontend/components/RepositoryTreeBlob.vue | 23 ++++++ src/frontend/components/RepositoryTreeTree.vue | 84 +++++++++++++++++++++ src/frontend/router/index.js | 11 ++- src/frontend/scss/style.scss | 26 +++++++ src/frontend/views/RepositoryTree.vue | 100 +++++++++++++++++++++++++ 7 files changed, 256 insertions(+), 5 deletions(-) create mode 100644 src/frontend/components/RepositoryTreeBlob.vue create mode 100644 src/frontend/components/RepositoryTreeTree.vue create mode 100644 src/frontend/views/RepositoryTree.vue (limited to 'src') diff --git a/src/app.js b/src/app.js index b05bbcf..8904219 100644 --- a/src/app.js +++ b/src/app.js @@ -114,6 +114,15 @@ fastify.register((fastify_repo, opts, done) => } }); + fastify_repo.route({ + method: "GET", + path: "/tree/*", + handler: async (req, reply) => + { + reply.sendFile("app.html"); + } + }); + fastify_repo.route({ method: "GET", path: "/info/refs", diff --git a/src/frontend/components/RepositoryNavbar.vue b/src/frontend/components/RepositoryNavbar.vue index 87a32d6..53e1bfa 100644 --- a/src/frontend/components/RepositoryNavbar.vue +++ b/src/frontend/components/RepositoryNavbar.vue @@ -8,9 +8,11 @@