mirror of
https://github.com/onionshare/onionshare.git
synced 2025-08-02 03:16:19 -04:00
Allow sending messages as well as uploading files in receive mode
This commit is contained in:
parent
470fb2bda3
commit
2acdea5229
5 changed files with 218 additions and 108 deletions
|
@ -1,46 +1,64 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>OnionShare</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header class="clearfix">
|
||||
<img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
|
||||
<h1>OnionShare</h1>
|
||||
</header>
|
||||
<head>
|
||||
<title>OnionShare</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="{{ static_url_path }}/img/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<link rel="stylesheet" rel="subresource" type="text/css" href="{{ static_url_path }}/css/style.css" media="all">
|
||||
</head>
|
||||
|
||||
<div class="upload-wrapper">
|
||||
<p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
|
||||
<body>
|
||||
|
||||
<p class="upload-header">Send Files</p>
|
||||
<p class="upload-description">Select the files you want to send, then click "Send Files"...</p>
|
||||
<header class="clearfix">
|
||||
<img class="logo" src="{{ static_url_path }}/img/logo.png" title="OnionShare">
|
||||
<h1>OnionShare</h1>
|
||||
</header>
|
||||
|
||||
<div id="uploads"></div>
|
||||
<div class="upload-wrapper">
|
||||
<p><img class="logo" src="{{ static_url_path }}/img/logo_large.png" title="OnionShare"></p>
|
||||
|
||||
<div>
|
||||
<ul id="flashes" class="flashes">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<li class="{{ category }}">{{ message }}</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if not disable_text and not disable_files %}
|
||||
<p class="upload-header">Submit Files or Messages</p>
|
||||
<p class="upload-description">You can submit files, a message, or both</p>
|
||||
{% endif %}
|
||||
{% if not disable_text and disable_files %}
|
||||
<p class="upload-header">Submit Messages</p>
|
||||
<p class="upload-description">You can submit a message</p>
|
||||
{% endif %}
|
||||
{% if disable_text and not disable_files %}
|
||||
<p class="upload-header">Submit Files</p>
|
||||
<p class="upload-description">You can submit files</p>
|
||||
{% endif %}
|
||||
|
||||
<form id="send" method="post" enctype="multipart/form-data" action="/upload">
|
||||
<p><input type="file" id="file-select" name="file[]" multiple /></p>
|
||||
<p><button type="submit" id="send-button" class="button">Send Files</button></p>
|
||||
</form>
|
||||
<div id="uploads"></div>
|
||||
|
||||
<div>
|
||||
<ul id="flashes" class="flashes">
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
<li class="{{ category }}">{{ message }}</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</ul>
|
||||
</div>
|
||||
<script src="{{ static_url_path }}/js/jquery-3.5.1.min.js"></script>
|
||||
<script async src="{{ static_url_path }}/js/receive.js" id="receive-script"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<form id="send" method="post" enctype="multipart/form-data" action="/upload">
|
||||
{% if not disable_files %}
|
||||
<p><input type="file" id="file-select" name="file[]" multiple /></p>
|
||||
{% endif %}
|
||||
{% if not disable_text %}
|
||||
<p><textarea id="text" name="text" placeholder="Write a message"></textarea></p>
|
||||
{% endif %}
|
||||
<p><button type="submit" id="send-button" class="button">Submit</button></p>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<script src="{{ static_url_path }}/js/jquery-3.5.1.min.js"></script>
|
||||
<script async src="{{ static_url_path }}/js/receive.js" id="receive-script"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue