diff --git a/[esx_addons]/esx_weather/fxmanifest.lua b/[esx_addons]/esx_weather/fxmanifest.lua index 8258739b..8e5979e7 100644 --- a/[esx_addons]/esx_weather/fxmanifest.lua +++ b/[esx_addons]/esx_weather/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version "cerulean" game "gta5" author "Kenshin13" description "Weather sync for your ESX server" -version "1.0.0" +version "1.1.0" legacyversion "1.13.4" lua54 "yes" use_fxv2_oal "yes" @@ -27,7 +27,6 @@ files { "ui/css/*.css", "ui/js/core/state.js", "ui/js/core/constants.js", - "ui/js/utils/sanitizer.js", "ui/js/utils/helpers.js", "ui/js/services/nui-bridge.js", "ui/js/controllers/ui-controller.js", diff --git a/[esx_addons]/esx_weather/ui/css/layout.css b/[esx_addons]/esx_weather/ui/css/layout.css index 13a68dfa..d76bcde3 100644 --- a/[esx_addons]/esx_weather/ui/css/layout.css +++ b/[esx_addons]/esx_weather/ui/css/layout.css @@ -70,6 +70,53 @@ margin: 0; } +.header-controls { + display: flex; + align-items: center; + gap: var(--spacing-sm); +} + +.perf-toggle-btn { + background: transparent; + border: 0.125rem solid var(--mid-color); + color: var(--light-color); + height: 2.5rem; + padding: 0 var(--spacing-sm); + border-radius: var(--radius-md); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + transition: all var(--transition-fast); + font-size: 0.875rem; + font-weight: 500; + white-space: nowrap; +} + +.perf-toggle-btn svg { + flex-shrink: 0; +} + +.perf-toggle-btn:hover { + border-color: var(--brand-color); + color: var(--brand-color); + background: rgba(var(--brand-color-rgb), 0.1); + transform: scale(1.05); +} + +.perf-toggle-btn:active { + transform: scale(0.95); +} + +/* Performance mode active state */ +.perf-toggle-btn.active { + border-color: var(--brand-color); + color: var(--brand-color); + background: rgba(var(--brand-color-rgb), 0.2); + box-shadow: 0 0 0.5rem rgba(var(--brand-color-rgb), 0.3); +} + .close-btn { background: transparent; border: 0.125rem solid var(--mid-color); diff --git a/[esx_addons]/esx_weather/ui/css/performance.css b/[esx_addons]/esx_weather/ui/css/performance.css new file mode 100644 index 00000000..2953241d --- /dev/null +++ b/[esx_addons]/esx_weather/ui/css/performance.css @@ -0,0 +1,68 @@ +/** + * Performance Mode Styles + * Disables heavy animations and effects for improved FPS on weak hardware + */ + +/* Disable all weather icon animations */ +.performance-mode .weather-icon.animate-sun, +.performance-mode .weather-icon.animate-rain, +.performance-mode .weather-icon.animate-cloud, +.performance-mode .weather-icon.animate-lightning, +.performance-mode .current-zone-icon.animate-sun, +.performance-mode .current-zone-icon.animate-rain, +.performance-mode .current-zone-icon.animate-cloud, +.performance-mode .current-zone-icon.animate-lightning { + animation: none !important; +} + +/* Remove backdrop filter blur (known CEF issue, replace with solid color) */ +.performance-mode .backdrop { + backdrop-filter: none !important; +} + +/* Remove drop-shadow filters from icons */ +.performance-mode .current-zone-icon, +.performance-mode .weather-icon { + filter: none !important; +} + +/* Remove text shadows for reduced GPU load */ +.performance-mode .current-zone-name { + text-shadow: none !important; +} + +.performance-mode .zone-card-title { + text-shadow: none !important; +} + +/* Simplify modal entrance animation (fade only, no scale/translate) */ +.performance-mode .modal { + animation: fadeIn var(--transition-normal) ease-out !important; +} + +/* Remove hover transform effects (keep color changes) */ +.performance-mode .zone-card:hover { + transform: none !important; +} + +.performance-mode .perf-toggle-btn:hover, +.performance-mode .close-btn:hover { + transform: none !important; +} + +.performance-mode .perf-toggle-btn:active, +.performance-mode .close-btn:active { + transform: none !important; +} + +/* Simplify zone card hover background gradient */ +.performance-mode .zone-card::before { + display: none !important; +} + +/* Reduce transition duration in performance mode */ +.performance-mode .zone-card, +.performance-mode .perf-toggle-btn, +.performance-mode .close-btn { + transition-duration: var(--transition-fast) !important; +} diff --git a/[esx_addons]/esx_weather/ui/index.html b/[esx_addons]/esx_weather/ui/index.html index 0269bee6..14553016 100644 --- a/[esx_addons]/esx_weather/ui/index.html +++ b/[esx_addons]/esx_weather/ui/index.html @@ -8,6 +8,7 @@ + @@ -20,12 +21,20 @@

Weather Control Panel

- +
+ + +