mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
ui: fix theme load
This commit is contained in:
1 parent
c54c7151ff
commit
9b8833453c
3 files changed
+5
-2
No files matched your search
@@ -90,6 +90,9 @@ async function main() {
|
||||
if (fs.existsSync('public/hydro.js')) {
|
||||
fs.copyFileSync('public/hydro.js', `public/hydro-${pkg.version}.js`);
|
||||
}
|
||||
if (fs.existsSync('public/default.theme.css')) {
|
||||
fs.copyFileSync('public/default.theme.css', `public/default-${pkg.version}.theme.js`);
|
||||
}
|
||||
if (argv.options.production) {
|
||||
fs.removeSync('public/vditor/dist/js/mathjax');
|
||||
fs.removeSync('public/vditor/dist/js/echarts');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.32.1",
|
||||
"version": "4.32.2",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
{% if process.env.DEV %}
|
||||
<link rel="stylesheet" media="all" href="/default.theme.css">
|
||||
{% else %}
|
||||
<link rel="stylesheet" media="all" href="{{ static_url((handler.user|default({})).theme|default('default') + '.theme-' + global.Hydro.version['ui-default'] +'.css') }}">
|
||||
<link rel="stylesheet" media="all" href="{{ static_url((handler.user|default({})).theme|default('default') + '-' + global.Hydro.version['ui-default'] +'.theme.css') }}">
|
||||
{% endif %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) %}
|
||||
<script>
|
||||
|
||||
Reference in new issue
Block a user