Skip to content

Commit b96a100

Browse files
committed
Refactor CSS for countdown and dropdown components
- Updated countdown CSS to use data attributes for the refreshing state instead of the non-standard :contains selector, improving compatibility. - Enhanced dropdown styling for resume and pause actions by using data attributes, ensuring consistent UI behavior. - Removed obsolete JavaScript file references in the HTML template, consolidating functionality into main scripts for better organization.
1 parent 463406b commit b96a100

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

frontend/static/css/cycle-countdown.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,10 @@
189189
}
190190

191191
/* Light blue color for Refreshing text */
192-
.timer-value:contains('Refreshing') {
192+
/* Timer value styling for refreshing state - use data attributes instead of :contains */
193+
.timer-value[data-state="refreshing"] {
193194
color: #00c2ce !important; /* Light blue color */
194195
}
195-
196-
/* Fallback approach since :contains is not standard CSS */
197196
.refreshing-state {
198197
color: #00c2ce !important; /* Light blue color */
199198
}

frontend/static/css/dropdown-overrides.css

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,27 @@ div:has(> .scheduleAction-menu) .scheduleAction-option:nth-child(3) {
4141
}
4242

4343
/* Target the existing UI elements that might be showing Resume/Pause */
44-
[data-action="resume"]:not(option):not(.scheduleAction-option)::after,
45-
.schedule-item-action:contains("Resume") {
44+
[data-action="resume"]:not(option):not(.scheduleAction-option)::after {
4645
content: "Enable" !important;
4746
visibility: visible !important;
4847
}
4948

50-
[data-action="pause"]:not(option):not(.scheduleAction-option)::after,
51-
.schedule-item-action:contains("Pause") {
49+
.schedule-item-action[data-action="resume"] {
50+
background-color: #e7f3e7 !important;
51+
border-color: #4CAF50 !important;
52+
}
53+
54+
[data-action="pause"]:not(option):not(.scheduleAction-option)::after {
5255
content: "Disable" !important;
5356
visibility: visible !important;
5457
}
5558

59+
.schedule-item-action[data-action="pause"] {
60+
background-color: #fff3e0 !important;
61+
border-color: #ff9800 !important;
62+
}
63+
5664
/* Activity Control dropdown styling */
57-
.scheduleAction-header:contains("Activity Control") {
65+
.scheduleAction-header[data-type="activity-control"] {
5866
display: flex !important;
5967
}

frontend/templates/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@
7878
<!-- Load user script -->
7979
<script src="./static/js/user.js"></script>
8080
<!-- Emergency reset button implementation -->
81-
<script src="./static/js/direct-reset.js"></script>
8281
<!-- Stats reset handler -->
83-
<script src="./static/js/stats-reset.js"></script>
82+
<!-- JavaScript files removed - functionality moved to main scripts -->
8483
<!-- Hourly API cap handler -->
8584
<script src="./static/js/hourly-cap.js"></script>
8685
<!-- Scheduling handler -->

src/primary/auth.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ def authenticate_request():
328328
api_settings_general_path = "/api/settings/general"
329329
if request.path.startswith((login_path, api_login_path, api_auth_plex_path, recovery_key_path, api_user_2fa_path)) or request.path == api_settings_general_path:
330330
if not is_polling_endpoint:
331+
# Reduced logging frequency for common paths to prevent spam
332+
if hash(request.path) % 20 == 0: # Log ~5% of auth skips
331333
logger.debug(f"Skipping authentication for login/plex/recovery/2fa/settings path '{request.path}'")
332334
return None
333335

0 commit comments

Comments
 (0)