diff --git a/src/components/fields/Field_ColorPicker.vue b/src/components/fields/Field_ColorPicker.vue
index fef9c9d..2d1043f 100644
--- a/src/components/fields/Field_ColorPicker.vue
+++ b/src/components/fields/Field_ColorPicker.vue
@@ -70,17 +70,17 @@ import { I_ExtraFields } from "src/interfaces/I_Blueprint"
})
export default class Field_ColorPicker extends BaseClass {
@Prop({ default: [] }) readonly inputDataBluePrint!: I_ExtraFields
- @Prop({ default: null }) readonly inputDataValue!: null|number
+ @Prop({ default: null }) readonly inputDataValue!: string
@Prop() readonly editMode!: boolean
@Prop() readonly isNew!: boolean
changedInput = false
- localInput: null|number = null
+ localInput = ""
@Emit()
signalInput () {
this.changedInput = true
- return this.localInput
+ return this.localInput.trim()
}
get inputIcon () {
diff --git a/src/components/fields/Field_List.vue b/src/components/fields/Field_List.vue
index 5eb38c5..994a4ad 100644
--- a/src/components/fields/Field_List.vue
+++ b/src/components/fields/Field_List.vue
@@ -99,6 +99,7 @@
import { Component, Emit, Prop, Watch } from "vue-property-decorator"
import BaseClass from "src/BaseClass"
+import { extend } from "quasar"
import { I_ExtraFields } from "src/interfaces/I_Blueprint"
@@ -160,7 +161,21 @@ export default class Field_List extends BaseClass {
@Emit()
signalInput () {
this.changedInput = true
- return this.localInput
+
+ const dataCopy: {
+ value: string
+ affix?: string
+ }[] = extend(true, [], this.localInput)
+
+ const returnValue = dataCopy.map(e => {
+ e.value = e.value.trim()
+ if (e.affix) {
+ e.affix = e.affix.trim()
+ }
+ return e
+ })
+
+ return returnValue
}
addNewInput () {
diff --git a/src/components/fields/Field_Tags.vue b/src/components/fields/Field_Tags.vue
index e653a68..f74d526 100644
--- a/src/components/fields/Field_Tags.vue
+++ b/src/components/fields/Field_Tags.vue
@@ -15,7 +15,7 @@
>
+ color="gunmetal-light" text-color="satin-sheen-gold-light" class="text-weight-medium">
{{input}}
@@ -29,7 +29,7 @@
menu-anchor="bottom middle"
menu-self="top middle"
class="tagSelect"
- :options="allTags"
+ :options="filteredTags"
use-input
outlined
use-chips
@@ -38,8 +38,11 @@
new-value-mode="add"
multiple
v-model="localInput"
+ @new-value="addNewValue"
@input="signalInput"
@keydown="signalInput"
+ error-message="This tag is already present in the selection."
+ :error="tagAlreadyExists"
>
console.log(e))
}
@Watch("inputDataBluePrint", { deep: true, immediate: true })
@@ -110,6 +114,8 @@ export default class Field_Tags extends BaseClass {
allTags: string[] = []
+ filteredTags: string[] = []
+
async defocusSelectRef () {
await this.$nextTick()
/*eslint-disable */
@@ -118,11 +124,33 @@ export default class Field_Tags extends BaseClass {
/* eslint-enable */
}
+ tagAlreadyExists = false
+
+ addNewValue (val: string) {
+ const formattedNewTag = val.toLowerCase().trim()
+
+ const tagAlreadyExistsInList = (this.allTags.find(tag => tag.toLowerCase() === formattedNewTag))
+
+ const tagAlreadyExistsAttached = (this.localInput.find(tag => tag.toLowerCase() === formattedNewTag))
+
+ if (!tagAlreadyExistsInList) {
+ this.allTags.push(val)
+ }
+
+ if (!tagAlreadyExistsAttached) {
+ this.localInput.push(val)
+ }
+
+ if (tagAlreadyExistsInList && tagAlreadyExistsAttached) {
+ this.tagAlreadyExists = true
+ }
+ }
+
filterFn (val: string, update: (fn: any) => void) {
if (val === "") {
update(() => {
- if (this.inputDataBluePrint?.predefinedSelectValues) {
- this.allTags = this.inputDataBluePrint.predefinedSelectValues
+ if (this.allTags) {
+ this.filteredTags = this.allTags
}
this.defocusSelectRef().catch(e => console.log(e))
})
@@ -130,9 +158,9 @@ export default class Field_Tags extends BaseClass {
}
update(() => {
- if (this.inputDataBluePrint?.predefinedSelectValues) {
+ if (this.allTags) {
const needle = val.toLowerCase()
- this.allTags = this.inputDataBluePrint.predefinedSelectValues.filter(v => v.toLowerCase().indexOf(needle) > -1)
+ this.filteredTags = this.allTags.filter(v => v.toLowerCase().indexOf(needle) > -1)
}
this.defocusSelectRef().catch(e => console.log(e))
})
@@ -144,6 +172,7 @@ export default class Field_Tags extends BaseClass {
@Emit()
signalInput () {
+ this.tagAlreadyExists = false
this.changedInput = true
return this.localInput
}
diff --git a/src/components/fields/Field_Text.vue b/src/components/fields/Field_Text.vue
index 2800ac5..61c33d3 100644
--- a/src/components/fields/Field_Text.vue
+++ b/src/components/fields/Field_Text.vue
@@ -71,7 +71,7 @@ export default class Field_Text extends BaseClass {
@Emit()
signalInput () {
this.changedInput = true
- return this.localInput
+ return this.localInput.trim()
}
get toolTip () {
diff --git a/src/components/fields/Field_Wysiwyg.vue b/src/components/fields/Field_Wysiwyg.vue
index b9d6b69..f1f4747 100644
--- a/src/components/fields/Field_Wysiwyg.vue
+++ b/src/components/fields/Field_Wysiwyg.vue
@@ -56,7 +56,7 @@ export default class Field_Wysiwyg extends BaseClass {
@Emit()
signalInput () {
this.changedInput = true
- return this.localInput
+ return this.localInput.trim()
}
get toolTip () {
diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss
index 8dbb441..c844c89 100644
--- a/src/css/quasar.variables.scss
+++ b/src/css/quasar.variables.scss
@@ -31,6 +31,7 @@ $customColors: (
'ruby-red': #f72e43,
'satin-sheen-gold': #d7ac47,
'satin-sheen-gold-dark': darken(#d7ac47, 12.5),
+ 'satin-sheen-gold-light': lighten(#d7ac47, 7.5),
'gainsboro': #dde4e4,
'cultured': #f5f5f5
);
diff --git a/src/documents/changeLog.md b/src/documents/changeLog.md
index a2e1894..54f340d 100644
--- a/src/documents/changeLog.md
+++ b/src/documents/changeLog.md
@@ -17,6 +17,7 @@
- Added a missing row of connected "Religions/Teachings" (connected, ally and enemy) to the "Religions/Teachings" document type
- Added a missing row of connected "Magic/Spell" (connected, ally and enemy) to the "Magic/Spell" document type
- Fixed an occasional wrong click register on the document tree (opening document instead of expanding/collapsing)
+- Fixed non-functional whitespace triming for multiple document fields upon filling in input
- Fixed the "Name" field disappearing upon full deletion of text
- Fixed a bug with single/multi-select fields working unintuitively for adding new values (eg: Character personality traits field or Sex field)
- Fixed a tiny glitch when the hierarchical tree arrow was sometimes creating new documents instead of opening the category
@@ -28,7 +29,6 @@
- Fixed a bug with a full-screen text editor overlapping the menu
- Fixed a bug where list-typed fields were properly saving temporary data when switching between tabs in the note fields
- Fixed broken padding of the document in "Chapters" and "Lore notes/Other notes"
-- Fixed a broken field "Practitioners/Engineers" in the category "Sciences/Technologies"
- Fixed a typo in the "Connected Locations" field inside the "Magic/Spell" document type
- Fixed a visual glitch with icons sometimes "bouncing" or "flickering" when hovered over with the mouse
diff --git a/src/scripts/databaseManager/blueprints/chapters.ts b/src/scripts/databaseManager/blueprints/chapters.ts
index d0f8986..4ae1d12 100644
--- a/src/scripts/databaseManager/blueprints/chapters.ts
+++ b/src/scripts/databaseManager/blueprints/chapters.ts
@@ -74,7 +74,13 @@ export const chaptersBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/characters.ts b/src/scripts/databaseManager/blueprints/characters.ts
index 1b14d4a..ccb96a4 100644
--- a/src/scripts/databaseManager/blueprints/characters.ts
+++ b/src/scripts/databaseManager/blueprints/characters.ts
@@ -74,7 +74,13 @@ export const charactersBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/currencies.ts b/src/scripts/databaseManager/blueprints/currencies.ts
index b26c3e1..fecb147 100644
--- a/src/scripts/databaseManager/blueprints/currencies.ts
+++ b/src/scripts/databaseManager/blueprints/currencies.ts
@@ -74,7 +74,13 @@ export const currenciesBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/events.ts b/src/scripts/databaseManager/blueprints/events.ts
index c3f6ab6..fab64e6 100644
--- a/src/scripts/databaseManager/blueprints/events.ts
+++ b/src/scripts/databaseManager/blueprints/events.ts
@@ -74,7 +74,13 @@ export const eventsBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/items.ts b/src/scripts/databaseManager/blueprints/items.ts
index 3a16ca6..adf108f 100644
--- a/src/scripts/databaseManager/blueprints/items.ts
+++ b/src/scripts/databaseManager/blueprints/items.ts
@@ -74,7 +74,13 @@ export const itemsBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/languages.ts b/src/scripts/databaseManager/blueprints/languages.ts
index 93d3500..87a315b 100644
--- a/src/scripts/databaseManager/blueprints/languages.ts
+++ b/src/scripts/databaseManager/blueprints/languages.ts
@@ -74,7 +74,13 @@ export const languagesBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/locations.ts b/src/scripts/databaseManager/blueprints/locations.ts
index c81a72d..7253769 100644
--- a/src/scripts/databaseManager/blueprints/locations.ts
+++ b/src/scripts/databaseManager/blueprints/locations.ts
@@ -74,7 +74,13 @@ export const locationsBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/loreNotes.ts b/src/scripts/databaseManager/blueprints/loreNotes.ts
index 50dafc0..d4031ab 100644
--- a/src/scripts/databaseManager/blueprints/loreNotes.ts
+++ b/src/scripts/databaseManager/blueprints/loreNotes.ts
@@ -74,7 +74,13 @@ export const loreNotesBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/magic.ts b/src/scripts/databaseManager/blueprints/magic.ts
index 3848a58..cf1f948 100644
--- a/src/scripts/databaseManager/blueprints/magic.ts
+++ b/src/scripts/databaseManager/blueprints/magic.ts
@@ -74,7 +74,13 @@ export const magicBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/myths.ts b/src/scripts/databaseManager/blueprints/myths.ts
index f1fe70d..b164403 100644
--- a/src/scripts/databaseManager/blueprints/myths.ts
+++ b/src/scripts/databaseManager/blueprints/myths.ts
@@ -74,7 +74,13 @@ export const mythsBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/politicalGroups.ts b/src/scripts/databaseManager/blueprints/politicalGroups.ts
index cc4216d..610bf06 100644
--- a/src/scripts/databaseManager/blueprints/politicalGroups.ts
+++ b/src/scripts/databaseManager/blueprints/politicalGroups.ts
@@ -74,7 +74,13 @@ export const politicalGroupsBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/races.ts b/src/scripts/databaseManager/blueprints/races.ts
index 02f0e42..6ea2f0b 100644
--- a/src/scripts/databaseManager/blueprints/races.ts
+++ b/src/scripts/databaseManager/blueprints/races.ts
@@ -74,7 +74,13 @@ export const racesBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/religions.ts b/src/scripts/databaseManager/blueprints/religions.ts
index 218ce0e..1c21dc7 100644
--- a/src/scripts/databaseManager/blueprints/religions.ts
+++ b/src/scripts/databaseManager/blueprints/religions.ts
@@ -74,7 +74,13 @@ export const religionsBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/src/scripts/databaseManager/blueprints/scienceTechnology.ts b/src/scripts/databaseManager/blueprints/scienceTechnology.ts
index aca2f76..6fdf8d0 100644
--- a/src/scripts/databaseManager/blueprints/scienceTechnology.ts
+++ b/src/scripts/databaseManager/blueprints/scienceTechnology.ts
@@ -74,7 +74,13 @@ export const techBlueprint: I_Blueprint = {
type: "tags",
icon: "mdi-tag",
tooltip:
- `tags
+ `Tags are used to sort the same (or even different) document types into a custom groups based on your needs.
+
+ A document may have any number of tags, but each tag can be present only once.
+
+ This limitation also applies to any variation of lower or upper case iterations of the same tag.
+
+ Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},
diff --git a/suggestionList.md b/suggestionList.md
index a72f551..5c26289 100644
--- a/suggestionList.md
+++ b/suggestionList.md
@@ -1,3 +1,7 @@
+- Tag upper/lower case issues
+- Non working tag filter
+
+---
- Add "Related notes"
- Add "Predecessors", "Successors", "Date of start", "Date of end" and "How long it lasted" fields to locations and all other groups
@@ -10,6 +14,7 @@
- Add filtering by color and BG color (weird, but could work)
- "Save all" keybind and "Save all and exit" option on the exiting
+- Considering multiple "belongs under" category listing
- Add intelligent responsive design to the left tree and document body (maybe button to pull the left bar in and out?)
### Document & Project setting