feat: add legalNoticeURL to app config for setting an external url to legal notice
This commit is contained in:
parent
98a8a480a7
commit
711843a0c8
|
@ -75,7 +75,7 @@ tests:
|
|||
MYSQL_PASSWORD: "castopod"
|
||||
|
||||
script:
|
||||
- apt-get install -y mariadb-client libmariadb-dev
|
||||
- apt-get update && apt-get install -y mariadb-client libmariadb-dev
|
||||
|
||||
- echo "SHOW DATABASES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mariadb "$MYSQL_DATABASE"
|
||||
|
||||
|
|
|
@ -456,4 +456,6 @@ class App extends BaseConfig
|
|||
* Storage limit in Gigabytes
|
||||
*/
|
||||
public ?int $storageLimit = null;
|
||||
|
||||
public ?string $legalNoticeURL = null;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,15 @@ if (! function_exists('render_page_links')) {
|
|||
]);
|
||||
}
|
||||
|
||||
// if set in .env, add legal notice link at the end of page links
|
||||
if (config('App')->legalNoticeURL !== null) {
|
||||
$links .= anchor(config('App')->legalNoticeURL, lang('Common.legal_notice'), [
|
||||
'class' => 'px-2 py-1 underline hover:no-underline focus:ring-accent',
|
||||
'target' => '_blank',
|
||||
'rel' => 'noopener noreferrer',
|
||||
]);
|
||||
}
|
||||
|
||||
return '<nav class="' . $class . '">' . $links . '</nav>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,4 +26,5 @@ return [
|
|||
'read_less' => 'Read less',
|
||||
'see_more' => 'See more',
|
||||
'see_less' => 'See less',
|
||||
'legal_notice' => 'Legal notice',
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue