indicate whether the UI is in debug mode via an additional script tag in the index page
This commit is contained in:
parent
3c02a499a5
commit
6fc1e23fce
|
@ -15,6 +15,9 @@
|
||||||
% for script in scripts:
|
% for script in scripts:
|
||||||
<script type="text/javascript" src="${script}"></script>
|
<script type="text/javascript" src="${script}"></script>
|
||||||
% endfor
|
% endfor
|
||||||
|
<script type="text/javascript">
|
||||||
|
Deluge.debug = ${str(debug).lower()};
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div style="background-image: url('/themes/default/tree/loading.gif');"></div>
|
<div style="background-image: url('/themes/default/tree/loading.gif');"></div>
|
||||||
|
|
|
@ -425,7 +425,7 @@ class TopLevel(resource.Resource):
|
||||||
|
|
||||||
template = Template(filename=rpath("index.html"))
|
template = Template(filename=rpath("index.html"))
|
||||||
request.setHeader("content-type", "text/html; charset=utf-8")
|
request.setHeader("content-type", "text/html; charset=utf-8")
|
||||||
return template.render(scripts=scripts, stylesheets=self.stylesheets)
|
return template.render(scripts=scripts, stylesheets=self.stylesheets, debug=debug)
|
||||||
|
|
||||||
class ServerContextFactory:
|
class ServerContextFactory:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue