mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
Fix toggle theme
This commit is contained in:
@@ -15,7 +15,8 @@
|
|||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: 'Segoe UI', sans-serif;
|
font-family: 'Segoe UI', sans-serif;
|
||||||
background: var(--background-color);
|
background: var(--bg-color);
|
||||||
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@@ -85,6 +86,12 @@ body {
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card-preview video {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
.card-footer {
|
.card-footer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|||||||
@@ -279,11 +279,6 @@ function initTheme() {
|
|||||||
document.body.dataset.theme = savedTheme;
|
document.body.dataset.theme = savedTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检测系统主题
|
|
||||||
window.matchMedia('(prefers-color-scheme: dark)').addListener(e => {
|
|
||||||
document.body.dataset.theme = e.matches ? 'dark' : 'light';
|
|
||||||
});
|
|
||||||
|
|
||||||
// 键盘导航
|
// 键盘导航
|
||||||
document.addEventListener('keydown', (e) => {
|
document.addEventListener('keydown', (e) => {
|
||||||
if (e.key === 'Escape') closeModal();
|
if (e.key === 'Escape') closeModal();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
data-meta="{{ lora.civitai | default({}) | tojson | forceescape }}">
|
data-meta="{{ lora.civitai | default({}) | tojson | forceescape }}">
|
||||||
<div class="card-preview">
|
<div class="card-preview">
|
||||||
{% if lora.preview_url.endswith('.mp4') or lora.preview_url.endswith('.webm') %}
|
{% if lora.preview_url.endswith('.mp4') or lora.preview_url.endswith('.webm') %}
|
||||||
<video controls>
|
<video controls autoplay muted loop>
|
||||||
<source src="{{ '/loras_static/previews/' + lora.preview_url }}" type="video/mp4">
|
<source src="{{ '/loras_static/previews/' + lora.preview_url }}" type="video/mp4">
|
||||||
Your browser does not support the video tag.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</video>
|
||||||
|
|||||||
Reference in New Issue
Block a user