mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
add fields
This commit is contained in:
@ -56,7 +56,8 @@ class BootstrapController extends Controller
|
|||||||
'login_page_logo',
|
'login_page_logo',
|
||||||
'login_page_heading',
|
'login_page_heading',
|
||||||
'login_page_description',
|
'login_page_description',
|
||||||
'admin_document_title'
|
'admin_page_title',
|
||||||
|
'copyright_text'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|||||||
@ -29,7 +29,8 @@ class ViewServiceProvider extends ServiceProvider
|
|||||||
View::share('login_page_logo', get_login_page_logo());
|
View::share('login_page_logo', get_login_page_logo());
|
||||||
View::share('login_page_heading', get_login_page_heading());
|
View::share('login_page_heading', get_login_page_heading());
|
||||||
View::share('login_page_description', get_login_page_description());
|
View::share('login_page_description', get_login_page_description());
|
||||||
View::share('admin_document_title', get_admin_document_title());
|
View::share('admin_page_title', get_admin_page_title());
|
||||||
|
View::share('copyright_text', get_copyright_text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,18 @@ function get_customer_logo($company_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get current customer page title
|
||||||
|
*
|
||||||
|
* @param $company_id
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function get_customer_page_title($company_id)
|
||||||
|
{
|
||||||
|
if (\Storage::disk('local')->has('database_created')) {
|
||||||
|
return CompanySetting::getSetting('customer_portal_page_title', $company_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current admin portal logo
|
* Get current admin portal logo
|
||||||
@ -94,15 +106,28 @@ function get_login_page_description()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get admin document title
|
* Get admin page title
|
||||||
*
|
*
|
||||||
* @param $company_id
|
* @param $company_id
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_admin_document_title()
|
function get_admin_page_title()
|
||||||
{
|
{
|
||||||
if (\Storage::disk('local')->has('database_created')) {
|
if (\Storage::disk('local')->has('database_created')) {
|
||||||
return Setting::getSetting('admin_document_title');
|
return Setting::getSetting('admin_page_title');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get admin page title
|
||||||
|
*
|
||||||
|
* @param $company_id
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function get_copyright_text()
|
||||||
|
{
|
||||||
|
if (\Storage::disk('local')->has('database_created')) {
|
||||||
|
return Setting::getSetting('copyright_text');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<p class="mb-3">
|
<p class="mb-3">
|
||||||
Copyright @ {{ documentTitle }}, Inc.
|
{{ documentTitle }}, Inc.
|
||||||
{{ new Date().getFullYear() }}
|
{{ new Date().getFullYear() }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -161,11 +161,10 @@ const pageDescription = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const documentTitle = computed(() => {
|
const documentTitle = computed(() => {
|
||||||
if (window.admin_document_title) {
|
if (window.copyright_text) {
|
||||||
return window.admin_document_title
|
return window.copyright_text
|
||||||
}
|
}
|
||||||
|
return 'Copyright @ Crater Invoice'
|
||||||
return 'Crater Invoice'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const loginPageLogo = computed(() => {
|
const loginPageLogo = computed(() => {
|
||||||
|
|||||||
@ -3,7 +3,20 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Crater - Self Hosted Invoicing Platform</title>
|
@if (Route::currentRouteName() === 'admin')
|
||||||
|
@if(isset($admin_page_title) && $admin_page_title != null)
|
||||||
|
<title>{{$admin_page_title}}</title>
|
||||||
|
@else
|
||||||
|
<title>Crater - Self Hosted Invoicing Platform</title>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@if (Route::currentRouteName() === 'customer.login')
|
||||||
|
@if(isset($customer_page_title) && $customer_page_title != null)
|
||||||
|
<title>{{$customer_page_title}}</title>
|
||||||
|
@else
|
||||||
|
<title>Crater - Self Hosted Invoicing Platform</title>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
|
||||||
@ -58,11 +71,12 @@
|
|||||||
window.login_page_description = "{{$login_page_description}}"
|
window.login_page_description = "{{$login_page_description}}"
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
@if(isset($admin_document_title))
|
@if(isset($copyright_text))
|
||||||
|
|
||||||
window.admin_document_title = "{{$admin_document_title}}"
|
window.copyright_text = "{{$copyright_text}}"
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
window.Crater.start()
|
window.Crater.start()
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -136,7 +136,8 @@ Route::get('/admin/{vue?}', function () {
|
|||||||
Route::get('{company:slug}/customer/{vue?}', function (Company $company) {
|
Route::get('{company:slug}/customer/{vue?}', function (Company $company) {
|
||||||
return view('app')->with([
|
return view('app')->with([
|
||||||
'customer_logo' => get_customer_logo($company->id),
|
'customer_logo' => get_customer_logo($company->id),
|
||||||
'current_theme' => get_customer_portal_theme($company->id)
|
'current_theme' => get_customer_portal_theme($company->id),
|
||||||
|
'customer_page_title' => get_customer_page_title($company->id)
|
||||||
]);
|
]);
|
||||||
})->where('vue', '[\/\w\.-]*')->name('customer.login')->middleware(['install']);
|
})->where('vue', '[\/\w\.-]*')->name('customer.login')->middleware(['install']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user