mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +03:00
Split out settings view and made functional
- Split settings out to new views using a core shared layout. - Extracted added language text to translation files. - Updated settings routes to be dynamic to category. - Added redirect for old primary settings route. - Updated existing tests to cover settings route changes. - Added tests to cover settings view. - Improved contrast of settings links for dark mode.
This commit is contained in:
@ -8,13 +8,13 @@ class FooterLinksTest extends TestCase
|
||||
{
|
||||
public function test_saving_setting()
|
||||
{
|
||||
$resp = $this->asAdmin()->post('/settings', [
|
||||
$resp = $this->asAdmin()->post('/settings/customization', [
|
||||
'setting-app-footer-links' => [
|
||||
['label' => 'My custom link 1', 'url' => 'https://example.com/1'],
|
||||
['label' => 'My custom link 2', 'url' => 'https://example.com/2'],
|
||||
],
|
||||
]);
|
||||
$resp->assertRedirect('/settings');
|
||||
$resp->assertRedirect('/settings/customization');
|
||||
|
||||
$result = setting('app-footer-links');
|
||||
$this->assertIsArray($result);
|
||||
@ -30,7 +30,7 @@ class FooterLinksTest extends TestCase
|
||||
['label' => 'Another Link', 'url' => 'https://example.com/link-b'],
|
||||
]]);
|
||||
|
||||
$resp = $this->asAdmin()->get('/settings');
|
||||
$resp = $this->asAdmin()->get('/settings/customization');
|
||||
$resp->assertSee('value="My custom link"', false);
|
||||
$resp->assertSee('value="Another Link"', false);
|
||||
$resp->assertSee('value="https://example.com/link-a"', false);
|
||||
|
Reference in New Issue
Block a user