mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Merge pull request #6177 from beganovich/v5-3006-company-logo-login
Show logo on the login screen if account whitelabel or official subdomain
This commit is contained in:
commit
d763382d87
@ -35,8 +35,9 @@ class ContactLoginController extends Controller
|
||||
|
||||
public function showLoginForm(Request $request)
|
||||
{
|
||||
if ($request->subdomain) {
|
||||
$company = Company::where('subdomain', $request->subdomain)->first();
|
||||
if (strpos($request->getHost(), 'invoicing.co') !== false) {
|
||||
$subdomain = explode('.', $request->getHost())[0];
|
||||
$company = Company::where('subdomain', $subdomain)->first();
|
||||
} elseif (Ninja::isSelfHost()) {
|
||||
$company = Account::first()->default_company;
|
||||
} else {
|
||||
|
@ -15,14 +15,19 @@
|
||||
alt="Background image">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-span-2 h-screen flex">
|
||||
<div class="m-auto md:w-1/2 lg:w-1/4">
|
||||
|
||||
@if($account && !$account->isPaid())
|
||||
<div>
|
||||
<img src="{{ asset('images/invoiceninja-black-logo-2.png') }}"
|
||||
class="border-b border-gray-100 h-18 pb-4" alt="Invoice Ninja logo">
|
||||
</div>
|
||||
@elseif(isset($company) && !is_null($company))
|
||||
<div>
|
||||
<img src="{{ $company->present()->logo() }}"
|
||||
class="border-b border-gray-100 h-18 pb-4" alt="{{ $company->present()->name() }} logo">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-col">
|
||||
|
Loading…
Reference in New Issue
Block a user