cerrado @ 1059bc71871c14b813b0bb27b4601e2c2ac65acd

feat: Add private label to the UI

Now private repository will have a private label on the list.
diff --git a/pkg/service/git.go b/pkg/service/git.go
index 6c3912fae3c57a3500849ef2e15d2616b838f144..afe61039f3e8e8c87a8b628e03015b167e285dd4 100644
--- a/pkg/service/git.go
+++ b/pkg/service/git.go
@@ -16,6 +16,7 @@ type (
 	Repository struct {
 		Name           string
 		Description    string
+		Public         bool
 		LastCommitDate string
 		Ref            string
 	}
@@ -66,6 +67,7 @@
 		repos = append(repos, &Repository{
 			Name:           r.Name,
 			Description:    r.Description,
+			Public:         r.Public,
 			LastCommitDate: obj.Author.When.Format(timeFormat),
 			Ref:            head.Name().Short(),
 		})
diff --git a/templates/gitlist.qtpl b/templates/gitlist.qtpl
index fa470089e9f4fd64c066822ec1c849628ddd4f1e..fc047ebf4a7f8946462124d017d6d9def0c9f76c 100644
--- a/templates/gitlist.qtpl
+++ b/templates/gitlist.qtpl
@@ -18,9 +18,14 @@   <div class="col-md-6 order-last order-md-first">
     <div class="event-list">
       {% for _, r := range p.Respositories %}
       <div class="event">
-        <h4>
-          <a href="/{%s r.Name %}/">{%s r.Name %}</a>
-        </h4>
+        <div class="row">
+          <div class="col-md">
+              <a href="/{%s r.Name %}/">{%s r.Name %}</a>
+          </div>
+          <div class="col-md text-md-end">
+            <small>{% if !r.Public %}private{% endif %}</small>
+          </div>
+        </div>
         </hr>
         <p>{%s r.Description %}</p>
         <p>
diff --git a/templates/gitlist.qtpl.go b/templates/gitlist.qtpl.go
index 601dbb2fa8c947e791800ebded6aabbd64005919..07e5567039df5840d9c40d821cc6d60c88bec6b0 100644
--- a/templates/gitlist.qtpl.go
+++ b/templates/gitlist.qtpl.go
@@ -108,61 +108,74 @@ 	for _, r := range p.Respositories {
 //line templates/gitlist.qtpl:19
 		qw422016.N().S(`
       <div class="event">
-        <h4>
-          <a href="/`)
-//line templates/gitlist.qtpl:22
+        <div class="row">
+          <div class="col-md">
+              <a href="/`)
+//line templates/gitlist.qtpl:23
 		qw422016.E().S(r.Name)
-//line templates/gitlist.qtpl:22
+//line templates/gitlist.qtpl:23
 		qw422016.N().S(`/">`)
-//line templates/gitlist.qtpl:22
+//line templates/gitlist.qtpl:23
 		qw422016.E().S(r.Name)
-//line templates/gitlist.qtpl:22
+//line templates/gitlist.qtpl:23
 		qw422016.N().S(`</a>
-        </h4>
+          </div>
+          <div class="col-md text-md-end">
+            <small>`)
+//line templates/gitlist.qtpl:26
+		if !r.Public {
+//line templates/gitlist.qtpl:26
+			qw422016.N().S(`private`)
+//line templates/gitlist.qtpl:26
+		}
+//line templates/gitlist.qtpl:26
+		qw422016.N().S(`</small>
+          </div>
+        </div>
         </hr>
         <p>`)
-//line templates/gitlist.qtpl:25
+//line templates/gitlist.qtpl:30
 		qw422016.E().S(r.Description)
-//line templates/gitlist.qtpl:25
+//line templates/gitlist.qtpl:30
 		qw422016.N().S(`</p>
         <p>
           <a href="/`)
-//line templates/gitlist.qtpl:27
+//line templates/gitlist.qtpl:32
 		qw422016.E().S(r.Name)
-//line templates/gitlist.qtpl:27
+//line templates/gitlist.qtpl:32
 		qw422016.N().S(`/log/`)
-//line templates/gitlist.qtpl:27
+//line templates/gitlist.qtpl:32
 		qw422016.E().S(r.Ref)
-//line templates/gitlist.qtpl:27
+//line templates/gitlist.qtpl:32
 		qw422016.N().S(`/">log</a>
           <a href="/`)
-//line templates/gitlist.qtpl:28
+//line templates/gitlist.qtpl:33
 		qw422016.E().S(r.Name)
-//line templates/gitlist.qtpl:28
+//line templates/gitlist.qtpl:33
 		qw422016.N().S(`/tree/`)
-//line templates/gitlist.qtpl:28
+//line templates/gitlist.qtpl:33
 		qw422016.E().S(r.Ref)
-//line templates/gitlist.qtpl:28
+//line templates/gitlist.qtpl:33
 		qw422016.N().S(`/">tree</a>
           <a href="/`)
-//line templates/gitlist.qtpl:29
+//line templates/gitlist.qtpl:34
 		qw422016.E().S(r.Name)
-//line templates/gitlist.qtpl:29
+//line templates/gitlist.qtpl:34
 		qw422016.N().S(`/refs/">refs</a>
         </p>
       </div>
       `)
-//line templates/gitlist.qtpl:32
+//line templates/gitlist.qtpl:37
 	}
-//line templates/gitlist.qtpl:32
+//line templates/gitlist.qtpl:37
 	qw422016.N().S(`
     </div>
   </div>
   <div id="about" class="col-md-4 order-first order-md-last">
     `)
-//line templates/gitlist.qtpl:36
+//line templates/gitlist.qtpl:41
 	qw422016.N().Z(p.About)
-//line templates/gitlist.qtpl:36
+//line templates/gitlist.qtpl:41
 	qw422016.N().S(`
     <div class="alert alert-warning text-center" role="alert">
         This project is under development, things may be broken or incomplete.
@@ -170,65 +183,65 @@     </div>
   </div>
 </div>
 `)
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 }
 
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 func (p *GitListPage) WriteContent(qq422016 qtio422016.Writer, ctx context.Context) {
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	qw422016 := qt422016.AcquireWriter(qq422016)
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	p.StreamContent(qw422016, ctx)
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	qt422016.ReleaseWriter(qw422016)
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 }
 
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 func (p *GitListPage) Content(ctx context.Context) string {
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	qb422016 := qt422016.AcquireByteBuffer()
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	p.WriteContent(qb422016, ctx)
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	qs422016 := string(qb422016.B)
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	qt422016.ReleaseByteBuffer(qb422016)
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 	return qs422016
-//line templates/gitlist.qtpl:42
+//line templates/gitlist.qtpl:47
 }
 
-//line templates/gitlist.qtpl:44
+//line templates/gitlist.qtpl:49
 func (p *GitListPage) StreamScript(qw422016 *qt422016.Writer, ctx context.Context) {
-//line templates/gitlist.qtpl:44
+//line templates/gitlist.qtpl:49
 	qw422016.N().S(`
 `)
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 }
 
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 func (p *GitListPage) WriteScript(qq422016 qtio422016.Writer, ctx context.Context) {
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	qw422016 := qt422016.AcquireWriter(qq422016)
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	p.StreamScript(qw422016, ctx)
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	qt422016.ReleaseWriter(qw422016)
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 }
 
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 func (p *GitListPage) Script(ctx context.Context) string {
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	qb422016 := qt422016.AcquireByteBuffer()
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	p.WriteScript(qb422016, ctx)
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	qs422016 := string(qb422016.B)
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	qt422016.ReleaseByteBuffer(qb422016)
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 	return qs422016
-//line templates/gitlist.qtpl:45
+//line templates/gitlist.qtpl:50
 }