73 lines
3.3 KiB
HTML
73 lines
3.3 KiB
HTML
{% load static %}
|
|
{% load i18n %}
|
|
{% load l10n %}
|
|
{% load humanize %}
|
|
{% load admin_url %}
|
|
{% load mastodon %}
|
|
{% load oauth_token %}
|
|
{% load truncate %}
|
|
{% load highlight %}
|
|
{% load thumb %}
|
|
|
|
<div id="modal" _="on closeModal add .closing then wait for animationend then remove me">
|
|
<div class="modal-underlay" _="on click trigger closeModal"></div>
|
|
<div class="modal-content">
|
|
<div class="add-to-list-modal__head">
|
|
<span class="add-to-list-modal__title">{% trans '评论单集' %} {{ item.title }}: {{ focus_item.title }}</span>
|
|
<span class="add-to-list-modal__close-button modal-close" _="on click trigger closeModal">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</span>
|
|
</div>
|
|
<div class="add-to-list-modal__body">
|
|
<form action="{% url 'journal:comment' item.uuid focus_item.uuid %}" method="post">
|
|
{% csrf_token %}
|
|
|
|
<textarea name="text" cols="40" rows="10" placeholder="超过360字部分实例可能无法显示" id="id_text">{% if comment.text %}{{ comment.text }}{% endif %}</textarea>
|
|
|
|
<div class="mark-modal__share-checkbox float-right">
|
|
<label for="id_share_to_mastodon"><input type="checkbox" name="share_to_mastodon" id="id_share_to_mastodon" value="1" {%if not request.user.preference.default_no_share %}checked{% endif %}>分享到联邦网络</label>
|
|
</div>
|
|
|
|
<div class="mark-modal__option">
|
|
<div class="mark-modal__visibility-radio">
|
|
<span>可见性:
|
|
<ul id="id_visibility">
|
|
<li><label for="id_visibility_0"><input type="radio" name="visibility" value="0" required="" id="id_visibility_0" {% if comment.visibility == 0 or not comment %}checked{% endif %}> 公开</label> </li>
|
|
<li><label for="id_visibility_1"><input type="radio" name="visibility" value="1" required="" id="id_visibility_1" {% if comment.visibility == 1 %}checked{% endif %}> 仅关注者</label> </li>
|
|
<li><label for="id_visibility_2"><input type="radio" name="visibility" value="2" required="" id="id_visibility_2" {% if comment.visibility == 2 %}checked{% endif %}> 仅自己</label> </li>
|
|
</ul>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mark-modal__confirm-button">
|
|
<input type="submit" class="button float-right" value="保存">
|
|
</div>
|
|
|
|
<div class="mark-modal__option">
|
|
<div class="mark-modal__visibility-radio">
|
|
<span>
|
|
<label for="share_position"><input type="checkbox" name="share_position" value="1" id="share_position"> 分享播放位置: </label>
|
|
<input type="input" name="position" id="position" value="00:00:00" class="html-duration-picker" pattern="[0-9]{2}:[0-9]{2}:[0-9]{2}" title="hh:mm:ss" style="display: none;">
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
if (window.player && window.current_item_uuid == "{{ focus_item.uuid }}"){
|
|
$('#share_position').prop('checked', true);
|
|
$("#position").show()
|
|
var t = ~~ window.player.currentTime;
|
|
$('#position').val(('0' + ~~(t/3600)).substr(-2) + ':' + ('0' + ~~(t%3600/60)).substr(-2) + ':' + ("0" + t%60).substr(-2))
|
|
}
|
|
$('#share_position').on('click', ()=>{
|
|
if ($('#share_position').prop('checked')) {
|
|
$("#position").show()
|
|
} else {
|
|
$("#position").hide()
|
|
}
|
|
})
|
|
</script>
|