Skip to content

Commit f29d620

Browse files
authored
Merge pull request #727 from lcnetdev/copycat-prefs-expansion
Expand customization for CopyCat record comparison
2 parents 67c65f4 + b901041 commit f29d620

2 files changed

Lines changed: 35 additions & 14 deletions

File tree

src/stores/preference.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,11 +1565,29 @@ export const usePreferenceStore = defineStore('preference', {
15651565
'--c-edit-copy-cat-card-marc-hover' : {
15661566
value:'transparent',
15671567
desc: 'The color of the subfield when hovering over the MARC.',
1568-
descShort: 'Marc Hover',
1568+
descShort: 'MARC Hover',
15691569
type: 'color',
15701570
group: 'Copy Cat',
15711571
range: null
15721572
},
1573+
1574+
'--c-edit-copy-cat-comp-existing' : {
1575+
value:'#fafad2',
1576+
desc: 'When comparing, color of the background for the existing record.',
1577+
descShort: 'Existing Color',
1578+
type: 'color',
1579+
group: 'Copy Cat',
1580+
range: null
1581+
},
1582+
'--c-edit-copy-cat-comp-new' : {
1583+
value:'#e3ffd8',
1584+
desc: 'When comparing, color of the background for the new record.',
1585+
descShort: 'New Color',
1586+
type: 'color',
1587+
group: 'Copy Cat',
1588+
range: null
1589+
},
1590+
15731591
'--n-edit-copy-cat-font-size' : {
15741592
desc: 'The fontsize of the text in the Copy Cat search.',
15751593
descShort: 'Font Size',
@@ -1589,13 +1607,13 @@ export const usePreferenceStore = defineStore('preference', {
15891607
group: 'Copy Cat',
15901608
range: [true,false]
15911609
},
1592-
'--n-edit-copyt-cat-prio': {
1593-
desc: 'Default Prority for CopyCat',
1594-
descShort: 'Priority Default',
1595-
value: '3',
1596-
type: 'string',
1597-
group: 'Copy Cat'
1598-
}
1610+
'--n-edit-copyt-cat-prio': {
1611+
desc: 'Default Prority for CopyCat',
1612+
descShort: 'Priority Default',
1613+
value: '3',
1614+
type: 'string',
1615+
group: 'Copy Cat'
1616+
}
15991617

16001618

16011619
}
@@ -2052,6 +2070,9 @@ export const usePreferenceStore = defineStore('preference', {
20522070
styleModalBackgroundColor(){ return `background-color: ${this.returnValue('--c-edit-modals-background-color')};`},
20532071
styleModalTextColor(){ return `color: ${this.returnValue('--c-edit-modals-text-color')};`},
20542072

2073+
styleCopyCatBackgroundColor(){ return `background-color: ${this.returnValue('--c-edit-copy-cat-components')};`},
2074+
styleCopyCatTextColor(){ return `color: ${this.returnValue('--c-edit-copy-cat-font-color')};`},
2075+
20552076

20562077

20572078

src/views/copyCatComponents/RecordComparison.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:lock-scroll="true" class="comparison-modal" content-class="comparison-modal-content">
66

77
<div ref="compModalContainer" class="comp-modal-container">
8-
<div :style="`position: relative; ${this.preferenceStore.styleModalBackgroundColor()}; ${this.preferenceStore.styleModalTextColor()}`"
8+
<div :style="`position: relative; ${this.preferenceStore.styleCopyCatBackgroundColor()}; ${this.preferenceStore.styleCopyCatTextColor()}`"
99
class="comp-container-outer">
1010

1111
<div class="header">
@@ -15,7 +15,7 @@
1515
<splitpanes class="default-theme" vertical>
1616
<pane max-size="50">
1717
<h3>CopyCat Record</h3>
18-
<div class="marc-wrapper record-copycat">
18+
<div class="marc-wrapper record-copycat" :style="{'background-color': this.preferenceStore.returnValue('--c-edit-copy-cat-comp-new')}">
1919
<div class="marc" v-html="recordCopyCat" @mouseover="highlightTags" @mouseout="highlightTags"></div>
2020
<!-- {{ recordCopyCat }} -->
2121
<!-- .native.capture -->
@@ -25,7 +25,7 @@
2525
<span class="heading">
2626
<h3>Existing BFDB Record</h3> <a :href="existingRecordUrl.replace('8080', '8230')" target="_blank">link to BFDB</a>
2727
</span>
28-
<div class="marc-wrapper record-existing">
28+
<div class="marc-wrapper record-existing" :style="{'background-color': this.preferenceStore.returnValue('--c-edit-copy-cat-comp-existing')}">
2929
<!-- <pre v-if="recordExisting.length > 0">
3030
{{ recordExisting }}
3131
</pre> -->
@@ -38,7 +38,7 @@
3838
</splitpanes>
3939

4040
<div v-if="!preview"
41-
:style="`${this.preferenceStore.styleModalBackgroundColor()}; ${this.preferenceStore.styleModalTextColor()}`"
41+
:style="`${this.preferenceStore.styleCopyCatBackgroundColor()}; ${this.preferenceStore.styleCopyCatTextColor()}`"
4242
class="footer">
4343
<h1 v-if="Object.keys(recordExisting).length > 0">There is an existing record. If you continue, the copycat record will overlay the existing record.</h1>
4444
<h1 v-else>There is no existing record. If you continue, you will create a new record.</h1>
@@ -180,13 +180,13 @@ export default {
180180
181181
.record-existing,
182182
.record-copycat {
183-
background-color: #e3ffd8;
183+
/* background-color: #e3ffd8; */
184184
width: inherit;
185185
overflow-wrap: anywhere;
186186
}
187187
188188
.record-existing {
189-
background-color: #fafad2;
189+
/* background-color: #fafad2; */
190190
width: inherit;
191191
overflow-wrap: anywhere;
192192
}

0 commit comments

Comments
 (0)