ui: move login and logs state styles to css
This commit is contained in:
+2
-2
@@ -5,13 +5,13 @@
|
||||
|
||||
function showError(message) {
|
||||
var errorElement = document.getElementById('login-error');
|
||||
errorElement.style.display = 'block';
|
||||
errorElement.classList.add('is-visible');
|
||||
errorElement.textContent = message;
|
||||
}
|
||||
|
||||
function hideError() {
|
||||
var errorElement = document.getElementById('login-error');
|
||||
errorElement.style.display = 'none';
|
||||
errorElement.classList.remove('is-visible');
|
||||
}
|
||||
|
||||
function initLoginPage() {
|
||||
|
||||
+2
-5
@@ -323,14 +323,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
function setLiveState() {
|
||||
if (liveDot) {
|
||||
liveDot.style.animationPlayState = state.liveMode ? 'running' : 'paused';
|
||||
liveDot.style.opacity = state.liveMode ? '' : '0.35';
|
||||
liveDot.style.cursor = 'pointer';
|
||||
liveDot.classList.toggle('is-paused', !state.liveMode);
|
||||
}
|
||||
if (liveLabel) {
|
||||
liveLabel.textContent = state.liveMode ? tKey('logs.live') : tKey('logs.paused');
|
||||
liveLabel.style.color = state.liveMode ? '' : 'var(--text-muted)';
|
||||
liveLabel.style.cursor = 'pointer';
|
||||
liveLabel.classList.toggle('is-paused', !state.liveMode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user