Luminotes Desktop now has a "close" link at the top of the page to completely shut down the process.
This commit is contained in:
parent
66525ffd34
commit
c74a18ae1e
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
||||||
1.6.6: ?
|
1.6.6: ?
|
||||||
|
* Luminotes Desktop now has a "close" link at the top of the page to
|
||||||
|
completely shut down the process.
|
||||||
* Luminotes Desktop now attempts to always run on a particular port number,
|
* Luminotes Desktop now attempts to always run on a particular port number,
|
||||||
which means that as long as it's running you can reach it from a constant
|
which means that as long as it's running you can reach it from a constant
|
||||||
URL.
|
URL.
|
||||||
|
|
|
@ -23,6 +23,7 @@ from view.Notebook_rss import Notebook_rss
|
||||||
from view.Json import Json
|
from view.Json import Json
|
||||||
from view.Error_page import Error_page
|
from view.Error_page import Error_page
|
||||||
from view.Not_found_page import Not_found_page
|
from view.Not_found_page import Not_found_page
|
||||||
|
from view.Close_page import Close_page
|
||||||
|
|
||||||
|
|
||||||
class Root( object ):
|
class Root( object ):
|
||||||
|
@ -397,6 +398,16 @@ class Root( object ):
|
||||||
|
|
||||||
return dict()
|
return dict()
|
||||||
|
|
||||||
|
@expose( view = Close_page )
|
||||||
|
def close( self ):
|
||||||
|
# this is typically only allowed in the desktop configuration
|
||||||
|
if self.__settings[ u"global" ].get( u"luminotes.allow_shutdown_command" ) is not True:
|
||||||
|
return dict()
|
||||||
|
|
||||||
|
cherrypy.server.stop()
|
||||||
|
|
||||||
|
return dict()
|
||||||
|
|
||||||
def _cp_on_http_error( self, status, message ):
|
def _cp_on_http_error( self, status, message ):
|
||||||
"""
|
"""
|
||||||
CherryPy HTTP error handler, used to display page not found and generic error pages.
|
CherryPy HTTP error handler, used to display page not found and generic error pages.
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
from Tags import Html, Head, Link, Body, Div, P
|
||||||
|
from config.Version import VERSION
|
||||||
|
|
||||||
|
|
||||||
|
class Close_page( Html ):
|
||||||
|
def __init__( self, script = None ):
|
||||||
|
Html.__init__(
|
||||||
|
self,
|
||||||
|
Head(
|
||||||
|
Link( rel = u"stylesheet", type = u"text/css", href = u"/static/css/style.css?%s" % VERSION ),
|
||||||
|
),
|
||||||
|
Body(
|
||||||
|
Div(
|
||||||
|
P(
|
||||||
|
u"Luminotes Desktop has been shut down."
|
||||||
|
),
|
||||||
|
P(
|
||||||
|
u"To start Luminotes again, simply launch it from your Start Menu."
|
||||||
|
),
|
||||||
|
id = u"center_area",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
|
@ -19,7 +19,8 @@ class Header( Div ):
|
||||||
u"version", VERSION, u" | ",
|
u"version", VERSION, u" | ",
|
||||||
A( u"upgrade", href = u"http://luminotes.com/download?upgrade=True", target = "_new" ), u" | ",
|
A( u"upgrade", href = u"http://luminotes.com/download?upgrade=True", target = "_new" ), u" | ",
|
||||||
A( u"community", href = u"http://luminotes.com/community", target = "_new" ), u" | ",
|
A( u"community", href = u"http://luminotes.com/community", target = "_new" ), u" | ",
|
||||||
A( u"blog", href = u"http://luminotes.com/blog/", target = "_new" ),
|
A( u"blog", href = u"http://luminotes.com/blog/", target = "_new" ), u" | ",
|
||||||
|
A( u"close", href = u"/close" ),
|
||||||
class_ = u"header_links",
|
class_ = u"header_links",
|
||||||
),
|
),
|
||||||
class_ = u"wide_center_area",
|
class_ = u"wide_center_area",
|
||||||
|
|
Reference in New Issue