mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on the time tracker
This commit is contained in:
parent
da348fcc96
commit
21efa69399
@ -341,6 +341,8 @@ if (! defined('APP_NAME')) {
|
|||||||
define('MSBOT_STATE_URL', 'https://state.botframework.com/v3');
|
define('MSBOT_STATE_URL', 'https://state.botframework.com/v3');
|
||||||
define('INVOICEPLANE_IMPORT', 'https://github.com/turbo124/Plane2Ninja');
|
define('INVOICEPLANE_IMPORT', 'https://github.com/turbo124/Plane2Ninja');
|
||||||
|
|
||||||
|
define('TIME_TRACKER_USER_AGENT', 'Time Tracker');
|
||||||
|
|
||||||
define('BOT_PLATFORM_WEB_APP', 'WebApp');
|
define('BOT_PLATFORM_WEB_APP', 'WebApp');
|
||||||
define('BOT_PLATFORM_SKYPE', 'Skype');
|
define('BOT_PLATFORM_SKYPE', 'Skype');
|
||||||
|
|
||||||
|
@ -110,6 +110,19 @@
|
|||||||
} else {
|
} else {
|
||||||
$('#email').focus();
|
$('#email').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (array_get($_SERVER, 'HTTP_USER_AGENT') == TIME_TRACKER_USER_AGENT)
|
||||||
|
if (isStorageSupported()) {
|
||||||
|
$('#email').change(function() {
|
||||||
|
localStorage.setItem('last:time_tracker:email', $('#email').val());
|
||||||
|
})
|
||||||
|
var email = localStorage.getItem('last:time_tracker:email');
|
||||||
|
if (email) {
|
||||||
|
$('#email').val(email);
|
||||||
|
$('#password').focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endif
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -571,7 +571,7 @@
|
|||||||
toastr.options.timeOut = 3000;
|
toastr.options.timeOut = 3000;
|
||||||
toastr.options.positionClass = 'toast-bottom-right';
|
toastr.options.positionClass = 'toast-bottom-right';
|
||||||
|
|
||||||
if (navigator.userAgent != 'Time Tracker') {
|
if (navigator.userAgent != '{{ TIME_TRACKER_USER_AGENT }}') {
|
||||||
var link = '{{ config('ninja.time_tracker_web_url') }}';
|
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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user