|
1 | 1 | <script> |
2 | 2 | import { X, Mail, User, Lock, Building2 } from 'lucide-svelte'; |
3 | | - import { portalStore, gradients } from '../stores/portal.svelte.js'; |
| 3 | + import { portalStore } from '../stores/portal.svelte.js'; |
4 | 4 | import { portalAuthStore } from '../stores/portalAuth.svelte.js'; |
5 | 5 | import { authStore } from '../stores'; |
6 | 6 | import { t } from '../stores/i18n.svelte.js'; |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 |
|
83 | | - // Compute background style - image takes priority over gradient (same logic as PortalHero) |
84 | | - const headerBackgroundStyle = $derived(() => { |
85 | | - if (portalStore.backgroundImageUrl) { |
86 | | - return `background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url(${portalStore.backgroundImageUrl}) center/cover no-repeat;`; |
87 | | - } |
88 | | - // Use selected gradient, or fall back to first gradient with a value |
89 | | - const gradientValue = gradients[portalStore.selectedGradient]?.value; |
90 | | - if (gradientValue) { |
91 | | - return `background: ${gradientValue};`; |
92 | | - } |
93 | | - // Fall back to first gradient with a value (index 1 = "Blue to Purple") |
94 | | - return `background: ${gradients[1].value};`; |
95 | | - }); |
96 | 83 | </script> |
97 | 84 |
|
98 | 85 | <svelte:window onkeydown={handleKeydown} /> |
|
115 | 102 | <!-- Email Sent Confirmation - Gradient Header --> |
116 | 103 | <div |
117 | 104 | class="px-8 py-12 text-white text-center relative" |
118 | | - style="{headerBackgroundStyle()}" |
| 105 | + style="{portalStore.headerBackgroundStyle}" |
119 | 106 | > |
120 | 107 | <div class="absolute top-4 right-4"> |
121 | 108 | <button |
|
154 | 141 | <!-- Magic Link Login Form - Gradient Header --> |
155 | 142 | <div |
156 | 143 | class="px-8 py-12 text-white text-center relative" |
157 | | - style="{headerBackgroundStyle()}" |
| 144 | + style="{portalStore.headerBackgroundStyle}" |
158 | 145 | > |
159 | 146 | <div class="absolute top-4 right-4"> |
160 | 147 | <button |
|
240 | 227 | <!-- Internal Login Form - Gradient Header --> |
241 | 228 | <div |
242 | 229 | class="px-8 py-12 text-white text-center relative" |
243 | | - style="{headerBackgroundStyle()}" |
| 230 | + style="{portalStore.headerBackgroundStyle}" |
244 | 231 | > |
245 | 232 | <div class="absolute top-4 right-4"> |
246 | 233 | <button |
|
0 commit comments