Merge branch 'refactor' into patch-9
Cette révision appartient à :
révision
1bed76474e
9 fichiers modifiés avec 21 ajouts et 27 suppressions
|
@ -148,9 +148,6 @@ func templateFunctions(vars jet.VarMap) jet.VarMap {
|
|||
return "https://www.gravatar.com/avatar/" + hash + "?s=" + strconv.Itoa(size)
|
||||
})
|
||||
|
||||
vars.Set("DisplayTorrent", func(t models.Torrent, u *models.User) bool {
|
||||
return (!t.Hidden && t.Status != 0) || u.CurrentOrAdmin(t.UploaderID)
|
||||
})
|
||||
vars.Set("NoEncode", func(str string) template.HTML {
|
||||
return template.HTML(str)
|
||||
})
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
.flag-other {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.flag-multiple {
|
||||
background: url('flag_multiple.png') no-repeat;
|
||||
}
|
||||
|
Fichier binaire non affiché.
Avant Largeur: | Hauteur: | Taille: 513 o |
Fichier binaire non affiché.
Avant Largeur: | Hauteur: | Taille: 349 o |
|
@ -55,7 +55,7 @@
|
|||
}
|
||||
|
||||
.flag.flag-br {
|
||||
background-position: 0 0;
|
||||
background-position: -80px 0;
|
||||
}
|
||||
|
||||
.flag.flag-it {
|
||||
|
@ -91,5 +91,13 @@
|
|||
}
|
||||
|
||||
.flag.flag-ca {
|
||||
background: url('flag_catalan.png') no-repeat;
|
||||
}
|
||||
background-position: -80px -11px;
|
||||
}
|
||||
|
||||
.flag.flag-multiple {
|
||||
background-position: -80px -22px;
|
||||
}
|
||||
|
||||
.flag.flag-other {
|
||||
background: none;
|
||||
}
|
||||
|
|
Fichier binaire non affiché.
Avant Largeur: | Hauteur: | Taille: 5,8 Kio Après Largeur: | Hauteur: | Taille: 8,6 Kio |
|
@ -152,7 +152,7 @@ select.form-input {
|
|||
|
||||
.language span.input-group { display: inline-block; }
|
||||
.language .input-group label { margin-bottom: 1px; }
|
||||
.language .input-group input { margin-right: 0; }
|
||||
.language .input-group input { margin-right: 4px; }
|
||||
|
||||
.not-important {
|
||||
font-size: 9pt;
|
||||
|
@ -177,7 +177,6 @@ select.form-input {
|
|||
|
||||
.header .h-user button:focus {outline:none; background-color: rgba(0,0,0, 0.3);}::-moz-focus-inner {border:0;}
|
||||
|
||||
|
||||
.header .h-user .user-avatar {
|
||||
float: right;
|
||||
height: 40px; width: 40px;
|
||||
|
@ -285,9 +284,6 @@ table {
|
|||
table-layout: fixed;
|
||||
}
|
||||
|
||||
|
||||
th { height: 40px;}
|
||||
|
||||
th,.home-td,.user-td {
|
||||
height: 37px;
|
||||
text-align: center;
|
||||
|
@ -329,10 +325,11 @@ th, .home-td { border-bottom: 1px solid; }
|
|||
|
||||
th { border-bottom-width: 2px; }
|
||||
|
||||
.hidden { opacity: 0.5; filter: grayscale(20%);}
|
||||
.tr-cat { width: 90px; text-align: center; }
|
||||
.tr-flag { white-space: initial!important; }
|
||||
.tr-name { width: auto; text-align: left; white-space: normal; word-break: break-word; font-weight: bold; }
|
||||
.tr-links { width: 66px; }
|
||||
.tr-links { width: 66px; overflow:initial; }
|
||||
.tr-cs { width: 5px; overflow: initial; text-overflow: initial; }
|
||||
.tr-cs .comment-icon { margin-bottom: 4px; }
|
||||
.tr-size { width: 90px; }
|
||||
|
@ -453,8 +450,9 @@ html, body {
|
|||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.tr-cat { width: 77px; }
|
||||
.form-input.refine { display: none;}
|
||||
.tr-cat { width: 73px; }
|
||||
.form-input.refine { display: none; }
|
||||
.tr-links { width: 50px; }
|
||||
}
|
||||
|
||||
@media (maw-width: 520px) {
|
||||
|
@ -629,6 +627,7 @@ input#show-filelist:checked ~ #filelist {
|
|||
width: 100%;
|
||||
}
|
||||
tr.torrentinfo { min-height: 38px; }
|
||||
thead.torrentinfo { min-height: 40px; }
|
||||
.tr-filelist {
|
||||
--nest-level: 0;
|
||||
}
|
||||
|
|
|
@ -12,11 +12,10 @@
|
|||
<th class="tr-date user-td hide-xs">{{ T("date")}}</th>
|
||||
</tr>
|
||||
{{ range i, t := UserProfile.Torrents }}
|
||||
{{ if DisplayTorrent(t, User) }}
|
||||
{{ torrent := t.ToJSON() }}
|
||||
<tr class="torrent-info
|
||||
{{if torrent.Status == 2}}remake{{else if torrent.Status == 3}}trusted{{else if torrent.Status == 4}}aplus{{end}}">
|
||||
<!-- forced width because the <td> gets bigger randomly otherwise -->
|
||||
{{if torrent.Status == 2}}remake{{else if torrent.Status == 3}}trusted{{else if torrent.Status == 4}}aplus{{end}}{{ if torrent.hidden }} hidden{{end}}"
|
||||
{{if torrent.hidden }}title="{{T("upload_as_anon")}}: {{T("yes")}}"{{end}}>
|
||||
<td class="tr-cat user-td">
|
||||
{{ if Sukebei }}
|
||||
<div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory}}">
|
||||
|
@ -53,7 +52,6 @@
|
|||
<td class="tr-date user-td date-short hide-xs">{{torrent.Date}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</table>
|
||||
<nav class="torrentNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
|
|
|
@ -12,7 +12,7 @@ func Handle() {
|
|||
chnl := make(chan os.Signal)
|
||||
signal.Notify(chnl, os.Interrupt)
|
||||
go func(chnl chan os.Signal) {
|
||||
for sig := chnl {
|
||||
for sig := range chnl {
|
||||
switch sig {
|
||||
case os.Interrupt:
|
||||
// this also closes listeners
|
||||
|
|
Référencer dans un nouveau ticket