Rev881, Restrict serverShutdown to admin sites, Avoid redirect cache when clicking trayicon
This commit is contained in:
parent
687a848292
commit
c11d4f2632
4 changed files with 5 additions and 5 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -13,4 +13,4 @@ __pycache__/
|
||||||
|
|
||||||
# Data dir
|
# Data dir
|
||||||
data/*
|
data/*
|
||||||
.db
|
*.db
|
|
@ -51,13 +51,13 @@ class ActionsPlugin(object):
|
||||||
("ZeroNet Github", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet")),
|
("ZeroNet Github", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet")),
|
||||||
("Report bug/request feature", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet/issues")),
|
("Report bug/request feature", lambda: self.opensite("https://github.com/HelloZeroNet/ZeroNet/issues")),
|
||||||
"--",
|
"--",
|
||||||
("!Open ZeroNet", lambda: self.opensite("http://%s:%s" % (ui_ip, config.ui_port))),
|
("!Open ZeroNet", lambda: self.opensite("http://%s:%s/%s" % (ui_ip, config.ui_port, config.homepage) )),
|
||||||
"--",
|
"--",
|
||||||
("Quit", self.quit),
|
("Quit", self.quit),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
icon.clicked = lambda: self.opensite("http://%s:%s" % (ui_ip, config.ui_port))
|
icon.clicked = lambda: self.opensite("http://%s:%s/%s" % (ui_ip, config.ui_port, config.homepage) )
|
||||||
gevent.threadpool.start_new_thread(icon._run, ()) # Start in real thread (not gevent compatible)
|
gevent.threadpool.start_new_thread(icon._run, ()) # Start in real thread (not gevent compatible)
|
||||||
super(ActionsPlugin, self).main()
|
super(ActionsPlugin, self).main()
|
||||||
icon._die = True
|
icon._die = True
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.3.6"
|
self.version = "0.3.6"
|
||||||
self.rev = 879
|
self.rev = 881
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.config_file = "zeronet.conf"
|
self.config_file = "zeronet.conf"
|
||||||
|
|
|
@ -154,7 +154,7 @@ class UiWebsocket(object):
|
||||||
|
|
||||||
admin_commands = (
|
admin_commands = (
|
||||||
"sitePause", "siteResume", "siteDelete", "siteList", "siteSetLimit", "siteClone",
|
"sitePause", "siteResume", "siteDelete", "siteList", "siteSetLimit", "siteClone",
|
||||||
"channelJoinAllsite", "serverUpdate", "serverPortcheck", "certSet", "configSet"
|
"channelJoinAllsite", "serverUpdate", "serverPortcheck", "serverShutdown", "certSet", "configSet"
|
||||||
)
|
)
|
||||||
|
|
||||||
if cmd == "response": # It's a response to a command
|
if cmd == "response": # It's a response to a command
|
||||||
|
|
Loading…
Reference in a new issue