mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-06-16 11:25:22 +02:00
Implement file uploading from the embeds
This commit is contained in:
@ -214,6 +214,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<p class="flow-text">Toggle File Attachments</p>
|
||||
<p>Allow embed users to attach files to your Discord server in messages</p>
|
||||
<div class="switch">
|
||||
<label>
|
||||
Disable
|
||||
<input type="checkbox" id="file_upload" name="file_upload" {% if guild['file_upload'] %}checked{% endif %} >
|
||||
<span class="lever"></span>
|
||||
Enable
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -79,6 +79,7 @@
|
||||
<div id="messageboxouter" class="input-field inline">
|
||||
<textarea placeholder="Enter message" id="messagebox" type="text" class="materialize-textarea wdt-emoji-open-on-colon" rows="1"></textarea>
|
||||
<span id="visitor_mode_message" style="display:none;"><span id="visitor_mode_message_note">{{ _("Please login to post a message.") }}</span> <a id="visitor_login_btn" class="waves-effect waves-light btn">{{ _("Login") }}</a></span>
|
||||
<a id="upload-file-btn" class="btn-flat"><i class="material-icons">file_upload</i></a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@ -243,6 +244,31 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="filemodal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4 class="center-align">{{ _("Attach File") }}</h4>
|
||||
<h5 id="filename" class="center-align"></h5>
|
||||
<div id="filemodalprogress" class="progress" style="display: none;">
|
||||
<div id="filemodalprogress-inner" class="determinate"></div>
|
||||
</div>
|
||||
<div id="filemodal-body">
|
||||
<div id="filemodal-left" class="valign-wrapper">
|
||||
<img id="filepreview" class="responsive-img" src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png">
|
||||
</div>
|
||||
<div id="filemodal-right">
|
||||
<p>{{ _("Add a comment (optional)") }}</p>
|
||||
<p class="center-align">
|
||||
<textarea placeholder="Enter message" id="messagebox-filemodal" type="text" class="materialize-textarea" rows="1"></textarea>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="right-align">
|
||||
<a id="proceed_fileupload_btn" class="waves-effect waves-light btn">{{ _("Upload") }}</a>
|
||||
</p>
|
||||
<input type="file" id="fileinput">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="usercard" class="modal bottom-sheet">
|
||||
<div class="modal-content">
|
||||
<div class="row">
|
||||
|
Reference in New Issue
Block a user