feat: add legalNoticeURL to app config for setting an external url to legal notice

This commit is contained in:
Yassine Doghri 2022-07-07 10:08:04 +00:00
parent 98a8a480a7
commit 711843a0c8
4 changed files with 13 additions and 1 deletions

View File

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

View File

@ -456,4 +456,6 @@ class App extends BaseConfig
* Storage limit in Gigabytes
*/
public ?int $storageLimit = null;
public ?string $legalNoticeURL = null;
}

View File

@ -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>';
}
}

View File

@ -26,4 +26,5 @@ return [
'read_less' => 'Read less',
'see_more' => 'See more',
'see_less' => 'See less',
'legal_notice' => 'Legal notice',
];