From 4410f2e46cbf961f2100038b53426bd07aebc4e9 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Fri, 19 Mar 2021 15:51:04 +0100
Subject: feat: get all commits

---
 src/views/Home.vue | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'src/views/Home.vue')

diff --git a/src/views/Home.vue b/src/views/Home.vue
index 55c3c08..28da86b 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -1,6 +1,8 @@
 <template lang="pug">
   main
     header-blue
+    b-container
+      h2 List of commits
 </template>
 
 <script>
@@ -10,6 +12,14 @@ export default {
   name: "Home",
   components: {
     'header-blue': HeaderBlue,
+  },
+  mounted() {
+    this.$store.dispatch('get_commits');
+  },
+  computed: {
+    commits: () => {
+      return this.$store.get.commits;
+    }
   }
 }
 </script>
-- 
cgit v1.2.3-18-g5258


From d383bd08f0266406d4b0c9eb68c76e62c9d4a460 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Fri, 19 Mar 2021 16:06:10 +0100
Subject: feat: get emails

---
 src/views/Home.vue | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/views/Home.vue')

diff --git a/src/views/Home.vue b/src/views/Home.vue
index 28da86b..e507ef8 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -15,11 +15,15 @@ export default {
   },
   mounted() {
     this.$store.dispatch('get_commits');
+    this.$store.dispatch('get_emails');
   },
   computed: {
     commits: () => {
       return this.$store.get.commits;
-    }
+    },
+    emails: () => {
+      return this.$store.get.emails;
+    },
   }
 }
 </script>
-- 
cgit v1.2.3-18-g5258


From 0d6bd4aefc4e651be3f2fff15043d598e852df54 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Fri, 19 Mar 2021 16:22:41 +0100
Subject: feat: add loading

---
 src/views/Home.vue | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/views/Home.vue')

diff --git a/src/views/Home.vue b/src/views/Home.vue
index e507ef8..b5fbda0 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -6,7 +6,7 @@
 </template>
 
 <script>
-import HeaderBlue from '@/components/design/HeaderBlue';
+import HeaderBlue from '@/components/HeaderBlue';
 
 export default {
   name: "Home",
@@ -19,10 +19,10 @@ export default {
   },
   computed: {
     commits: () => {
-      return this.$store.get.commits;
+      return this.$store.getters.commits;
     },
     emails: () => {
-      return this.$store.get.emails;
+      return this.$store.getters.emails;
     },
   }
 }
-- 
cgit v1.2.3-18-g5258


From 5c29f010cf52f3ba5ee597a50df97219d8dc04a7 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Fri, 19 Mar 2021 20:27:26 +0100
Subject: feat: commits list

---
 src/views/Home.vue | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

(limited to 'src/views/Home.vue')

diff --git a/src/views/Home.vue b/src/views/Home.vue
index b5fbda0..c1d9420 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -2,26 +2,37 @@
   main
     header-blue
     b-container
-      h2 List of commits
+      b-row
+        b-col(md="8" sm="12")
+          h2 List of commits
+          section#commits
+            commit-card(
+              v-for="i in commits" :key="i.hash" :data="i"
+              :author="emails[i.author_email]"
+              :committer="emails[i.committer_email]"
+            )
+        b-col
 </template>
 
 <script>
 import HeaderBlue from '@/components/HeaderBlue';
+import Commit from '@/components/Commit';
 
 export default {
   name: "Home",
   components: {
     'header-blue': HeaderBlue,
+    'commit-card': Commit,
   },
   mounted() {
     this.$store.dispatch('get_commits');
     this.$store.dispatch('get_emails');
   },
   computed: {
-    commits: () => {
+    commits: function() {
       return this.$store.getters.commits;
     },
-    emails: () => {
+    emails: function() {
       return this.$store.getters.emails;
     },
   }
-- 
cgit v1.2.3-18-g5258


From a9ece91610c7f33cbc6445b58cfd1a9b43a89a49 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Sat, 20 Mar 2021 11:12:39 +0100
Subject: chore: isolated loadings

---
 src/views/Home.vue | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/views/Home.vue')

diff --git a/src/views/Home.vue b/src/views/Home.vue
index c1d9420..3ca1445 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -6,7 +6,10 @@
         b-col(md="8" sm="12")
           h2 List of commits
           section#commits
+            .commit(style="padding: 50px" v-if="loading")
+              b-overlay(:show="true" spinner-large)
             commit-card(
+              v-else
               v-for="i in commits" :key="i.hash" :data="i"
               :author="emails[i.author_email]"
               :committer="emails[i.committer_email]"
@@ -35,6 +38,9 @@ export default {
     emails: function() {
       return this.$store.getters.emails;
     },
+    loading: function() {
+      return this.$store.getters.loading;
+    }
   }
 }
 </script>
-- 
cgit v1.2.3-18-g5258


From 45e5a794ae423e81afa7fdde329f34e3d4a0bcd3 Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Sat, 20 Mar 2021 18:01:09 +0100
Subject: feat: add top authors section

---
 src/views/Home.vue | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

(limited to 'src/views/Home.vue')

diff --git a/src/views/Home.vue b/src/views/Home.vue
index 3ca1445..49e42b3 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -2,7 +2,7 @@
   main
     header-blue
     b-container
-      b-row
+      b-row#home
         b-col(md="8" sm="12")
           h2 List of commits
           section#commits
@@ -14,22 +14,37 @@
               :author="emails[i.author_email]"
               :committer="emails[i.committer_email]"
             )
-        b-col
+        b-col(md="4" sm="12")
+          h2 Top authors
+          b-list-group
+            b-list-group-item(v-if="loading_top_authors")
+              b-overlay(:show="true" spinner-large)
+            b-list-group-item(
+              v-else v-for="author in top_authors.slice(0, 7)" :key="author.email"
+              button
+            )
+              author(
+                :data="author"
+                :avatar="emails[author.author_email]"
+              )
 </template>
 
 <script>
 import HeaderBlue from '@/components/HeaderBlue';
 import Commit from '@/components/Commit';
+import TopAuthor from '@/components/TopAuthor';
 
 export default {
   name: "Home",
   components: {
     'header-blue': HeaderBlue,
     'commit-card': Commit,
+    'author': TopAuthor,
   },
   mounted() {
     this.$store.dispatch('get_commits');
     this.$store.dispatch('get_emails');
+    this.$store.dispatch('get_top_authors');
   },
   computed: {
     commits: function() {
@@ -38,8 +53,14 @@ export default {
     emails: function() {
       return this.$store.getters.emails;
     },
+    top_authors: function() {
+      return this.$store.getters.top_authors;
+    },
     loading: function() {
       return this.$store.getters.loading;
+    },
+    loading_top_authors: function() {
+      return this.$store.getters.loading_top_authors;
     }
   }
 }
-- 
cgit v1.2.3-18-g5258

