diff --git a/ProcessMaker/Models/Setting.php b/ProcessMaker/Models/Setting.php index 87395b44d8..a97db998df 100644 --- a/ProcessMaker/Models/Setting.php +++ b/ProcessMaker/Models/Setting.php @@ -311,6 +311,7 @@ public static function getLogin() { // default login $url = asset(config('app.settings.login_logo_path')); + $customized = false; //custom login $setting = self::byKey('css-override'); @@ -320,10 +321,18 @@ public static function getLogin() foreach ($mediaFile as $media) { $url = $media->getFullUrl(); + $customized = true; } } - return $url . '?id=' . bin2hex(random_bytes(16)); + // Use a stable cache-busting key based on the setting's last update time. + // This allows the browser to cache the logo long-term and only re-fetch + // when an admin actually changes it, instead of on every page request. + if ($customized && $setting) { + return $url . '?v=' . $setting->updated_at?->timestamp; + } + + return $url; } /** @@ -359,6 +368,8 @@ public static function getIcon() { // default icon $url = asset(config('app.settings.icon_path')); + $setting = null; + $customized = false; // custom icon if (config()->has($key = 'css-override')) { @@ -369,11 +380,17 @@ public static function getIcon() foreach ($mediaFile as $media) { $url = $media->getFullUrl(); + $customized = true; } } } - return $url . '?id=' . bin2hex(random_bytes(16)); + // Use a stable cache-busting key based on the setting's last update time. + if ($customized && $setting) { + return $url . '?v=' . $setting->updated_at?->timestamp; + } + + return $url; } /** @@ -384,6 +401,8 @@ public static function getFavicon() { // default icon $url = asset(config('app.settings.favicon_path')); + $setting = null; + $customized = false; // custom icon if (config()->has($key = 'css-override')) { @@ -394,11 +413,19 @@ public static function getFavicon() foreach ($mediaFile as $media) { $url = $media->getFullUrl(); + $customized = true; } } } - return $url . '?id=' . bin2hex(random_bytes(16)); + // Use a stable cache-busting key based on the setting's last update time. + // Eliminates the previous random_bytes() that prevented browser caching + // on every request, forcing a full re-download of the favicon each visit. + if ($customized && $setting) { + return $url . '?v=' . $setting->updated_at?->timestamp; + } + + return $url; } /** diff --git a/resources/fonts/pm-font/processmaker-font.scss b/resources/fonts/pm-font/processmaker-font.scss index e6e8bbda03..695ce401a4 100644 --- a/resources/fonts/pm-font/processmaker-font.scss +++ b/resources/fonts/pm-font/processmaker-font.scss @@ -1,4 +1,5 @@ @font-face {font-family: "processmaker-font"; + font-display: swap; src: url('processmaker-font.eot?t=1770239064379'); /* IE9*/ src: url('processmaker-font.eot?t=1770239064379#iefix') format('embedded-opentype'), /* IE6-IE8 */ url("processmaker-font.woff2?t=1770239064379") format("woff2"), diff --git a/resources/views/auth/layouts/auth.blade.php b/resources/views/auth/layouts/auth.blade.php index 6c32bd13a3..1448bb720e 100644 --- a/resources/views/auth/layouts/auth.blade.php +++ b/resources/views/auth/layouts/auth.blade.php @@ -9,7 +9,7 @@ @yield('title') - {{ __('ProcessMaker') }} - + @include('auth.partials.login-base-styles') @include('auth.partials.login-critical-styles') @include('auth.partials.auth-styles') diff --git a/resources/views/auth/newLogin.blade.php b/resources/views/auth/newLogin.blade.php index 00d898893e..a8672e465d 100644 --- a/resources/views/auth/newLogin.blade.php +++ b/resources/views/auth/newLogin.blade.php @@ -9,7 +9,7 @@ {{ __('Login') }} - {{ __('ProcessMaker') }} - + @include('auth.partials.login-base-styles') @include('auth.partials.login-critical-styles') @include('auth.partials.auth-styles') @include('auth.partials.login-extra-styles') @@ -59,13 +59,13 @@
- + @include('auth.partials.password-toggle-button', ['id' => 'togglePassword']) @if ($errors->has('password')) {{ $errors->first('password') }} @@ -174,5 +174,5 @@ function updateCapsLockWarning(event) { }); } -@include('auth.partials.auth-language-scripts') +@include('auth.partials.auth-language-scripts-minimal') diff --git a/resources/views/auth/partials/auth-language-scripts-minimal.blade.php b/resources/views/auth/partials/auth-language-scripts-minimal.blade.php index ffd2e23558..1b53e8f89a 100644 --- a/resources/views/auth/partials/auth-language-scripts-minimal.blade.php +++ b/resources/views/auth/partials/auth-language-scripts-minimal.blade.php @@ -5,6 +5,13 @@ @endforeach - + diff --git a/resources/views/auth/partials/auth-language-scripts.blade.php b/resources/views/auth/partials/auth-language-scripts.blade.php index 691bb566d0..30e1230252 100644 --- a/resources/views/auth/partials/auth-language-scripts.blade.php +++ b/resources/views/auth/partials/auth-language-scripts.blade.php @@ -1,4 +1,4 @@ - - - + + + @include('auth.partials.auth-language-scripts-minimal') diff --git a/resources/views/auth/partials/auth-styles.blade.php b/resources/views/auth/partials/auth-styles.blade.php index c3da7e4abf..35e9cf1fe1 100644 --- a/resources/views/auth/partials/auth-styles.blade.php +++ b/resources/views/auth/partials/auth-styles.blade.php @@ -51,7 +51,7 @@ .auth-card-title { color: #333333; font-size: 1.25rem; - font-weight: 600; + font-weight: 800; margin-bottom: 0.5rem; text-align: center; } @@ -90,7 +90,7 @@ .form-group label { color: #333333; font-size: 0.875rem; - font-weight: 500; + font-weight: 400; margin-bottom: 0.5rem; } @@ -111,7 +111,7 @@ color: #C66E00; display: inline-flex; font-size: 0.75rem; - font-weight: 500; + font-weight: 400; gap: 0.375rem; line-height: 1.25rem; white-space: nowrap; @@ -160,7 +160,7 @@ .auth-link { color: {{ color('primary') }}; font-size: 0.875rem; - font-weight: 500; + font-weight: 400; text-decoration: none; } @@ -177,7 +177,7 @@ .button-login { height: 50px; border-radius: 9px; - font-weight: 600; + font-weight: 800; font-size: 1rem; text-transform: none; } @@ -206,7 +206,7 @@ .slogan .head-text { text-transform: uppercase; - font-weight: 700; + font-weight: 800; color: #A6F252; margin: 0 0 1.5rem 0; font-size: 0.875rem; @@ -240,7 +240,7 @@ .slogan .subtext { color: #ffffff; font-size: 1rem; - font-weight: 300; + font-weight: 400; line-height: 1.75; max-width: 520px; margin-top: 0; @@ -256,7 +256,8 @@ } #togglePassword, - .toggle-password { + .toggle-password, + .password-toggle { position: absolute; top: 50%; right: 1rem; @@ -303,7 +304,7 @@ border-radius: 0 !important; color: #ffffff !important; font-size: 0.75rem !important; - font-weight: 500 !important; + font-weight: 400 !important; height: auto !important; line-height: 1 !important; padding: 0 !important; diff --git a/resources/views/auth/partials/icon-warning.blade.php b/resources/views/auth/partials/icon-warning.blade.php new file mode 100644 index 0000000000..b2987383bc --- /dev/null +++ b/resources/views/auth/partials/icon-warning.blade.php @@ -0,0 +1,3 @@ + diff --git a/resources/views/auth/partials/login-base-styles.blade.php b/resources/views/auth/partials/login-base-styles.blade.php new file mode 100644 index 0000000000..0212bf3d53 --- /dev/null +++ b/resources/views/auth/partials/login-base-styles.blade.php @@ -0,0 +1,51 @@ +{{-- + Auth-page CSS without app.css. + Only 2 font files on the critical path (Regular + ExtraBold for LCP). + Icons are inline SVG — no Font Awesome download (~77 KiB). +--}} + + + diff --git a/resources/views/auth/partials/login-critical-styles.blade.php b/resources/views/auth/partials/login-critical-styles.blade.php index 414cf61815..f03c262794 100644 --- a/resources/views/auth/partials/login-critical-styles.blade.php +++ b/resources/views/auth/partials/login-critical-styles.blade.php @@ -1,11 +1,6 @@ diff --git a/resources/views/auth/partials/login-extra-styles.blade.php b/resources/views/auth/partials/login-extra-styles.blade.php index a4ced842e2..f0db3ca029 100644 --- a/resources/views/auth/partials/login-extra-styles.blade.php +++ b/resources/views/auth/partials/login-extra-styles.blade.php @@ -79,7 +79,7 @@ .forgot-password-link { color: {{ color('primary') }}; font-size: 0.875rem; - font-weight: 500; + font-weight: 400; text-decoration: none; white-space: nowrap; } diff --git a/resources/views/auth/partials/password-toggle-button.blade.php b/resources/views/auth/partials/password-toggle-button.blade.php new file mode 100644 index 0000000000..cc9dd68676 --- /dev/null +++ b/resources/views/auth/partials/password-toggle-button.blade.php @@ -0,0 +1,16 @@ + diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index b8257a549d..ee50d77362 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -50,7 +50,7 @@ class="form-control form-control-login"
@@ -62,7 +62,7 @@ class="form-control form-control-login{{ $errors->has('password') ? ' is-invalid name="password" placeholder="{{ __('Enter your new password') }}" required> - + @include('auth.partials.password-toggle-button', ['id' => 'togglePassword', 'class' => 'toggle-password']) @if ($errors->has('password')) {{ $errors->first('password') }} @@ -80,7 +80,7 @@ class="form-control form-control-login" name="password_confirmation" placeholder="{{ __('Confirm your new password') }}" required> - + @include('auth.partials.password-toggle-button', ['id' => 'togglePasswordConfirm', 'class' => 'toggle-password'])
diff --git a/resources/views/components/logo.blade.php b/resources/views/components/logo.blade.php index 6a1ab4c766..7c34509fbf 100644 --- a/resources/views/components/logo.blade.php +++ b/resources/views/components/logo.blade.php @@ -7,4 +7,4 @@ $class = 'login-logo-custom'; } @endphp -{{ config('logo-alt-text', 'ProcessMaker') }} +{{ config('logo-alt-text', 'ProcessMaker') }}