Small design fixes (#1657)
* Update main.css * Update main.css * fix inline display of delete button * Update main.css * Update torrentlist.jet.html * Update torrent_report.jet.html * Update torrentlist.jet.html * Update announcements.jet.html * Update announcements.jet.html * Update user.go * Update tomorrow.css * Update tomorrow.css
Cette révision appartient à :
Parent
bde8ff4f49
révision
3c06b0fc5c
|
@ -2176,6 +2176,18 @@ table.multiple-upload {
|
|||
background: #d0d0d0;
|
||||
}
|
||||
|
||||
button [class^="icon-"], button [class*=" icon-"] {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
form.delete-form {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
form.delete-form button.form-input.btn-red {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
/* Language specific CSS */
|
||||
|
||||
html[lang="ja-jp"] .form-refine span.spacing {
|
||||
|
|
|
@ -126,6 +126,9 @@ a.form-input[class*="btn"]:hover {
|
|||
background: #141517;
|
||||
color: #c5c8c6;
|
||||
}
|
||||
.sukebei .pagination .active {
|
||||
color: #ff5252;
|
||||
}
|
||||
|
||||
.pagination .disabled {
|
||||
color: #141517;
|
||||
|
@ -337,3 +340,6 @@ span.tag {
|
|||
.admin-content tr:hover a {
|
||||
color: #bbd2e6;
|
||||
}
|
||||
.sukebei .admin-content tr:hover a {
|
||||
color: #ea8c8c;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<thead class="torrent-info">
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("message") }}</th>
|
||||
<th class="tr-links">{{ T("expire") }}</th>
|
||||
<th class="tr-links" style="width: 120px;">{{ T("expire") }}</th>
|
||||
<th class="tr-actions">{{ T("actions") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<a href="/mod/announcement/form?id={{ .ID }}">{{ .Content }}</a>
|
||||
</td>
|
||||
<td class="tr-name home-td">
|
||||
<a href="/mod/announcement/form?id={{ .ID }}">{{ .Expire }}</a>
|
||||
<a href="/mod/announcement/form?id={{ .ID }}" class="date-full">{{ formatDate(.Expire, false) }}</a>
|
||||
</td>
|
||||
<td class="tr-actions home-td">
|
||||
<form method="POST" action="/mod/announcement/delete">
|
||||
|
@ -30,6 +30,6 @@
|
|||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="/mod/announcement/form" class="form-input btn-green">{{ T("add") }}</a>
|
||||
<div style="margin: 10px 0;"><a href="/mod/announcement/form" class="form-input btn-green">{{ T("add") }}</a></div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
<td class="tr-size home-td">{{.User.Username}}</td>
|
||||
<td class="tr-actions home-td">{{ getReportDescription(.Description, T) }}</td>
|
||||
<td class="tr-actions home-td">
|
||||
<form method="POST" action="/mod/torrent/delete">
|
||||
<input type="hidden" name="id" value="{{ .Torrent }}">
|
||||
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;"><i class="icon-trash"></i> {{ T("delete_torrent") }}</button>
|
||||
</form>
|
||||
<form method="POST" action="/mod/report/delete">
|
||||
<input type="hidden" name="id" value="{{ .ID }}">
|
||||
<button type="submit" class="form-input btn-red"><i class="icon-trash"></i> {{ T("delete_report") }}</button>
|
||||
</form>
|
||||
<form method="POST" action="/mod/torrent/delete">
|
||||
<input type="hidden" name="id" value="{{ .Torrent }}">
|
||||
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;"><i class="icon-trash"></i> {{ T("delete_torrent") }}</button>
|
||||
</form>
|
||||
<form method="POST" action="/mod/report/delete">
|
||||
<input type="hidden" name="id" value="{{ .ID }}">
|
||||
<button type="submit" class="form-input btn-red"><i class="icon-attention"></i> {{ T("delete_report") }}</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
|
|
@ -62,19 +62,12 @@
|
|||
{{ T("torrent_block") }}
|
||||
{{end}}
|
||||
</a>
|
||||
{{ if .IsDeleted }}
|
||||
<br/>
|
||||
<form method="POST" action="/mod/torrent/delete">
|
||||
<input type="hidden" name="id" value="{{ .ID }}">
|
||||
<input type="hidden" name="definitely" value="true">
|
||||
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }} {{ T("delete_definitely_torrent_warning ")}}')) return false;"><i class="icon-trash"></i> {{ T("delete_definitely") }}</button>
|
||||
</form>
|
||||
{{ else }}
|
||||
<form method="POST" action="/mod/torrent/delete">
|
||||
<input type="hidden" name="id" value="{{ .ID }}">
|
||||
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</button>
|
||||
</form>
|
||||
{{ end }}
|
||||
<form method="POST" action="/mod/torrent/delete" class="delete-form">
|
||||
<input type="hidden" name="id" value="{{ .ID }}">
|
||||
{{ if .IsDeleted }}<input type="hidden" name="definitely" value="true">{{ end }}
|
||||
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }} {{ if !.IsDeleted }}{{ T("delete") }}{{else}}{{ T("delete_definitely_torrent_warning ")}}{{end}}')) return false;"><i class="icon-trash"></i>{{ if .IsDeleted }}{{ T("delete_definitely") }}{{else}}{{ T("delete") }}{{end}}</button>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
|
|
|
@ -139,13 +139,13 @@
|
|||
{{ if User.ID > 0}}
|
||||
<a id="reportPopup" href="#" class="form-input">{{ T("report_btn") }}</a>
|
||||
{{ if User.HasAdmin()}}
|
||||
<form method="POST" action="/mod/torrent/delete">
|
||||
<form method="POST" action="/mod/torrent/delete" class="delete-form">
|
||||
<input type="hidden" name="id" value="{{ Torrent.ID }}">
|
||||
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</button>
|
||||
</form>
|
||||
<a href="/mod/torrent?id={{ Torrent.ID }}" class="form-input btn-orange">{{ T("edit") }}</a>
|
||||
{{ else if User.CurrentUserIdentical(Torrent.UploaderID) }}
|
||||
<form method="POST" action="/torrent/delete">
|
||||
<form method="POST" action="/torrent/delete" class="delete-form">
|
||||
<input type="hidden" name="id" value="{{ Torrent.ID }}">
|
||||
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</button>
|
||||
</form>
|
||||
|
|
|
@ -106,11 +106,15 @@ func SetLogin(c *gin.Context, user *models.User) (int, error) {
|
|||
maxAge = getMaxAge(true)
|
||||
}
|
||||
validUntil := timeHelper.FewDurationLater(time.Duration(maxAge) * time.Second)
|
||||
InstantDeletion := timeHelper.FewDurationLater(time.Second)
|
||||
encoded, err := Encode(user.ID, validUntil)
|
||||
encodedDeletion, err := Encode(user.ID, InstantDeletion)
|
||||
if err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
|
||||
//Delete session cookie shared between nyaa & sukebei because it should not exist and used to for some users
|
||||
c.SetCookie(CookieName, encodedDeletion, 0, "/", getDomainName(), false, true)
|
||||
c.SetCookie(CookieName, encoded, maxAge, "/", "", false, true)
|
||||
// also set response header for convenience
|
||||
c.Header("X-Auth-Token", encoded)
|
||||
|
|
Référencer dans un nouveau ticket