2024-03-22 10:34:15 +00:00
< div x - data = " {
popups : {
2024-03-26 12:25:10 +00:00
notification : true ,
realtime : false ,
2024-03-22 10:34:15 +00:00
},
2025-06-26 10:23:08 +00:00
isDevelopment : {{ isDev () ? 'true' : 'false' }},
2024-03-22 10:34:15 +00:00
init () {
2025-06-26 10:23:08 +00:00
this . popups . notification = this . shouldShowMonthlyPopup ( 'popupNotification' );
2024-03-26 12:25:10 +00:00
this . popups . realtime = localStorage . getItem ( 'popupRealtime' );
let checkNumber = 1 ;
let checkPusherInterval = null ;
2024-11-25 11:55:21 +00:00
let checkReconnectInterval = null ;
2024-03-26 12:25:10 +00:00
if ( ! this . popups . realtime ) {
checkPusherInterval = setInterval (() => {
2024-11-25 11:55:21 +00:00
if ( window . Echo ) {
if ( window . Echo . connector . pusher . connection . state === 'connected' ) {
this . popups . realtime = false ;
} else {
checkNumber ++ ;
if ( checkNumber > 5 ) {
this . popups . realtime = true ;
console . error (
2026-02-16 01:54:19 +00:00
'MapleDeploy could not connect to its real-time service. This will cause unusual problems on the UI if not fixed! Please contact support at support@mapledeploy.ca.'
); // MapleDeploy branding
2024-11-25 11:55:21 +00:00
}
2024-03-26 12:25:10 +00:00
}
}
2024-05-10 10:50:39 +00:00
}, 2000 );
2024-03-26 12:25:10 +00:00
}
2025-06-26 10:23:08 +00:00
},
shouldShowMonthlyPopup ( storageKey ) {
const disabledTimestamp = localStorage . getItem ( storageKey );
// If never disabled, show the popup
if ( ! disabledTimestamp || disabledTimestamp === 'false' ) {
return true ;
}
// If disabled timestamp is not a valid number, show the popup
const disabledTime = parseInt ( disabledTimestamp );
if ( isNaN ( disabledTime )) {
return true ;
}
const now = new Date ();
const disabledDate = new Date ( disabledTime );
{{ -- if ( this . isDevelopment ) {
// In development: check if 10 seconds have passed
const timeDifference = now . getTime () - disabledDate . getTime ();
const tenSecondsInMs = 10 * 1000 ;
return timeDifference >= tenSecondsInMs ;
} else { -- }}
// In production: check if we're in a different month or year
const isDifferentMonth = now . getMonth () !== disabledDate . getMonth () ||
now . getFullYear () !== disabledDate . getFullYear ();
return isDifferentMonth ;
{{ -- } -- }}
2024-03-22 10:34:15 +00:00
}
} " >
2024-03-26 12:25:10 +00:00
@ auth
< span x - show = " popups.realtime === true " >
2024-05-10 10:50:39 +00:00
@ if ( ! isCloud ())
< x - popup >
< x - slot : title >
2024-10-02 16:26:51 +00:00
< span class = " font-bold text-left text-red-500 " > WARNING : </ span > Cannot connect to real - time service
2024-05-10 10:50:39 +00:00
</ x - slot : title >
2026-02-16 01:54:19 +00:00
{{ -- MapleDeploy branding : support links updated -- }}
2024-05-10 10:50:39 +00:00
< x - slot : description >
2024-10-02 16:26:51 +00:00
< div > This will cause unusual problems on the
UI ! < br >< br >
2026-02-16 01:54:19 +00:00
Please contact < a class = " underline " href = 'mailto:support@mapledeploy.ca' > MapleDeploy support </ a > for help .
2024-10-02 16:26:51 +00:00
</ div >
2024-05-10 10:50:39 +00:00
</ x - slot : description >
< x - slot : button - text @ click = " disableRealtime() " >
Acknowledge & Disable This Popup
</ x - slot : button - text >
</ x - popup >
@ endif
2024-03-26 12:25:10 +00:00
</ span >
@ endauth
2026-02-16 01:54:19 +00:00
{{ -- MapleDeploy branding : Coolify sponsorship popup removed -- }}
2026-02-26 17:22:03 +00:00
@ if ( request () -> query -> get ( 'cancelled' ))
< x - banner >
< div class = " flex items-center gap-2 " >
< svg class = " w-5 h-5 text-red-500 shrink-0 " fill = " currentColor " viewBox = " 0 0 20 20 " >
< path fill - rule = " evenodd "
d = " M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z "
clip - rule = " evenodd " />
</ svg >
< span >< span class = " font-bold text-red-500 " > Subscription Error .</ span > Something went wrong . Please try
again or < a class = " underline dark:text-white "
href = " { { config('constants.urls.contact') }} " target = " _blank " > contact support </ a >.</ span >
</ div >
</ x - banner >
@ endif
@ if ( request () -> query -> get ( 'success' ))
< x - banner >
< div class = " flex items-center gap-2 " >
< svg class = " w-5 h-5 text-green-500 shrink-0 " fill = " currentColor " viewBox = " 0 0 20 20 " >
< path fill - rule = " evenodd "
d = " M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z "
clip - rule = " evenodd " />
</ svg >
< span >< span class = " font-bold text-green-500 " > Welcome onboard !</ span > Your subscription has been
activated . It could take a few seconds before it ' s fully active .</ span >
</ div >
</ x - banner >
@ endif
2025-03-01 11:43:29 +00:00
@ if ( currentTeam () -> subscriptionPastOverDue ())
< x - banner : closable = false >
2025-06-26 10:23:08 +00:00
< div >< span class = " font-bold text-red-500 " > WARNING :</ span > Your subscription is in over - due . If your
latest
2025-03-01 11:43:29 +00:00
payment is not paid within a week , all automations < span class = " font-bold text-red-500 " > will
2025-12-17 11:09:13 +00:00
be deactivated </ span >. Visit < a href = " { { route('subscription.show') }} " {{ wireNavigate () }}
2025-06-26 10:23:08 +00:00
class = " underline dark:text-white " >/ subscription </ a > to check your subscription status or pay
your
2025-03-01 11:43:29 +00:00
invoice ( or check your email for the invoice ) .
</ div >
</ x - banner >
@ endif
2024-02-25 21:08:44 +00:00
@ if ( currentTeam () -> serverOverflow ())
2024-02-26 09:25:21 +00:00
< x - banner : closable = false >
< div >< span class = " font-bold text-red-500 " > WARNING :</ span > The number of active servers exceeds the limit
covered by your payment . If not resolved , some of your servers < span class = " font-bold text-red-500 " > will
2025-12-17 11:09:13 +00:00
be deactivated </ span >. Visit < a href = " { { route('subscription.show') }} " {{ wireNavigate () }}
2024-03-26 12:25:10 +00:00
class = " underline dark:text-white " >/ subscription </ a > to update your subscription or remove some
servers .
2024-02-26 09:25:21 +00:00
</ div >
</ x - banner >
2024-02-25 21:08:44 +00:00
@ endif
2024-03-07 11:58:04 +00:00
@ if ( ! currentTeam () -> isAnyNotificationEnabled ())
2024-03-22 10:34:15 +00:00
< span x - show = " popups.notification " >
< x - popup >
< x - slot : title >
No notifications enabled .
</ x - slot : title >
< x - slot : icon >
< svg xmlns = " http://www.w3.org/2000/svg " class = " text-red-500 stroke-current w-14 h-14 shrink-0 "
fill = " none " viewBox = " 0 0 24 24 " >
< path stroke - linecap = " round " stroke - linejoin = " round " stroke - width = " 2 "
d = " M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z " />
</ svg >
</ x - slot : icon >
< x - slot : description >
It is
2024-03-20 11:54:06 +00:00
highly recommended to enable at least
2024-03-07 11:58:04 +00:00
one
2024-03-20 11:54:06 +00:00
notification channel to receive important alerts .< br > Visit < a
2025-12-17 11:09:13 +00:00
href = " { { route('notifications.email') }} " {{ wireNavigate () }} class = " underline dark:text-white " >/ notification </ a > to
2024-03-20 11:54:06 +00:00
enable notifications .</ span >
2024-03-22 10:34:15 +00:00
</ x - slot : description >
< x - slot : button - text @ click = " disableNotification() " >
Accept and Close
</ x - slot : button - text >
</ x - popup >
</ span >
2024-03-07 11:58:04 +00:00
@ endif
2024-03-22 10:34:15 +00:00
< script >
2026-02-20 00:37:45 +00:00
// MapleDeploy branding: disableSponsorship() removed (popup removed)
2024-03-26 12:25:10 +00:00
2024-03-22 10:34:15 +00:00
function disableNotification () {
2025-06-26 10:23:08 +00:00
// Store current timestamp instead of just 'false'
localStorage . setItem ( 'popupNotification' , Date . now () . toString ());
2024-03-22 10:34:15 +00:00
}
2024-03-26 12:25:10 +00:00
function disableRealtime () {
localStorage . setItem ( 'popupRealtime' , 'disabled' );
}
2024-03-22 10:34:15 +00:00
</ script >
2023-11-13 13:44:54 +00:00
</ div >