mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
parent
0c524c7c8f
commit
a2fd80954b
@ -56,7 +56,7 @@ class MetaController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function licenses()
|
public function licenses()
|
||||||
{
|
{
|
||||||
$this->setPageTitle('Licenses');
|
$this->setPageTitle(trans('settings.licenses'));
|
||||||
|
|
||||||
return view('help.licenses', [
|
return view('help.licenses', [
|
||||||
'license' => file_get_contents(base_path('LICENSE')),
|
'license' => file_get_contents(base_path('LICENSE')),
|
||||||
|
@ -30,6 +30,10 @@ esbuild.build({
|
|||||||
format: 'esm',
|
format: 'esm',
|
||||||
minify: isProd,
|
minify: isProd,
|
||||||
logLevel: 'info',
|
logLevel: 'info',
|
||||||
|
banner: {
|
||||||
|
js: '// See the "/licenses" URI for full package license details',
|
||||||
|
css: '/* See the "/licenses" URI for full package license details */',
|
||||||
|
},
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
fs.writeFileSync('esbuild-meta.json', JSON.stringify(result.metafile));
|
fs.writeFileSync('esbuild-meta.json', JSON.stringify(result.metafile));
|
||||||
}).catch(() => process.exit(1));
|
}).catch(() => process.exit(1));
|
||||||
|
@ -276,6 +276,14 @@ return [
|
|||||||
'webhooks_last_errored' => 'Last Errored:',
|
'webhooks_last_errored' => 'Last Errored:',
|
||||||
'webhooks_last_error_message' => 'Last Error Message:',
|
'webhooks_last_error_message' => 'Last Error Message:',
|
||||||
|
|
||||||
|
// Licensing
|
||||||
|
'licenses' => 'Licenses',
|
||||||
|
'licenses_desc' => 'This page details license information for BookStack in addition to the projects & libraries that are used within BookStack. Many projects listed may only be used in a development context.',
|
||||||
|
'licenses_bookstack' => 'BookStack License',
|
||||||
|
'licenses_php' => 'PHP Library Licenses',
|
||||||
|
'licenses_js' => 'JavaScript Library Licenses',
|
||||||
|
'licenses_other' => 'Other Licenses',
|
||||||
|
'license_details' => 'License Details',
|
||||||
|
|
||||||
//! If editing translations files directly please ignore this in all
|
//! If editing translations files directly please ignore this in all
|
||||||
//! languages apart from en. Content will be auto-copied from en.
|
//! languages apart from en. Content will be auto-copied from en.
|
||||||
|
@ -158,3 +158,5 @@ Note: This is not an exhaustive list of all libraries and projects that would be
|
|||||||
* [PHPStan](https://phpstan.org/) & [Larastan](https://github.com/nunomaduro/larastan) - _[MIT](https://github.com/phpstan/phpstan/blob/master/LICENSE) and [MIT](https://github.com/nunomaduro/larastan/blob/master/LICENSE.md)_
|
* [PHPStan](https://phpstan.org/) & [Larastan](https://github.com/nunomaduro/larastan) - _[MIT](https://github.com/phpstan/phpstan/blob/master/LICENSE) and [MIT](https://github.com/nunomaduro/larastan/blob/master/LICENSE.md)_
|
||||||
* [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) - _[BSD 3-Clause](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt)_
|
* [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) - _[BSD 3-Clause](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt)_
|
||||||
* [JakeArchibald/IDB-Keyval](https://github.com/jakearchibald/idb-keyval) - _[Apache-2.0](https://github.com/jakearchibald/idb-keyval/blob/main/LICENCE)_
|
* [JakeArchibald/IDB-Keyval](https://github.com/jakearchibald/idb-keyval) - _[Apache-2.0](https://github.com/jakearchibald/idb-keyval/blob/main/LICENCE)_
|
||||||
|
|
||||||
|
For a detailed breakdown of the JavaScript & PHP projects imported & used via NPM & composer package managers, along with their licenses, please see the [dev/licensing/js-library-licenses.txt](dev/licensing/js-library-licenses.txt) and [dev/licensing/php-library-licenses.txt](dev/licensing/php-library-licenses.txt) files.
|
@ -7,39 +7,36 @@
|
|||||||
<div class="my-l"> </div>
|
<div class="my-l"> </div>
|
||||||
|
|
||||||
<div class="card content-wrap auto-height">
|
<div class="card content-wrap auto-height">
|
||||||
<h1 class="list-heading">Licenses</h1>
|
|
||||||
|
|
||||||
<p>
|
<h1 class="list-heading">{{ trans('settings.licenses') }}</h1>
|
||||||
This page details license information for BookStack in addition to the projects & libraries that are used within BookStack.
|
<p>{{ trans('settings.licenses_desc') }}</p>
|
||||||
Many projects listed may only be used in a development context.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#bookstack-license">BookStack License</a></li>
|
<li><a href="#bookstack-license">{{ trans('settings.licenses_bookstack') }}</a></li>
|
||||||
<li><a href="#php-lib-licenses">PHP Library Licenses</a></li>
|
<li><a href="#php-lib-licenses">{{ trans('settings.licenses_php') }}</a></li>
|
||||||
<li><a href="#js-lib-licenses">JavaScript Library Licenses</a></li>
|
<li><a href="#js-lib-licenses">{{ trans('settings.licenses_js') }}</a></li>
|
||||||
<li><a href="#js-lib-licenses">Other Licenses</a></li>
|
<li><a href="#other-licenses">{{ trans('settings.licenses_other') }}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="bookstack-license" class="card content-wrap auto-height">
|
<div id="bookstack-license" class="card content-wrap auto-height">
|
||||||
<h3 class="list-heading">BookStack License</h3>
|
<h3 class="list-heading">{{ trans('settings.licenses_bookstack') }}</h3>
|
||||||
<div style="white-space: pre-wrap;" class="mb-m">{{ $license }}</div>
|
<div style="white-space: pre-wrap;" class="mb-m">{{ $license }}</div>
|
||||||
<p>BookStack® is a UK registered trade mark of Daniel Brown. </p>
|
<p>BookStack® is a UK registered trade mark of Daniel Brown. </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="php-lib-licenses" class="card content-wrap auto-height">
|
<div id="php-lib-licenses" class="card content-wrap auto-height">
|
||||||
<h3 class="list-heading">PHP Library Licenses</h3>
|
<h3 class="list-heading">{{ trans('settings.licenses_php') }}</h3>
|
||||||
<div style="white-space: pre-wrap;">{{ $phpLibData }}</div>
|
<div style="white-space: pre-wrap;">{{ $phpLibData }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="js-lib-licenses" class="card content-wrap auto-height">
|
<div id="js-lib-licenses" class="card content-wrap auto-height">
|
||||||
<h3 class="list-heading">JavaScript Library Licenses</h3>
|
<h3 class="list-heading">{{ trans('settings.licenses_js') }}</h3>
|
||||||
<div style="white-space: pre-wrap;">{{ $jsLibData }}</div>
|
<div style="white-space: pre-wrap;">{{ $jsLibData }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="other-licenses" class="card content-wrap auto-height">
|
<div id="other-licenses" class="card content-wrap auto-height">
|
||||||
<h3 class="list-heading">Other Licenses</h3>
|
<h3 class="list-heading">{{ trans('settings.licenses_other') }}</h3>
|
||||||
<div style="white-space: pre-line;">BookStack makes heavy use of PHP:
|
<div style="white-space: pre-line;">BookStack makes heavy use of PHP:
|
||||||
License: PHP License, version 3.01
|
License: PHP License, version 3.01
|
||||||
License File: https://www.php.net/license/3_01.txt
|
License File: https://www.php.net/license/3_01.txt
|
||||||
|
@ -18,8 +18,10 @@
|
|||||||
<h5 class="mt-xl">{{ trans('settings.system_version') }}</h5>
|
<h5 class="mt-xl">{{ trans('settings.system_version') }}</h5>
|
||||||
<div class="py-xs">
|
<div class="py-xs">
|
||||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/BookStackApp/BookStack/releases">
|
<a target="_blank" rel="noopener noreferrer" href="https://github.com/BookStackApp/BookStack/releases">
|
||||||
BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
|
BookStack @if(!str_starts_with($version, 'v')) version @endif {{ $version }}
|
||||||
</a>
|
</a>
|
||||||
|
<br>
|
||||||
|
<a target="_blank" href="{{ url('/licenses') }}" class="text-muted">{{ trans('settings.license_details') }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
24
tests/LicensesTest.php
Normal file
24
tests/LicensesTest.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests;
|
||||||
|
|
||||||
|
class LicensesTest extends TestCase
|
||||||
|
{
|
||||||
|
public function test_licenses_endpoint()
|
||||||
|
{
|
||||||
|
$resp = $this->get('/licenses');
|
||||||
|
$resp->assertOk();
|
||||||
|
$resp->assertSee('Licenses');
|
||||||
|
$resp->assertSee('PHP Library Licenses');
|
||||||
|
$resp->assertSee('Dan Brown and the BookStack Project contributors');
|
||||||
|
$resp->assertSee('doctrine/dbal');
|
||||||
|
$resp->assertSee('@codemirror/lang-html');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_licenses_linked_to_from_settings()
|
||||||
|
{
|
||||||
|
$resp = $this->asAdmin()->get('/settings/features');
|
||||||
|
$html = $this->withHtml($resp);
|
||||||
|
$html->assertLinkExists(url('/licenses'), 'License Details');
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user