Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nyaa/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ a.text-purple:hover, a.text-purple:active, a.text-purple:focus {

#comment {
height: 8em;
min-height: 8em;
}

.avatar {
Expand Down
3 changes: 3 additions & 0 deletions nyaa/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ document.addEventListener("DOMContentLoaded", function() {
// Info bubble stuff
document.addEventListener("DOMContentLoaded", function() {
var bubble = document.getElementById('infobubble');
if (!bubble) {
return;
}
if (Number(localStorage.getItem('infobubble_dismiss_ts')) < Number(bubble.dataset.ts)) {
bubble.removeAttribute('hidden');
}
Expand Down
6 changes: 3 additions & 3 deletions nyaa/templates/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta property="og:description" content="{{ category_name(torrent.sub_category.id_as_string) }} | {{ torrent.filesize | filesizeformat(True) }} | Uploaded by {{ uploader_name }} on {{ torrent.created_time.strftime('%Y-%m-%d') }}">
{% endblock %}
{% block body %}
{% from "_formhelpers.html" import render_field %}
{% from "_formhelpers.html" import render_field, render_markdown_editor %}
<div class="panel panel-{% if torrent.deleted %}deleted{% elif torrent.remake %}danger{% elif torrent.trusted %}success{% else %}default{% endif %}">
<div class="panel-heading"{% if torrent.hidden %} style="background-color: darkgray;"{% endif %}>
<h3 class="panel-title">
Expand Down Expand Up @@ -177,7 +177,7 @@ <h3 class="panel-title">
<div class="row comment-body">
{# Escape newlines into html entities because CF strips blank newlines #}
<div markdown-text class="comment-content" id="torrent-comment{{ comment.id }}">{{- comment.text | escape | replace('\r\n', '\n') | replace('\n', '&#10;'|safe) -}}</div>
{% if g.user.id == comment.user_id and comment_form %}
{% if g.user.id == comment.user_id and comment_form and not comment.editing_limit_exceeded and (not torrent.comment_locked or g.user.is_moderator) %}
<form class="edit-comment-box" action="{{ url_for('torrents.edit_comment', torrent_id=torrent.id, comment_id=comment.id) }}" method="POST">
{{ comment_form.csrf_token }}
<div class="form-group">
Expand Down Expand Up @@ -225,7 +225,7 @@ <h3 class="panel-title">
{{ comment_form.csrf_token }}
<div class="row">
<div class="col-md-12">
{{ render_field(comment_form.comment, class_='form-control') }}
{{ render_markdown_editor(comment_form.comment) }}
</div>
</div>
{% if config.USE_RECAPTCHA and g.user.age < config['ACCOUNT_RECAPTCHA_AGE'] %}
Expand Down