117 lines
6.6 KiB
Text
117 lines
6.6 KiB
Text
<#import "template.ftl" as layout>
|
|
<@layout.registrationLayout displayMessage=true; section>
|
|
<#if section = "header">
|
|
<#if messageHeader??>
|
|
${messageHeader}
|
|
<#else>
|
|
${message.summary}
|
|
</#if>
|
|
<#elseif section = "form">
|
|
<div id="kc-info-message">
|
|
<p class="instruction">${message.summary}<#if requiredActions??><#list requiredActions>: <b><#items as reqActionItem>${kcSanitize(msg("requiredAction.${reqActionItem}"))?no_esc}<#sep>, </#items></b></#list><#else></#if></p>
|
|
<#if skipLink??>
|
|
<#else>
|
|
<#-- Mobile app deep link redirect -->
|
|
<#if client?? && client.clientId?? && client.clientId == "didi-mobile-app">
|
|
<#assign mobileRedirectUrl = "didi://email-verified">
|
|
<p style="text-align: center; margin-top: 20px;">
|
|
<a href="${mobileRedirectUrl}" style="display: inline-block; background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); color: #ffffff; text-decoration: none; padding: 14px 32px; border-radius: 8px; font-size: 16px; font-weight: 600;">
|
|
Deschide aplicația DIDI
|
|
</a>
|
|
</p>
|
|
<p style="color: #666; font-size: 14px; text-align: center; margin-top: 15px;">
|
|
Vei fi redirecționat automat către aplicație...
|
|
</p>
|
|
<script>
|
|
// Try to redirect to mobile app after 1.5 seconds
|
|
setTimeout(function() {
|
|
window.location.href = "${mobileRedirectUrl}";
|
|
}, 1500);
|
|
|
|
// Fallback: if deep link fails, try alternative scheme
|
|
setTimeout(function() {
|
|
window.location.href = "com.didi365.app://email-verified";
|
|
}, 3000);
|
|
</script>
|
|
<#-- Web app redirect -->
|
|
<#elseif client?? && client.clientId?? && client.clientId == "didi-web-app">
|
|
<#assign webRedirectUrl = "/email-verified">
|
|
<p style="text-align: center; margin-top: 20px;">
|
|
<a href="${webRedirectUrl}" style="display: inline-block; background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); color: #ffffff; text-decoration: none; padding: 14px 32px; border-radius: 8px; font-size: 16px; font-weight: 600;">
|
|
Continuă către aplicație
|
|
</a>
|
|
</p>
|
|
<p style="color: #666; font-size: 14px; text-align: center; margin-top: 15px;">
|
|
Vei fi redirecționat automat...
|
|
</p>
|
|
<script>
|
|
setTimeout(function() {
|
|
window.location.href = "${webRedirectUrl}";
|
|
}, 2000);
|
|
</script>
|
|
<#-- Standard Keycloak redirects -->
|
|
<#elseif pageRedirectUri?has_content>
|
|
<p><a href="${pageRedirectUri}">${kcSanitize(msg("backToApplication"))?no_esc}</a></p>
|
|
<script>
|
|
setTimeout(function() {
|
|
window.location.href = "${pageRedirectUri}";
|
|
}, 2000);
|
|
</script>
|
|
<#elseif actionUri?has_content>
|
|
<p><a href="${actionUri}">${kcSanitize(msg("proceedWithAction"))?no_esc}</a></p>
|
|
<script>
|
|
setTimeout(function() {
|
|
window.location.href = "${actionUri}";
|
|
}, 2000);
|
|
</script>
|
|
<#elseif (client.baseUrl)?has_content>
|
|
<p><a href="${client.baseUrl}">${kcSanitize(msg("backToApplication"))?no_esc}</a></p>
|
|
<script>
|
|
setTimeout(function() {
|
|
window.location.href = "${client.baseUrl}";
|
|
}, 2000);
|
|
</script>
|
|
<#-- Fallback: detect mobile browser and redirect accordingly -->
|
|
<#else>
|
|
<div id="redirect-buttons" style="text-align: center; margin-top: 20px;">
|
|
<p style="color: #666; font-size: 14px; margin-bottom: 15px;">
|
|
Alege cum dorești să continui:
|
|
</p>
|
|
<p>
|
|
<a href="didi://email-verified" id="mobile-link" style="display: inline-block; background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%); color: #ffffff; text-decoration: none; padding: 14px 32px; border-radius: 8px; font-size: 16px; font-weight: 600; margin: 5px;">
|
|
📱 Deschide în aplicație
|
|
</a>
|
|
</p>
|
|
<p>
|
|
<a href="/email-verified" id="web-link" style="display: inline-block; background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%); color: #ffffff; text-decoration: none; padding: 14px 32px; border-radius: 8px; font-size: 16px; font-weight: 600; margin: 5px;">
|
|
🌐 Continuă în browser
|
|
</a>
|
|
</p>
|
|
</div>
|
|
<script>
|
|
(function() {
|
|
var ua = navigator.userAgent || navigator.vendor || window.opera;
|
|
var isMobile = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(ua.toLowerCase());
|
|
|
|
if (isMobile) {
|
|
// On mobile, try deep link first
|
|
setTimeout(function() {
|
|
window.location.href = "didi://email-verified";
|
|
}, 1500);
|
|
// Fallback to alternative scheme
|
|
setTimeout(function() {
|
|
window.location.href = "com.didi365.app://email-verified";
|
|
}, 3000);
|
|
} else {
|
|
// On desktop, redirect to web app
|
|
setTimeout(function() {
|
|
window.location.href = "/email-verified";
|
|
}, 2000);
|
|
}
|
|
})();
|
|
</script>
|
|
</#if>
|
|
</#if>
|
|
</div>
|
|
</#if>
|
|
</@layout.registrationLayout>
|