1
0
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:
Benjamin Beganović 2021-07-02 02:23:51 +02:00 committed by GitHub
commit d763382d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -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 {

View File

@ -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">