Skip to content

Commit 7751022

Browse files
committed
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.
1 parent f42ff59 commit 7751022

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

database/migrations/2023_01_28_141230_copy_color_settings_for_dark_mode.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ public function up()
3131
$newSetting = (array) $setting;
3232
$newSetting['setting_key'] .= '-dark';
3333
$newData[] = $newSetting;
34+
35+
if ($newSetting['setting_key'] === 'app-color-dark') {
36+
$newSetting['setting_key'] = 'link-color';
37+
$newData[] = $newSetting;
38+
$newSetting['setting_key'] = 'link-color-dark';
39+
$newData[] = $newSetting;
40+
}
3441
}
3542

3643
DB::table('settings')->insert($newData);
@@ -45,6 +52,8 @@ public function down()
4552
{
4653
$colorSettings = [
4754
'app-color-dark',
55+
'link-color',
56+
'link-color-dark',
4857
'app-color-light-dark',
4958
'bookshelf-color-dark',
5059
'book-color-dark',

resources/views/exports/parts/styles.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<style>
1111
/* Patches for CSS variable colors within PDF exports */
1212
a {
13-
color: {{ setting('app-color') }};
13+
color: {{ setting('app-link') }};
1414
}
1515
1616
blockquote {

0 commit comments

Comments
 (0)