mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Merge pull request #917 from mig5/916_messaging_above_send_button
Make progress, noscript warning, and flashes appear above the form, but beneath the logo
This commit is contained in:
commit
d81f62a1b5
@ -112,12 +112,14 @@ class ReceiveModeWeb(object):
|
|||||||
else:
|
else:
|
||||||
flash(msg, 'info')
|
flash(msg, 'info')
|
||||||
else:
|
else:
|
||||||
|
msg = 'Sent '
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
msg = 'Sent {}'.format(filename)
|
msg += '{}, '.format(filename)
|
||||||
if ajax:
|
msg = msg.rstrip(', ')
|
||||||
info_flashes.append(msg)
|
if ajax:
|
||||||
else:
|
info_flashes.append(msg)
|
||||||
flash(msg, 'info')
|
else:
|
||||||
|
flash(msg, 'info')
|
||||||
|
|
||||||
if self.can_upload:
|
if self.can_upload:
|
||||||
if ajax:
|
if ajax:
|
||||||
|
@ -176,7 +176,7 @@ ul.flashes {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
width: 800px;
|
width: 800px;
|
||||||
max-width: 90%;
|
max-width: 500px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ ul.flashes li {
|
|||||||
margin: 0 0 5px 0;
|
margin: 0 0 5px 0;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
text-align: left;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
li.error {
|
li.error {
|
||||||
@ -224,17 +224,15 @@ li.info {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div#noscript {
|
div#noscript {
|
||||||
border: 1px solid #e55454;
|
text-align: center;
|
||||||
text-align: left;
|
color: #d709df;
|
||||||
color: #e55454;
|
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
max-width: 900px;
|
margin: 0 auto;
|
||||||
margin: 100px 2em 0 2em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div#noscript a, div#noscript a:visited {
|
div#noscript a, div#noscript a:visited {
|
||||||
color: #e27f7f;
|
color: #d709df;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disable-noscript-xss-wrapper {
|
.disable-noscript-xss-wrapper {
|
||||||
|
BIN
share/static/img/warning.png
Normal file
BIN
share/static/img/warning.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 804 B |
@ -13,16 +13,24 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="upload-wrapper">
|
<div class="upload-wrapper">
|
||||||
|
<!--
|
||||||
|
We are not using a <noscript> tag because it only works when the security slider is set to
|
||||||
|
Safest, not Safer: https://trac.torproject.org/projects/tor/ticket/29506
|
||||||
|
-->
|
||||||
|
<div id="noscript">
|
||||||
|
<p>
|
||||||
|
<img src="/static/img/warning.png" title="Warning" /><strong>Warning:</strong> Due to a bug in Tor Browser and Firefox, uploads
|
||||||
|
sometimes never finish. To upload reliably, either set your Tor Browser
|
||||||
|
<a rel="noreferrer" target="_blank" href="https://tb-manual.torproject.org/en-US/security-slider/">security slider</a>
|
||||||
|
to Standard or
|
||||||
|
<a target="_blank" href="/noscript-xss-instructions">turn off your Tor Browser's NoScript XSS setting</a>.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
|
<p><img class="logo" src="/static/img/logo_large.png" title="OnionShare"></p>
|
||||||
|
|
||||||
<p class="upload-header">Send Files</p>
|
<p class="upload-header">Send Files</p>
|
||||||
<p class="upload-description">Select the files you want to send, then click "Send Files"...</p>
|
<p class="upload-description">Select the files you want to send, then click "Send Files"...</p>
|
||||||
|
|
||||||
<form id="send" method="post" enctype="multipart/form-data" action="{{ upload_action }}">
|
|
||||||
<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 id="uploads"></div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -37,21 +45,13 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--
|
<form id="send" method="post" enctype="multipart/form-data" action="{{ upload_action }}">
|
||||||
We are not using a <noscript> tag because it only works when the security slider is set to
|
<p><input type="file" id="file-select" name="file[]" multiple /></p>
|
||||||
Safest, not Safer: https://trac.torproject.org/projects/tor/ticket/29506
|
<p><button type="submit" id="send-button" class="button">Send Files</button></p>
|
||||||
-->
|
</form>
|
||||||
<div id="noscript">
|
|
||||||
<p>
|
|
||||||
<strong>Warning:</strong> Due to a bug in Tor Browser and Firefox, uploads
|
|
||||||
sometimes never finish. To upload reliably, either set your Tor Browser
|
|
||||||
<a rel="noreferrer" target="_blank" href="https://tb-manual.torproject.org/en-US/security-slider/">security slider</a>
|
|
||||||
to Standard or
|
|
||||||
<a target="_blank" href="/noscript-xss-instructions">turn off your Tor Browser's NoScript XSS setting</a>.</p>
|
|
||||||
</div>
|
|
||||||
<script src="/static/js/receive-noscript.js"></script>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<script src="/static/js/receive-noscript.js"></script>
|
||||||
<script src="/static/js/jquery-3.3.1.min.js"></script>
|
<script src="/static/js/jquery-3.3.1.min.js"></script>
|
||||||
<script src="/static/js/receive.js"></script>
|
<script src="/static/js/receive.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user