0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-04 00:09:58 +00:00

Updated migration to carry across more colors, updated export

Updated export to use link color for link.
Export will now copy primary color to link color options for stable
upgrades.
This commit is contained in:
Dan Brown 2023-01-28 17:49:48 +00:00
parent f42ff59b43
commit 7751022c66
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
2 changed files with 10 additions and 1 deletions
database/migrations
resources/views/exports/parts

View file

@ -31,6 +31,13 @@ class CopyColorSettingsForDarkMode extends Migration
$newSetting = (array) $setting;
$newSetting['setting_key'] .= '-dark';
$newData[] = $newSetting;
if ($newSetting['setting_key'] === 'app-color-dark') {
$newSetting['setting_key'] = 'link-color';
$newData[] = $newSetting;
$newSetting['setting_key'] = 'link-color-dark';
$newData[] = $newSetting;
}
}
DB::table('settings')->insert($newData);
@ -45,6 +52,8 @@ class CopyColorSettingsForDarkMode extends Migration
{
$colorSettings = [
'app-color-dark',
'link-color',
'link-color-dark',
'app-color-light-dark',
'bookshelf-color-dark',
'book-color-dark',

View file

@ -10,7 +10,7 @@
<style>
/* Patches for CSS variable colors within PDF exports */
a {
color: {{ setting('app-color') }};
color: {{ setting('app-link') }};
}
blockquote {