0.1.3 RC 7

This commit is contained in:
Elvanos 2021-03-08 03:08:17 +01:00
parent 65305a1860
commit e1db9d666b
22 changed files with 162 additions and 28 deletions

View file

@ -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 () {

View file

@ -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 () {

View file

@ -15,7 +15,7 @@
>
<q-chip
v-for="(input,index) in localInput" :key="index"
color="accent" text-color="dark" class="text-bold">
color="gunmetal-light" text-color="satin-sheen-gold-light" class="text-weight-medium">
{{input}}
</q-chip>
</div>
@ -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"
>
<template v-slot:selected-item="scope">
<q-chip
@ -88,11 +91,12 @@ export default class Field_Tags extends BaseClass {
@Prop() readonly editMode!: boolean
changedInput = false
localInput = []
localInput: string[] = []
@Watch("inputDataValue", { deep: true, immediate: true })
reactToInputChanges () {
this.localInput = (this.inputDataValue) ? this.inputDataValue : []
this.buildTagList().catch(e => 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
}

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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
);

View file

@ -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

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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.
<br>
A document may have any number of tags, but each tag can be present only once.
<br>
This limitation also applies to any variation of lower or upper case iterations of the same tag.
<br>
Example: A tag called "Player Party" will be consider the same tag as "player party", "PlAyER PaRtY" or any similar.
`,
sizing: 12
},

View file

@ -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