mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
remaking the GUI
This commit is contained in:
parent
5475038d79
commit
6603f3be39
@ -54,7 +54,7 @@ def launch_window(webapp_port, onionshare_port):
|
||||
|
||||
window = gtk.Window()
|
||||
window.set_title('OnionShare')
|
||||
window.resize(550, 300)
|
||||
window.resize(520, 400)
|
||||
window.set_resizable(False)
|
||||
window.connect('destroy', on_destroy)
|
||||
|
||||
|
BIN
onionshare_gui/static/logo.png
Normal file
BIN
onionshare_gui/static/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -2,15 +2,11 @@ $(function(){
|
||||
var onionshare = {}
|
||||
|
||||
function update($msg) {
|
||||
var $line = $('<p></p>').append($msg);
|
||||
$('#output').append($line);
|
||||
var $line = $('<li>').append($msg);
|
||||
$('#log').append($line);
|
||||
|
||||
// scroll to bottom
|
||||
$('#output').scrollTop($('#output').height());
|
||||
}
|
||||
|
||||
function linebreak() {
|
||||
update($('<hr>'));
|
||||
$('#log').scrollTop($('#log').height());
|
||||
}
|
||||
|
||||
function copy_to_clipboard() {
|
||||
@ -54,18 +50,13 @@ $(function(){
|
||||
onionshare = JSON.parse(data);
|
||||
|
||||
$('#basename').html(onionshare.basename);
|
||||
update(onionshare.strings['sha1_checksum']+": "+onionshare.filehash);
|
||||
linebreak();
|
||||
//update(onionshare.strings['sha1_checksum']+": "+onionshare.filehash);
|
||||
update(onionshare.strings['give_this_url']);
|
||||
update($('<strong>').html(onionshare.url));
|
||||
linebreak();
|
||||
copy_to_clipboard();
|
||||
$('#copy-button').show();
|
||||
|
||||
setTimeout(check_for_requests, 1000);
|
||||
|
||||
$('#loading').hide();
|
||||
$('#content').show();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2,41 +2,56 @@ body {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
font-family: arial;
|
||||
width: 550px;
|
||||
height: 300px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
background-color: #222222;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
width: 520px;
|
||||
height: 400px;
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0 0 .5em 0;
|
||||
}
|
||||
|
||||
#output {
|
||||
#wrapper {
|
||||
width: 520px;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
#metadata {
|
||||
float: left;
|
||||
width: 200px;
|
||||
height: 400px;
|
||||
padding: 10px;
|
||||
}
|
||||
#metadata #basename {
|
||||
font-family: sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin: 10px 0;
|
||||
color: #000000;
|
||||
text-align: center;
|
||||
word-wrap: break-word;
|
||||
height: 260px;
|
||||
}
|
||||
|
||||
ul#log {
|
||||
float: left;
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
background-color: #e0e0e0;
|
||||
overflow: auto;
|
||||
word-wrap: break-word;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
#output .weblog {
|
||||
ul#log li {
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #aaaaaa;
|
||||
}
|
||||
ul#log .weblog {
|
||||
color: #009900;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#output .weblog-error {
|
||||
ul#log .weblog-error {
|
||||
color: #990000;
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -80,11 +95,11 @@ p {
|
||||
background-color:#ce0100;
|
||||
}
|
||||
|
||||
#button-wrapper {
|
||||
text-align: center;
|
||||
}
|
||||
#copy-button {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
bottom: 10px;
|
||||
}
|
||||
|
||||
#loading {
|
||||
@ -95,9 +110,3 @@ p {
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
#content {
|
||||
width: 550px;
|
||||
height: 300px;
|
||||
display: none;
|
||||
}
|
||||
|
@ -1,17 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="static/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading"></div>
|
||||
<div id="content">
|
||||
<h1><span id="basename"></span></h1>
|
||||
<div id="output"></div>
|
||||
<button class="button" id="copy-button">Copy URL</button>-
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="static/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="metadata">
|
||||
<img src="static/logo.png" />
|
||||
<p id="basename"></p>
|
||||
<p id="filesize"></p>
|
||||
<p id="filehash"></p>
|
||||
<div id="button-wrapper">
|
||||
<button class="button" id="copy-button">Copy URL</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="static/jquery-1.11.1.min.js"></script>
|
||||
<script src="static/onionshare.js"></script>
|
||||
</body>
|
||||
<ul id="log"></ul>
|
||||
</div>
|
||||
<script src="static/jquery-1.11.1.min.js"></script>
|
||||
<script src="static/onionshare.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user