diff --git a/config/ninja.php b/config/ninja.php index 3b428f9f3724..e5ad97412c16 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -2,6 +2,9 @@ return [ + // Marketing links + 'time_tracker' => env('TIME_TRACKER_URL', 'https://www.invoiceninja.com'), + // Hosted plan coupons 'coupon_50_off' => env('COUPON_50_OFF', false), 'coupon_75_off' => env('COUPON_75_OFF', false), diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 880a687ae31f..07e4f949917d 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2460,6 +2460,8 @@ $LANG = array( 'started_task' => 'Successfully started task', 'create_client' => 'Create Client', + 'download_app' => 'Download the desktop app', + ); return $LANG; diff --git a/resources/views/tasks/time_tracker.blade.php b/resources/views/tasks/time_tracker.blade.php index 57e59c87ed92..e51479052a4a 100644 --- a/resources/views/tasks/time_tracker.blade.php +++ b/resources/views/tasks/time_tracker.blade.php @@ -428,6 +428,17 @@ toastr.options.timeOut = 3000; toastr.options.positionClass = 'toast-bottom-right'; + if (navigator.userAgent != 'Time Tracker') { + var options = { + timeOut: 10000, + closeButton: true, + onclick: function() { + window.open('{{ config('ninja.time_tracker') }}', '_blank'); + } + }; + toastr.info("{{ trans('texts.download_app') }}", false, options); + } + $(window).on('beforeunload', function () { if (navigator.userAgent == 'Time Tracker') { return undefined; @@ -440,12 +451,6 @@ } }); - /* - $( window ).scroll(function() { - $('.footer'). - }); - */ - });