From e1db9d666be1abf336ebf41fb74727ffc418c91e Mon Sep 17 00:00:00 2001 From: Elvanos Date: Mon, 8 Mar 2021 03:08:17 +0100 Subject: [PATCH] 0.1.3 RC 7 --- src/components/fields/Field_ColorPicker.vue | 6 +-- src/components/fields/Field_List.vue | 17 +++++++- src/components/fields/Field_Tags.vue | 43 ++++++++++++++++--- src/components/fields/Field_Text.vue | 2 +- src/components/fields/Field_Wysiwyg.vue | 2 +- src/css/quasar.variables.scss | 1 + src/documents/changeLog.md | 2 +- .../databaseManager/blueprints/chapters.ts | 8 +++- .../databaseManager/blueprints/characters.ts | 8 +++- .../databaseManager/blueprints/currencies.ts | 8 +++- .../databaseManager/blueprints/events.ts | 8 +++- .../databaseManager/blueprints/items.ts | 8 +++- .../databaseManager/blueprints/languages.ts | 8 +++- .../databaseManager/blueprints/locations.ts | 8 +++- .../databaseManager/blueprints/loreNotes.ts | 8 +++- .../databaseManager/blueprints/magic.ts | 8 +++- .../databaseManager/blueprints/myths.ts | 8 +++- .../blueprints/politicalGroups.ts | 8 +++- .../databaseManager/blueprints/races.ts | 8 +++- .../databaseManager/blueprints/religions.ts | 8 +++- .../blueprints/scienceTechnology.ts | 8 +++- suggestionList.md | 5 +++ 22 files changed, 162 insertions(+), 28 deletions(-) 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" >