Working on time tracker

This commit is contained in:
Hillel Coren 2017-09-28 16:19:22 +03:00
parent 954a7a8fd4
commit 638f248782
2 changed files with 13 additions and 11 deletions

View File

@ -3,7 +3,7 @@
return [ return [
// Marketing links // Marketing links
'time_tracker' => env('TIME_TRACKER_URL', 'https://www.invoiceninja.com'), 'time_tracker_web_url' => env('TIME_TRACKER_WEB_URL'),
// Hosted plan coupons // Hosted plan coupons
'coupon_50_off' => env('COUPON_50_OFF', false), 'coupon_50_off' => env('COUPON_50_OFF', false),

View File

@ -507,11 +507,11 @@
toastr.options.positionClass = 'toast-bottom-right'; toastr.options.positionClass = 'toast-bottom-right';
if (navigator.userAgent != 'Time Tracker') { if (navigator.userAgent != 'Time Tracker') {
var link = '{{ config('ninja.time_tracker') }}'; var link = '{{ config('ninja.time_tracker_web_url') }}';
var message = "{{ trans('texts.download_desktop_app') }}"; var message = "{{ trans('texts.download_desktop_app') }}";
if (isMobile) { if (isMobile) {
toastr.warning("{{ trans('texts.time_tracker_mobile_help')}}", false, { toastr.warning("{{ trans('texts.time_tracker_mobile_help')}}", false, {
timeOut: 10000, timeOut: 5000,
closeButton: true, closeButton: true,
}); });
if (isIPhone) { if (isIPhone) {
@ -522,14 +522,16 @@
message = "{{ trans('texts.download_android_app') }}"; message = "{{ trans('texts.download_android_app') }}";
} }
} }
var options = { if (link) {
timeOut: 10000, var options = {
closeButton: true, timeOut: 5000,
onclick: function() { closeButton: true,
window.open(link, '_blank'); onclick: function() {
} window.open(link, '_blank');
}; }
toastr.info(message, false, options); };
toastr.info(message, false, options);
}
} }
if (model.isDesktop()) { if (model.isDesktop()) {