mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 14:07:32 -04:00 
			
		
		
		
	Merge pull request #6230 from turbo124/v5-develop
Improve Hosted Exceptions
This commit is contained in:
		
						commit
						b481c918e1
					
				| @ -81,17 +81,23 @@ class Handler extends ExceptionHandler | ||||
| 
 | ||||
|             app('sentry')->configureScope(function (Scope $scope): void { | ||||
| 
 | ||||
|                 if(auth()->guard('contact') && auth()->guard('contact')->user()) | ||||
|                 $name = 'hosted@invoiceninja.com'; | ||||
| 
 | ||||
|                 if(auth()->guard('contact') && auth()->guard('contact')->user()){ | ||||
|                     $name = "Contact = ".auth()->guard('contact')->user()->email; | ||||
|                     $key = auth()->guard('contact')->user()->company->account->key; | ||||
|                 elseif (auth()->guard('user') && auth()->guard('user')->user())  | ||||
|                 } | ||||
|                 elseif (auth()->guard('user') && auth()->guard('user')->user()){ | ||||
|                     $name = "Admin = ".auth()->guard('user')->user()->email;                     | ||||
|                     $key = auth()->user()->account->key; | ||||
|                 }  | ||||
|                 else | ||||
|                     $key = 'Anonymous'; | ||||
|                  | ||||
|                  $scope->setUser([ | ||||
|                         'id'    => 'Hosted_User', | ||||
|                         'id'    => $key, | ||||
|                         'email' => 'hosted@invoiceninja.com', | ||||
|                         'name'  => $key, | ||||
|                         'name'  => $name, | ||||
|                     ]); | ||||
|             }); | ||||
| 
 | ||||
|  | ||||
| @ -488,6 +488,8 @@ class LoginController extends BaseController | ||||
|             auth()->user()->email_verified_at = now(); | ||||
|             auth()->user()->save(); | ||||
| 
 | ||||
|             auth()->user()->setCompany(auth()->user()->account->default_company); | ||||
| 
 | ||||
|             $this->setLoginCache(auth()->user()); | ||||
| 
 | ||||
|             $cu = CompanyUser::whereUserId(auth()->user()->id); | ||||
|  | ||||
| @ -1324,7 +1324,7 @@ class Import implements ShouldQueue | ||||
|                 $modified['fees_and_limits'] = $this->cleanFeesAndLimits($modified['fees_and_limits']); | ||||
|             } | ||||
| 
 | ||||
|             else if(Ninja::isHosted() && $modified['gateway_key'] == 'd14dd26a37cecc30fdd65700bfb55b23'){ | ||||
|             if(Ninja::isHosted() && $modified['gateway_key'] == 'd14dd26a37cecc30fdd65700bfb55b23'){ | ||||
|                 $modified['gateway_key'] = 'd14dd26a47cecc30fdd65700bfb67b34'; | ||||
|                 $modified['fees_and_limits'] = []; | ||||
|             } | ||||
|  | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -1,4 +1,4 @@ | ||||
| @extends('portal.ninja2020.layout.clean') | ||||
| @extends('themes.ninja2020.clean') | ||||
| @section('meta_title', ctrans('texts.set_password')) | ||||
| 
 | ||||
| @section('body') | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| @extends('portal.ninja2020.layout.clean') | ||||
| @extends('themes.ninja2020.clean') | ||||
| @section('meta_title', ctrans('texts.confirmation')) | ||||
| 
 | ||||
| @section('body') | ||||
|  | ||||
							
								
								
									
										113
									
								
								resources/views/themes/ninja2020/clean.blade.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										113
									
								
								resources/views/themes/ninja2020/clean.blade.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,113 @@ | ||||
| <!DOCTYPE html> | ||||
| <html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | ||||
| 
 | ||||
|     <head> | ||||
|         <!-- Error: {{ session('error') }} --> | ||||
| 
 | ||||
|         @if (config('services.analytics.tracking_id')) | ||||
|             <script async src="https://www.googletagmanager.com/gtag/js?id=UA-122229484-1"></script> | ||||
|             <script> | ||||
|                 window.dataLayer = window.dataLayer || []; | ||||
| 
 | ||||
|                 function gtag() { | ||||
|                     dataLayer.push(arguments); | ||||
|                 } | ||||
| 
 | ||||
|                 gtag('js', new Date()); | ||||
|                 gtag('config', '{{ config('services.analytics.tracking_id') }}', {'anonymize_ip': true}); | ||||
| 
 | ||||
|                 function trackEvent(category, action) { | ||||
|                     ga('send', 'event', category, action, this.src); | ||||
|                 } | ||||
|             </script> | ||||
|             <script> | ||||
|                 Vue.config.devtools = true; | ||||
|             </script> | ||||
|         @else | ||||
|             <script> | ||||
|                 function gtag() { | ||||
|                 } | ||||
|             </script> | ||||
|         @endif | ||||
| 
 | ||||
|         <!-- Title --> | ||||
|         @auth() | ||||
|             <title>@yield('meta_title', '') — {{ auth('contact')->user()->user->account->isPaid() ? auth('contact')->user()->company->present()->name() : 'Invoice Ninja' }}</title> | ||||
|         @endauth | ||||
| 
 | ||||
|         @guest | ||||
|             <title>@yield('meta_title', '') — {{ config('app.name') }}</title> | ||||
|         @endguest | ||||
| 
 | ||||
|         <meta charset="utf-8"> | ||||
|         <meta name="viewport" content="width=device-width, initial-scale=1"> | ||||
|         <meta name="description" content="@yield('meta_description')"/> | ||||
| 
 | ||||
|         <!-- CSRF Token --> | ||||
|         <meta name="csrf-token" content="{{ csrf_token() }}"> | ||||
| 
 | ||||
|         <!-- Scripts --> | ||||
|         <script src="{{ mix('js/app.js') }}" defer></script> | ||||
|         <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.7.x/dist/alpine.min.js" defer></script> | ||||
| 
 | ||||
|         <!-- Fonts --> | ||||
|         <link rel="dns-prefetch" href="https://fonts.gstatic.com"> | ||||
|         <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet" type="text/css"> | ||||
| 
 | ||||
|         <!-- Styles --> | ||||
|         <link href="{{ mix('css/app.css') }}" rel="stylesheet"> | ||||
|         {{-- <link href="{{ mix('favicon.png') }}" rel="shortcut icon" type="image/png"> --}} | ||||
| 
 | ||||
|         <link rel="canonical" href="{{ config('ninja.app_url') }}/{{ request()->path() }}"/> | ||||
| 
 | ||||
|         {{-- Feel free to push anything to header using @push('header') --}} | ||||
|         @stack('head') | ||||
| 
 | ||||
|         @livewireStyles | ||||
| 
 | ||||
|         <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" /> | ||||
|     </head> | ||||
| 
 | ||||
|     <body class="antialiased"> | ||||
|         @if(session()->has('message')) | ||||
|             <div class="py-1 text-sm text-center text-white bg-primary disposable-alert"> | ||||
|                 {{ session('message') }} | ||||
|             </div> | ||||
|         @endif | ||||
| 
 | ||||
|         @yield('body') | ||||
| 
 | ||||
|         @livewireScripts | ||||
| 
 | ||||
|         <script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script> | ||||
|         <script> | ||||
|             window.addEventListener("load", function(){ | ||||
|                 if (! window.cookieconsent) { | ||||
|                     return; | ||||
|                 } | ||||
|                 window.cookieconsent.initialise({ | ||||
|                     "palette": { | ||||
|                         "popup": { | ||||
|                             "background": "#000" | ||||
|                         }, | ||||
|                         "button": { | ||||
|                             "background": "#f1d600" | ||||
|                         }, | ||||
|                     }, | ||||
|                     "content": { | ||||
|                         "href": "https://www.invoiceninja.com/privacy-policy/", | ||||
|                         "message": "This website uses cookies to ensure you get the best experience on our website.", | ||||
|                         "dismiss": "Got it!", | ||||
|                         "link": "Learn more", | ||||
|                     } | ||||
|                 })} | ||||
|             ); | ||||
|         </script> | ||||
|     </body> | ||||
| 
 | ||||
|     <footer> | ||||
|         @yield('footer') | ||||
|         @stack('footer') | ||||
|     </footer> | ||||
| 
 | ||||
| </html> | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user