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
2 changed files with 10 additions and 1 deletions

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 {