Improve UI
This commit is contained in:
parent
0a2fe2a0b1
commit
0b77a88e72
15 changed files with 426 additions and 107 deletions
|
@ -198,6 +198,9 @@ class Onionr:
|
|||
'kex': self.doKEX,
|
||||
'pex': self.doPEX,
|
||||
|
||||
'ui' : self.openUI,
|
||||
'gui' : self.openUI,
|
||||
|
||||
'getpassword': self.printWebPassword
|
||||
}
|
||||
|
||||
|
@ -705,5 +708,12 @@ class Onionr:
|
|||
else:
|
||||
logger.error('%s add-file <filename>' % sys.argv[0], timestamp = False)
|
||||
|
||||
def openUI(self):
|
||||
import webbrowser
|
||||
url = 'http://127.0.0.1:%s/ui/index.html?timingToken=%s' % (config.get('client.port', 59496), self.onionrUtils.getTimeBypassToken())
|
||||
|
||||
print('Opening %s ...' % url)
|
||||
webbrowser.open(url, new = 1, autoraise = True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
Onionr()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue