mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #6494 from turbo124/v5-develop
Dynamically load Flutter build
This commit is contained in:
commit
a21e9fba95
@ -740,6 +740,9 @@ class BaseController extends Controller
|
|||||||
|
|
||||||
//pass referral code to front end
|
//pass referral code to front end
|
||||||
$data['rc'] = request()->has('rc') ? request()->input('rc') : '';
|
$data['rc'] = request()->has('rc') ? request()->input('rc') : '';
|
||||||
|
$data['build'] = request()->has('build') ? request()->input('build') : '';
|
||||||
|
|
||||||
|
$data['path'] = $this->setBuild();
|
||||||
|
|
||||||
$this->buildCache();
|
$this->buildCache();
|
||||||
|
|
||||||
@ -749,6 +752,29 @@ class BaseController extends Controller
|
|||||||
return redirect('/setup');
|
return redirect('/setup');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function setBuild()
|
||||||
|
{
|
||||||
|
$build = '';
|
||||||
|
|
||||||
|
if(request()->has('build')) {
|
||||||
|
$build = $request->input('build');
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($build) {
|
||||||
|
case 'wasm':
|
||||||
|
return 'main.dart.wasm.js';
|
||||||
|
case 'foss':
|
||||||
|
return 'main.dart.foss.js';
|
||||||
|
case 'last':
|
||||||
|
return 'main.dart.last.js';
|
||||||
|
case 'next':
|
||||||
|
return 'main.dart.next.js';
|
||||||
|
default:
|
||||||
|
return 'main.dart.js';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function checkFeature($feature)
|
public function checkFeature($feature)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ class PaymentNotification implements ShouldQueue
|
|||||||
private function trackRevenue($event)
|
private function trackRevenue($event)
|
||||||
{
|
{
|
||||||
$payment = $event->payment;
|
$payment = $event->payment;
|
||||||
$invoice = $payment->invoice;
|
$invoice = $payment->invoices()->exists() ? $payment->invoices->first() : false;
|
||||||
$company = $payment->company;
|
$company = $payment->company;
|
||||||
|
|
||||||
$analytics_id = $company->google_analytics_key;
|
$analytics_id = $company->google_analytics_key;
|
||||||
|
@ -56,7 +56,7 @@ class SupportMessageSent extends Mailable
|
|||||||
$plan = $account->plan ?: 'customer support';
|
$plan = $account->plan ?: 'customer support';
|
||||||
$plan = ucfirst($plan);
|
$plan = ucfirst($plan);
|
||||||
|
|
||||||
if(strlen($plan) >1)
|
if(strlen($account->plan) > 1)
|
||||||
$priority = '[PRIORITY] ';
|
$priority = '[PRIORITY] ';
|
||||||
|
|
||||||
$company = auth()->user()->company();
|
$company = auth()->user()->company();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html data-report-errors="{{ $report_errors }}" data-rc="{{ $rc }}">
|
<html data-report-errors="{{ $report_errors }}" data-rc="{{ $rc }}" data-build="{{ $build }}">
|
||||||
<head>
|
<head>
|
||||||
<!-- Source: https://github.com/invoiceninja/invoiceninja -->
|
<!-- Source: https://github.com/invoiceninja/invoiceninja -->
|
||||||
<!-- Version: {{ config('ninja.app_version') }} -->
|
<!-- Version: {{ config('ninja.app_version') }} -->
|
||||||
@ -150,11 +150,8 @@
|
|||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@if(config('ninja.flutter_renderer') == 'hosted')
|
<script defer src="{{ $path }}?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
|
||||||
<script defer src="main.dart.js?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
|
|
||||||
@else
|
|
||||||
<script defer src="main.foss.dart.js?v={{ config('ninja.app_version') }}" type="application/javascript"></script>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<center style="padding-top: 150px" id="loader">
|
<center style="padding-top: 150px" id="loader">
|
||||||
<div class="loader"></div>
|
<div class="loader"></div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user