0.1.6-RC-3

This commit is contained in:
Elvanos 2021-04-28 14:17:57 +02:00
parent 5cdcd32c3f
commit c49a685d17
5 changed files with 20 additions and 15 deletions

View file

@ -212,6 +212,9 @@ export default class RepairProjectDialog extends DialogBase {
allManyToSingleFields.find(e => e.id === field.id) ||
allManyToManyFields.find(e => e.id === field.id)) {
if (field.value && field.value.value) {
if (field.id === "pairedLocations") {
console.log(field.value.value)
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
for (const [i, subValue] of field.value.value.entries()) {
const blueprintField = blueprint.extraFields.find(e => e.id === field.id)

View file

@ -616,7 +616,7 @@ export default class Field_MultiRelationship extends FieldBase {
// Do a quick check on formatting of the current input (if something is wrong with it, set it as empty array)
this.localInput = (Array.isArray(this.localInput)) ? this.localInput : []
const toRemoveIndexList: number[] = []
const toRemoveIndexList: string[] = []
for (const [index] of this.localInput.entries()) {
// Proceed only if the local input is properly set up
@ -624,13 +624,7 @@ export default class Field_MultiRelationship extends FieldBase {
// If the matched object doesn't exist in the object, assume it has been deleted or newer existed and silently emit a signal input which auto-updates the document
if (!allDbObjects.docs.find(e => e._id === this.localInput[index]._id)) {
allDbObjects.docs.forEach(e => {
if (e._id === this.localInput[index]._id) {
console.log(extend(true, {}, this.localInput[index]))
console.log(extend(true, {}, e))
}
})
toRemoveIndexList.push(index)
toRemoveIndexList.push(this.localInput[index]._id)
}
// If the object does exist, make sure we have the newest available name by reasigning the label if it is different. Then trigger a silent update
else {
@ -646,8 +640,11 @@ export default class Field_MultiRelationship extends FieldBase {
this.allTypeDocuments = allDbObjects.docs
if (toRemoveIndexList.length > 0) {
toRemoveIndexList.forEach((e, i) => {
this.localInput.splice(i, 1)
toRemoveIndexList.forEach((id) => {
const indexToRemove = this.localInput.findIndex(doc => doc._id === id)
if (indexToRemove > -1) {
this.localInput.splice(indexToRemove, 1)
}
})
this.signalInput(true)
}
@ -706,9 +703,12 @@ export default class Field_MultiRelationship extends FieldBase {
pullTimer = null as any
processInput () {
this.checkNotes()
this.inputNotes = this.inputNotes.filter(single => this.localInput.find(e => single.pairedId === e._id))
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.processInput()
this.signalInput(false)
}, 500)
}

View file

@ -642,6 +642,7 @@ export default class Field_SingleRelationship extends FieldBase {
pullTimer = null as any
processInput () {
this.inputNote = (this.localInput !== null) ? this.inputNote : { pairedId: "", value: "" }
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()

View file

@ -7,7 +7,7 @@
### Known issues
- Overusing Tags currently causes app crashes on some PCs. If you suffer from this issue, reduce the number of tags or objects paired underneath them.
- Overusing Tags (20+ with 400+ documents in them for most) currently causes slowdowns/crashes on some PCs when using the Hierarchy tree. If you suffer from this issue, reduce the number of tags or objects paired underneath them.
### Bugfixes & Optimizations
@ -18,7 +18,8 @@
- Added a check against invalid characters in new project name to prevent issues while exporting on different OSs
- Hopefully finally fixed the new project creation bugs that have been plaguing the app for last 3 releases
- Fixed app starting in mutliple windows when ran multiple times.
- FIxed more typos across the app
- Fixed more typos across the app
- Added debounce timers for all input fields across whole document to massively improve performance when updating temporary document data across the app
- Fixed a bug that was re-triggering edit mode on document save without any actual edits
### New features

View file

@ -6,7 +6,8 @@ export const charactersBlueprint: I_Blueprint = {
nameSingular: "Character",
icon: "mdi-account",
extraFields: [
/* {
/*
{
id: "singleTest",
name: "SINGLE TO SINGLE TEST",
type: "singleToSingleRelationship",
@ -17,7 +18,6 @@ export const charactersBlueprint: I_Blueprint = {
connectedField: "singleTest"
}
},
{
id: "singleToMultiTest",
name: "SINGLE TO MULTI TEST",