mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
beginning ServerStatus layout
This commit is contained in:
parent
78f6c31061
commit
d519e62b93
@ -7,5 +7,8 @@ include onionshare/404.html
|
||||
include onionshare/strings.json
|
||||
include onionshare_gui/logo.png
|
||||
include onionshare_gui/drop_files.png
|
||||
include onionshare_gui/server_stopped.png
|
||||
include onionshare_gui/server_started.png
|
||||
include onionshare_gui/server_working.png
|
||||
include setup/onionshare.desktop
|
||||
include setup/onionshare80.xpm
|
||||
|
@ -18,7 +18,6 @@
|
||||
"close_on_finish": "Close automatically",
|
||||
"close_countdown": "Closing in {0} seconds...",
|
||||
"choose_file": "Choose a file to share",
|
||||
"copy_url": "Copy URL",
|
||||
"closing_automatically": "Closing automatically because download finished",
|
||||
"error_tails_invalid_port": "Invalid value, port must be an integer",
|
||||
"error_tails_unknown_root": "Unknown error with Tails root process",
|
||||
@ -32,7 +31,10 @@
|
||||
"gui_add_folder": "Add Folder",
|
||||
"gui_delete": "Delete",
|
||||
"gui_choose_files": "Choose files",
|
||||
"gui_choose_folder": "Choose folder"
|
||||
"gui_choose_folder": "Choose folder",
|
||||
"gui_start_server": "Start Server",
|
||||
"gui_stop_server": "Stop Server",
|
||||
"gui_copy_url": "Copy URL"
|
||||
}, "no": {
|
||||
"calculating_sha1": "Kalkulerer SHA1 sjekksum.",
|
||||
"connecting_ctrlport": "Kobler til Tors kontroll-port for å sette opp en gjemt tjeneste på port {0}.",
|
||||
@ -114,7 +116,7 @@
|
||||
"close_on_finish": "Sluit automatisch",
|
||||
"close_countdown": "Sluit in {0} seconden...",
|
||||
"choose_file": "Kies betsand om te delen",
|
||||
"copy_url": "Kopieer URL",
|
||||
"gui_copy_url": "Kopieer URL",
|
||||
"closing_automatically": "Sluit nu automatisch omdat download gereed is",
|
||||
"error_tails_invalid_port": "Ongeldige waarde, poort moet een integer zijn",
|
||||
"error_tails_unknown_root": "Onbekende fout met het Tails root proces",
|
||||
@ -159,7 +161,7 @@
|
||||
"close_on_finish": "Закрыть автоматически",
|
||||
"close_countdown": "Закроется через {0} секунд...",
|
||||
"choose_file": "Выберите файл",
|
||||
"copy_url": "Скопировать ссылку"
|
||||
"gui_copy_url": "Скопировать ссылку"
|
||||
}, "de": {
|
||||
"calculating_sha1": "Kalkuliere SHA1 Checksumme.",
|
||||
"connecting_ctrlport": "Verbinde zum Tor-Kontrollport um den versteckten Dienst auf Port {0} laufen zu lassen.",
|
||||
@ -198,5 +200,5 @@
|
||||
"close_on_finish": "Kendiliğinden kapan",
|
||||
"close_countdown": "Kapanıyor {0} saniye...",
|
||||
"choose_file": "Paylaşım için bir dosya seç",
|
||||
"copy_url": "URL Kopyala"
|
||||
"gui_copy_url": "URL Kopyala"
|
||||
}}
|
||||
|
@ -12,6 +12,7 @@ except ImportError:
|
||||
from onionshare import strings, helpers, web
|
||||
|
||||
from file_selection import FileSelection
|
||||
from server_status import ServerStatus
|
||||
|
||||
class Application(QtGui.QApplication):
|
||||
def __init__(self):
|
||||
@ -36,9 +37,13 @@ class OnionShareGui(QtGui.QWidget):
|
||||
for filename in self.filenames:
|
||||
file_selection.file_list.add_file(filename)
|
||||
|
||||
# server status
|
||||
server_status = ServerStatus()
|
||||
|
||||
# main layout
|
||||
self.layout = QtGui.QVBoxLayout()
|
||||
self.layout.addLayout(file_selection)
|
||||
self.layout.addLayout(server_status)
|
||||
self.setLayout(self.layout)
|
||||
self.show()
|
||||
|
||||
|
BIN
onionshare_gui/server_started.png
Normal file
BIN
onionshare_gui/server_started.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 346 B |
44
onionshare_gui/server_status.py
Normal file
44
onionshare_gui/server_status.py
Normal file
@ -0,0 +1,44 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
import common
|
||||
from onionshare import strings, helpers
|
||||
|
||||
class ServerStatus(QtGui.QVBoxLayout):
|
||||
def __init__(self):
|
||||
super(ServerStatus, self).__init__()
|
||||
|
||||
# server layout
|
||||
self.status_image = QtGui.QImage('{0}/server_stopped.png'.format(common.onionshare_gui_dir))
|
||||
status_image_label = QtGui.QLabel()
|
||||
status_image_label.setPixmap(QtGui.QPixmap.fromImage(self.status_image))
|
||||
status_image_label.setFixedWidth(30)
|
||||
self.start_server_button = QtGui.QPushButton(strings._('gui_start_server'))
|
||||
self.start_server_button.clicked.connect(self.start_server)
|
||||
self.stop_server_button = QtGui.QPushButton(strings._('gui_stop_server'))
|
||||
self.stop_server_button.clicked.connect(self.stop_server)
|
||||
server_layout = QtGui.QHBoxLayout()
|
||||
server_layout.addWidget(status_image_label)
|
||||
server_layout.addWidget(self.start_server_button)
|
||||
server_layout.addWidget(self.stop_server_button)
|
||||
|
||||
# url layout
|
||||
self.url_label = QtGui.QLabel('http://mry2aqolyzxwfxpt.onion/x6justoparr5ayreqj6zyf6w2e')
|
||||
self.copy_url_button = QtGui.QPushButton(strings._('gui_copy_url'))
|
||||
self.copy_url_button.clicked.connect(self.copy_url)
|
||||
url_layout = QtGui.QHBoxLayout()
|
||||
url_layout.addWidget(self.url_label)
|
||||
url_layout.addWidget(self.copy_url_button)
|
||||
|
||||
# add the widgets
|
||||
self.addLayout(server_layout)
|
||||
self.addLayout(url_layout)
|
||||
|
||||
def start_server(self):
|
||||
pass
|
||||
|
||||
def stop_server(self):
|
||||
pass
|
||||
|
||||
def copy_url(self):
|
||||
pass
|
||||
|
BIN
onionshare_gui/server_stopped.png
Normal file
BIN
onionshare_gui/server_stopped.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 286 B |
BIN
onionshare_gui/server_working.png
Normal file
BIN
onionshare_gui/server_working.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 338 B |
@ -10,6 +10,9 @@ a.datas += [
|
||||
('onionshare/404.html', 'onionshare/404.html', 'DATA'),
|
||||
('onionshare_gui/logo.png', 'onionshare_gui/logo.png', 'DATA'),
|
||||
('onionshare_gui/drop_files.png', 'onionshare_gui/drop_files.png', 'DATA'),
|
||||
('onionshare_gui/server_stopped.png', 'onionshare_gui/server_stopped.png', 'DATA'),
|
||||
('onionshare_gui/server_started.png', 'onionshare_gui/server_started.png', 'DATA'),
|
||||
('onionshare_gui/server_working.png', 'onionshare_gui/server_working.png', 'DATA'),
|
||||
]
|
||||
pyz = PYZ(a.pure)
|
||||
exe = EXE(pyz,
|
||||
|
@ -60,6 +60,9 @@ Section "install"
|
||||
File "${BINPATH}\onionshare_gui\__init__.pyc"
|
||||
File "${BINPATH}\onionshare_gui\logo.png"
|
||||
File "${BINPATH}\onionshare_gui\drop_files.png"
|
||||
File "${BINPATH}\onionshare_gui\server_stopped.png"
|
||||
File "${BINPATH}\onionshare_gui\server_started.png"
|
||||
File "${BINPATH}\onionshare_gui\server_working.png"
|
||||
|
||||
# dependencies
|
||||
SetOutPath $INSTDIR
|
||||
@ -164,6 +167,9 @@ Section "uninstall"
|
||||
Delete "$INSTDIR\onionshare_gui\__init__.pyc"
|
||||
Delete "$INSTDIR\onionshare_gui\logo.png"
|
||||
Delete "$INSTDIR\onionshare_gui\drop_files.png"
|
||||
Delete "$INSTDIR\onionshare_gui\server_stopped.png"
|
||||
Delete "$INSTDIR\onionshare_gui\server_started.png"
|
||||
Delete "$INSTDIR\onionshare_gui\server_working.png"
|
||||
Delete "$INSTDIR\onionshare_gui\onionshare_gui.py"
|
||||
Delete "$INSTDIR\onionshare_gui\onionshare_gui.pyc"
|
||||
Delete "$INSTDIR\qt4_plugins\accessible\qtaccessiblewidgets4.dll"
|
||||
|
Loading…
Reference in New Issue
Block a user