dynamic comment length

This commit is contained in:
2026-05-22 20:21:15 +02:00
parent b836ce37f3
commit d44fb1ac05
5 changed files with 18 additions and 5 deletions

View File

@@ -1286,7 +1286,7 @@
</div>
<div class="comment-input-row">
<button id="comment-emoji-trigger" class="emoji-trigger" title="Emoji" type="button"></button>
<textarea id="comment-input" rows="1" placeholder="{{ t('scroller.write_comment') }}" maxlength="2000"></textarea>
<textarea id="comment-input" rows="1" placeholder="{{ t('scroller.write_comment') }}"@if(comment_max_length) maxlength="{{ comment_max_length }}"@endif></textarea>
<button id="comment-send-btn" disabled><i class="fa-solid fa-paper-plane"></i></button>
</div>
</div>

View File

@@ -1,4 +1,4 @@
<form id="upload-form" class="upload-form {{ shitpost_mode ? 'shitpost-mode-active' : '' }}" enctype="multipart/form-data" data-mimes='{!! mimes_json !!}' data-max-bytes="{{ max_file_size_bytes }}" data-min-tags="{{ min_tags }}">
<form id="upload-form" class="upload-form {{ shitpost_mode ? 'shitpost-mode-active' : '' }}" enctype="multipart/form-data" data-mimes='{!! mimes_json !!}' data-max-bytes="{{ max_file_size_bytes }}" data-min-tags="{{ min_tags }}" data-comment-max-length="{{ comment_max_length }}">
<div class="form-section">
@if(web_url_upload)
<div class="upload-mode-tabs">
@@ -109,7 +109,7 @@
<div class="form-section global-comment-section">
<label>{{ t('upload.comment') }} <span style="opacity: 0.5; font-weight: normal;">{{ t('upload.comment_optional') }}</span></label>
<div class="upload-comment-input comment-input">
<textarea class="upload-comment" placeholder="{{ t('upload.comment_placeholder') }}" maxlength="2000"></textarea>
<textarea class="upload-comment" placeholder="{{ t('upload.comment_placeholder') }}"@if(comment_max_length) maxlength="{{ comment_max_length }}"@endif></textarea>
<div class="input-actions"></div>
</div>
</div>