Merge branch 'master' into patch-1
Cette révision appartient à :
révision
8f42cbc5f6
12 fichiers modifiés avec 114 ajouts et 14 suppressions
|
@ -356,3 +356,25 @@ footer {
|
|||
content: ">";
|
||||
}
|
||||
|
||||
.completed {
|
||||
font-size: 2rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proSeedBar {
|
||||
width:100%; height: 0.5rem; overflow: hidden;
|
||||
}
|
||||
|
||||
.proSeedBar .seeds {
|
||||
background: green;
|
||||
height: 0.5rem;
|
||||
}
|
||||
|
||||
.proSeedBar .leechs {
|
||||
height: 0.5rem;
|
||||
background: red;
|
||||
position: relative;
|
||||
top: -0.5rem;
|
||||
float: right;
|
||||
}
|
|
@ -73,4 +73,10 @@ var FuncMap = template.FuncMap{
|
|||
"NoEncode": func(str string) template.HTML {
|
||||
return template.HTML(str)
|
||||
},
|
||||
"calcWidthSeed": func(seed uint32, leech uint32) float64 {
|
||||
return float64(float64(seed)/(float64(seed)+float64(leech)))*100
|
||||
},
|
||||
"calcWidthLeech": func(seed uint32, leech uint32) float64 {
|
||||
return float64(float64(leech)/(float64(seed)+float64(leech)))*100
|
||||
},
|
||||
}
|
||||
|
|
|
@ -122,7 +122,16 @@ func UserDetailsHandler(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
searchForm := NewSearchForm()
|
||||
searchForm.HideAdvancedSearch = true
|
||||
|
||||
languages.SetTranslationFromRequest(notFoundTemplate, r, "en-us")
|
||||
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, searchForm, GetUser(r), r.URL, mux.CurrentRoute(r)})
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Getting View User Profile Update
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
<option value="2" {{if eq .Search.Sort 2}}selected{{end}}>{{T "date"}}</option>
|
||||
<option value="3" {{if eq .Search.Sort 3}}selected{{end}}>{{T "downloads"}}</option>
|
||||
<option value="4" {{if eq .Search.Sort 4}}selected{{end}}>{{T "size"}}</option>
|
||||
<option value="5" {{if eq .Search.Sort 4}}selected{{end}}>{{T "seeders"}}</option>
|
||||
<option value="6" {{if eq .Search.Sort 4}}selected{{end}}>{{T "leechers"}}</option>
|
||||
<option value="7" {{if eq .Search.Sort 4}}selected{{end}}>{{T "completed"}}</option>
|
||||
</select>
|
||||
<select name="order" class="form-control input-sm">
|
||||
<option value="false" {{if eq .Search.Order false}}selected{{end}}>{{T "descending"}}</option>
|
||||
|
|
|
@ -54,8 +54,22 @@
|
|||
<p><a href="{{.WebsiteLink}}">{{.WebsiteLink}}</a></p>
|
||||
<hr>
|
||||
{{end}}
|
||||
<h4>{{T "seeders"}} | {{T "leechers"}} | {{T "completed"}}</h4>
|
||||
<p>{{.Seeders}} | {{.Leechers}} | {{.Completed}}</p>
|
||||
<div class="row">
|
||||
<div class="col-md-4">{{T "seeders"}}</div>
|
||||
<div class="col-md-4">{{T "leechers"}}</div>
|
||||
<div class="col-md-4">{{T "completed"}}</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">{{.Seeders}}</div>
|
||||
<div class="col-md-4">{{.Leechers}}</div>
|
||||
<div class="col-md-4"><span class="completed" style="">{{.Completed}}</span></div>
|
||||
<div class="col-md-8">
|
||||
<div class="proSeedBar">
|
||||
<div class="seeds" style="width: {{ calcWidthSeed .Seeders .Leechers }}%;"></div>
|
||||
<div class="leechs" style="width: {{ calcWidthLeech .Seeders .Leechers }}%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
},
|
||||
{
|
||||
"id": "reset_password_title",
|
||||
"translation": "Reset your password for goyangi."
|
||||
"translation": "Reset your password for Nyaapantsu."
|
||||
},
|
||||
{
|
||||
"id": "reset_password_content",
|
||||
|
@ -598,5 +598,9 @@
|
|||
{
|
||||
"id": "torrent_status_remake",
|
||||
"translation": "Remake"
|
||||
},
|
||||
{
|
||||
"id": "profile_edit_page",
|
||||
"translation": "Edit %s's profile"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -566,7 +566,7 @@
|
|||
{
|
||||
"id": "delete_success",
|
||||
"translation": "Le compte a été supprimé avec succès !"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "moderation",
|
||||
"translation": "Modération"
|
||||
|
@ -582,7 +582,7 @@
|
|||
{
|
||||
"id": "mark_as_remake",
|
||||
"translation": "Marquer comme remake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "email_changed",
|
||||
"translation": "L'adresse email a été modifiée avec succès ! Confirmez le changement en cliquant sur le lien envoyé à : %s"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
},
|
||||
{
|
||||
"id": "reset_password_title",
|
||||
"translation": "Stel je wachtwoord opnieuw in voor goyangi."
|
||||
"translation": "Stel je wachtwoord opnieuw in voor Nyaapantsu."
|
||||
},
|
||||
{
|
||||
"id": "reset_password_content",
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
},
|
||||
{
|
||||
"id": "reset_password_title",
|
||||
"translation": "Redefina a sua senha do goyangi."
|
||||
"translation": "Redefina a sua senha do Nyaapantsu."
|
||||
},
|
||||
{
|
||||
"id": "reset_password_content",
|
||||
|
@ -580,7 +580,7 @@
|
|||
"translation": "Marcar como remake"
|
||||
},
|
||||
{
|
||||
"id": "email_changed",
|
||||
"translation": "Email alterado com sucesso! Você terá, no entanto, que confirmá-lo clicando no link enviado para: %s"
|
||||
"id": "profile_edit_page",
|
||||
"translation": "Editar o perfil de %s"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
},
|
||||
{
|
||||
"id":"signup_verification_email",
|
||||
"translation": "กรุณาเช็คอีเมล (และในโฟลเดอร์เมลขยะ!) สำหรับเมล์ยืนยันตัวตน"
|
||||
"translation": "กรุณาเช็คอีเมล (และในโฟลเดอร์เมลขยะ!) สำหรับเมลยืนยันตัวตน"
|
||||
},
|
||||
{
|
||||
"id":"signup_verification_noemail",
|
||||
|
@ -249,11 +249,11 @@
|
|||
},
|
||||
{
|
||||
"id": "future_not_looking_good",
|
||||
"translation": "และอนาคตข้างหน้าสำหรับ Nyaa ดูจะไม่ดีเท่าไหร่ (ตายสนิท)"
|
||||
"translation": "และอนาคตข้างหน้าสำหรับ Nyaa ดูจะไม่ค่อยดีเท่าไหร่ (ตายสนิท)"
|
||||
},
|
||||
{
|
||||
"id": "recovery_effort",
|
||||
"translation": "นี่จึงเป็นความพยายามที่จะกู้กลับมา"
|
||||
"translation": "นั่นจึงเป็นความพยายามที่จะกู้กลับมา"
|
||||
},
|
||||
{
|
||||
"id": "is_everything_lost",
|
||||
|
@ -562,5 +562,41 @@
|
|||
{
|
||||
"id": "delete_success",
|
||||
"translation": "ลบแอคเคาท์เรียบร้อยแล้ว!"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "moderation",
|
||||
"translation": "Moderation"
|
||||
},
|
||||
{
|
||||
"id": "who_is_renchon",
|
||||
"translation": "ใครคือ れんちょん?"
|
||||
},
|
||||
{
|
||||
"id": "renchon_anon_explanation",
|
||||
"translation": "れんちょん คือชื่อผู้ใช้ที่ตั้งไว้สำหรับอัพโหลดและคอมเมนท์แบบไม่ระบุตัวตน ซึ่งถูกใช้กับทอร์เรนท์ที่กู้มาจาก Nyaa ดั้งเดิม และชื่อผู้อัพโหลดดั้งเดิมควรจะแสดงผลคู่กัน"
|
||||
},
|
||||
{
|
||||
"id": "mark_as_remake",
|
||||
"translation": "ระบุว่าเป็นงานทำซ้ำ"
|
||||
},
|
||||
{
|
||||
"id": "email_changed",
|
||||
"translation": "เปลี่ยนอีเมลเรียบร้อย! แต่คุณยังต้องยันยันด้วยลิงค์ที่ส่งไปยัง: %s"
|
||||
},
|
||||
{
|
||||
"id": "torrent_status",
|
||||
"translation": "สถานะทอร์เรนท์"
|
||||
},
|
||||
{
|
||||
"id": "torrent_status_hidden",
|
||||
"translation": "ถูกซ่อน"
|
||||
},
|
||||
{
|
||||
"id": "torrent_status_normal",
|
||||
"translation": "ปกติ"
|
||||
},
|
||||
{
|
||||
"id": "torrent_status_remake",
|
||||
"translation": "งานทำซ้ำ"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -82,6 +82,12 @@ func searchByQuery(r *http.Request, pagenum int, countAll bool) (
|
|||
case "4":
|
||||
search.Sort = common.Size
|
||||
orderBy += "filesize"
|
||||
case "5":
|
||||
orderBy += "seeders"
|
||||
case "6":
|
||||
orderBy += "leechers"
|
||||
case "7":
|
||||
orderBy += "completed"
|
||||
default:
|
||||
orderBy += "torrent_id"
|
||||
}
|
||||
|
|
Référencer dans un nouveau ticket