mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 02:05:45 +03:00
make default theme actually work
This commit is contained in:
parent
816042d3a8
commit
555847e5e9
2 changed files with 3 additions and 4 deletions
|
@ -27,8 +27,7 @@
|
||||||
if (match) {
|
if (match) {
|
||||||
var title = match[1].charAt(0).toUpperCase() + match[1].slice(1);
|
var title = match[1].charAt(0).toUpperCase() + match[1].slice(1);
|
||||||
%>
|
%>
|
||||||
<link rel="<% if (match[1] !== 'status') { %>alternate<% } %> stylesheet" title="<%= title %>"
|
<link rel="stylesheet" disabled title="<%= title %>" href="<%= file %>">
|
||||||
href="<%= file %>">
|
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<link rel="stylesheet" href="<%= file %>">
|
<link rel="stylesheet" href="<%= file %>">
|
||||||
<% }
|
<% }
|
||||||
|
|
|
@ -294,8 +294,8 @@ async function loadApp() {
|
||||||
const match = href.match(/^bundles\/.*\/theme-(.*)\.css$/);
|
const match = href.match(/^bundles\/.*\/theme-(.*)\.css$/);
|
||||||
if (match) {
|
if (match) {
|
||||||
if (match[1] === (configJson.default_theme || 'light')) {
|
if (match[1] === (configJson.default_theme || 'light')) {
|
||||||
// remove the alternative flag off the stylesheet
|
// remove the disabled flag off the stylesheet
|
||||||
a.setAttribute("rel", "stylesheet");
|
a.removeAttribute("disabled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue