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
|
@ -7,14 +7,17 @@
|
|||
<link rel="icon" href="/icons/deluge.png" type="image/png" />
|
||||
|
||||
<!-- Stylesheets -->
|
||||
%for stylesheet in stylesheets:
|
||||
% for stylesheet in stylesheets:
|
||||
<link rel="stylesheet" type="text/css" href="${stylesheet}" />
|
||||
%endfor
|
||||
% endfor
|
||||
|
||||
<!-- Javascript -->
|
||||
%for script in scripts:
|
||||
% for script in scripts:
|
||||
<script type="text/javascript" src="${script}"></script>
|
||||
%endfor
|
||||
% endfor
|
||||
<script type="text/javascript">
|
||||
Deluge.debug = ${str(debug).lower()};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<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"))
|
||||
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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue