make default theme actually work
This commit is contained in:
@@ -27,8 +27,7 @@
|
||||
if (match) {
|
||||
var title = match[1].charAt(0).toUpperCase() + match[1].slice(1);
|
||||
%>
|
||||
<link rel="<% if (match[1] !== 'status') { %>alternate<% } %> stylesheet" title="<%= title %>"
|
||||
href="<%= file %>">
|
||||
<link rel="stylesheet" disabled title="<%= title %>" href="<%= file %>">
|
||||
<% } else { %>
|
||||
<link rel="stylesheet" href="<%= file %>">
|
||||
<% }
|
||||
|
||||
@@ -294,8 +294,8 @@ async function loadApp() {
|
||||
const match = href.match(/^bundles\/.*\/theme-(.*)\.css$/);
|
||||
if (match) {
|
||||
if (match[1] === (configJson.default_theme || 'light')) {
|
||||
// remove the alternative flag off the stylesheet
|
||||
a.setAttribute("rel", "stylesheet");
|
||||
// remove the disabled flag off the stylesheet
|
||||
a.removeAttribute("disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user