|
105 | 105 | </div> |
106 | 106 | <% } %> |
107 | 107 |
|
108 | | - <div id="notification-settings-container" class="space-y-8"></div> |
| 108 | + <div class="w-full max-w-2xl mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-3xl"> |
| 109 | + <div class="p-8 md:p-12"> |
| 110 | + <h2 class="text-2xl font-bold text-gray-900 mb-6" data-translate="Settings.Notifications.Headline"></h2> |
| 111 | + <div id="notification-settings-container" class="divide-y divide-gray-200"></div> |
| 112 | + </div> |
| 113 | + </div> |
109 | 114 |
|
110 | 115 | <div class="w-full max-w-2xl mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-3xl"> |
111 | 116 | <div class="p-8 md:p-12"> |
|
146 | 151 |
|
147 | 152 | function renderNotificationSettings(settings) { |
148 | 153 | notificationSettingsContainer.innerHTML = settings.map((notification) => ` |
149 | | - <div class="w-full max-w-2xl mx-auto bg-white rounded-xl shadow-md overflow-hidden md:max-w-3xl"> |
150 | | - <div class="p-8 md:p-12"> |
151 | | - <div class="flex items-center justify-between gap-6"> |
152 | | - <div> |
153 | | - <h2 class="text-2xl font-bold text-gray-900 mb-2">${t(`${notification.translationKeyBase}.Headline`)}</h2> |
154 | | - <p class="text-gray-500">${t(`${notification.translationKeyBase}.Description`)}</p> |
155 | | - </div> |
156 | | - <label class="relative inline-flex flex-shrink-0 cursor-pointer items-center"> |
157 | | - <input |
158 | | - type="checkbox" |
159 | | - class="notification-toggle peer sr-only" |
160 | | - data-notification-key="${notification.key}" |
161 | | - data-notification-channel="${notification.channel}" |
162 | | - data-translation-key-base="${notification.translationKeyBase}" |
163 | | - ${notification.enabled ? "checked" : ""} |
164 | | - > |
165 | | - <div class="h-6 w-11 rounded-full bg-gray-200 after:absolute after:start-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-indigo-600 peer-checked:after:translate-x-full peer-checked:after:border-white"></div> |
166 | | - </label> |
167 | | - </div> |
168 | | - </div> |
| 154 | + <div class="flex items-center justify-between gap-6 py-4 first:pt-0 last:pb-0"> |
| 155 | + <span class="font-medium text-gray-900">${t(`${notification.translationKeyBase}.Headline`)}</span> |
| 156 | + <label class="relative inline-flex flex-shrink-0 cursor-pointer items-center"> |
| 157 | + <input |
| 158 | + type="checkbox" |
| 159 | + class="notification-toggle peer sr-only" |
| 160 | + data-notification-key="${notification.key}" |
| 161 | + data-notification-channel="${notification.channel}" |
| 162 | + data-translation-key-base="${notification.translationKeyBase}" |
| 163 | + ${notification.enabled ? "checked" : ""} |
| 164 | + > |
| 165 | + <div class="h-6 w-11 rounded-full bg-gray-200 after:absolute after:start-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:border after:border-gray-300 after:bg-white after:transition-all after:content-[''] peer-checked:bg-indigo-600 peer-checked:after:translate-x-full peer-checked:after:border-white"></div> |
| 166 | + </label> |
169 | 167 | </div> |
170 | 168 | `).join(""); |
171 | 169 |
|
|
0 commit comments