mirror of
https://github.com/Elvanos/fantasia-archive.git
synced 2024-09-29 16:51:21 +13:00
0.1.6-RC-4
This commit is contained in:
parent
c49a685d17
commit
856de930ba
6 changed files with 41 additions and 47 deletions
17
src/App.vue
17
src/App.vue
|
@ -205,13 +205,30 @@ export default class App extends BaseClass {
|
||||||
* Open wysiwyg links in default browser window
|
* Open wysiwyg links in default browser window
|
||||||
*/
|
*/
|
||||||
openWysiwygLink (event: MouseEvent) {
|
openWysiwygLink (event: MouseEvent) {
|
||||||
|
event.preventDefault()
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||||
if (event.target && event.target.tagName.toLowerCase() === "a" && event.target.closest(".fieldWysiwyg")) {
|
if (event.target && event.target.tagName.toLowerCase() === "a" && event.target.closest(".fieldWysiwyg")) {
|
||||||
|
const isValidHttpUrl = (string:string) => {
|
||||||
|
let url
|
||||||
|
|
||||||
|
try {
|
||||||
|
url = new URL(string)
|
||||||
|
}
|
||||||
|
catch (_) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return url.protocol === "http:" || url.protocol === "https:"
|
||||||
|
}
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
if (isValidHttpUrl(event.target.href)) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
shell.openExternal(event.target.href).catch(e => console.log(e))
|
shell.openExternal(event.target.href).catch(e => console.log(e))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React to middle mouse button clicks
|
* React to middle mouse button clicks
|
||||||
|
|
|
@ -368,12 +368,16 @@ export default class DocumentControl extends BaseClass {
|
||||||
|
|
||||||
// Save document - CTRL + S
|
// Save document - CTRL + S
|
||||||
if (this.determineKeyBind("saveDocument") && !this.currentyEditable && this.SGET_allOpenedDocuments.docs.length > 0 && !this.SGET_getDialogsState && this.$route.path !== "/project") {
|
if (this.determineKeyBind("saveDocument") && !this.currentyEditable && this.SGET_allOpenedDocuments.docs.length > 0 && !this.SGET_getDialogsState && this.$route.path !== "/project") {
|
||||||
|
setTimeout(() => {
|
||||||
this.saveCurrentDocument(false).catch(e => console.log(e))
|
this.saveCurrentDocument(false).catch(e => console.log(e))
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save document without exiting edit mode - CTRL + ALT + S
|
// Save document without exiting edit mode - CTRL + ALT + S
|
||||||
if (this.determineKeyBind("saveDocumentNoExit") && !this.currentyEditable && this.SGET_allOpenedDocuments.docs.length > 0 && !this.SGET_getDialogsState && this.$route.path !== "/project") {
|
if (this.determineKeyBind("saveDocumentNoExit") && !this.currentyEditable && this.SGET_allOpenedDocuments.docs.length > 0 && !this.SGET_getDialogsState && this.$route.path !== "/project") {
|
||||||
|
setTimeout(() => {
|
||||||
this.saveCurrentDocument(true).catch(e => console.log(e))
|
this.saveCurrentDocument(true).catch(e => console.log(e))
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add new under parent - CTRL + SHIFT + N
|
// Add new under parent - CTRL + SHIFT + N
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
input-debounce="500"
|
input-debounce="500"
|
||||||
v-model="localInput"
|
v-model="localInput"
|
||||||
@filter="filterSelect"
|
@filter="filterSelect"
|
||||||
@input="processInput()"
|
@input="processInput"
|
||||||
>
|
>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-btn round dense flat v-slot:append v-if="!hideAdvSearchCheatsheetButton" icon="mdi-help-rhombus" @click.stop.prevent="SSET_setAdvSearchWindowVisible"
|
<q-btn round dense flat v-slot:append v-if="!hideAdvSearchCheatsheetButton" icon="mdi-help-rhombus" @click.stop.prevent="SSET_setAdvSearchWindowVisible"
|
||||||
|
@ -485,7 +485,6 @@ export default class Field_MultiRelationship extends FieldBase {
|
||||||
|
|
||||||
const notes = (!localCopy?.addedValues) ? [] : localCopy.addedValues
|
const notes = (!localCopy?.addedValues) ? [] : localCopy.addedValues
|
||||||
this.inputNotes = notes.filter(single => this.localInput.find(e => single.pairedId === e._id))
|
this.inputNotes = notes.filter(single => this.localInput.find(e => single.pairedId === e._id))
|
||||||
|
|
||||||
this.checkNotes()
|
this.checkNotes()
|
||||||
|
|
||||||
this.reloadObjectListAndCheckIfValueExists()
|
this.reloadObjectListAndCheckIfValueExists()
|
||||||
|
@ -600,7 +599,17 @@ export default class Field_MultiRelationship extends FieldBase {
|
||||||
const pairedFieldObject = objectDoc.extraFields.find(f => f.id === pairedField)
|
const pairedFieldObject = objectDoc.extraFields.find(f => f.id === pairedField)
|
||||||
|
|
||||||
const pairingType = this.inputDataBluePrint.type
|
const pairingType = this.inputDataBluePrint.type
|
||||||
if (pairedFieldObject !== undefined && typeof pairedFieldObject?.value !== "string" && pairedFieldObject?.value !== null && pairingType === "manyToSingleRelationship") {
|
if (
|
||||||
|
pairedFieldObject !== undefined &&
|
||||||
|
pairedFieldObject !== null &&
|
||||||
|
pairedFieldObject?.value !== undefined &&
|
||||||
|
pairedFieldObject?.value !== null &&
|
||||||
|
typeof pairedFieldObject?.value !== "string" &&
|
||||||
|
pairedFieldObject?.value?.value !== undefined &&
|
||||||
|
pairedFieldObject?.value?.value !== null &&
|
||||||
|
typeof pairedFieldObject?.value?.value !== "string" &&
|
||||||
|
pairingType === "manyToSingleRelationship"
|
||||||
|
) {
|
||||||
isDisabled = true
|
isDisabled = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -639,6 +648,7 @@ export default class Field_MultiRelationship extends FieldBase {
|
||||||
|
|
||||||
this.allTypeDocuments = allDbObjects.docs
|
this.allTypeDocuments = allDbObjects.docs
|
||||||
|
|
||||||
|
// Remove delete documents paired to this
|
||||||
if (toRemoveIndexList.length > 0) {
|
if (toRemoveIndexList.length > 0) {
|
||||||
toRemoveIndexList.forEach((id) => {
|
toRemoveIndexList.forEach((id) => {
|
||||||
const indexToRemove = this.localInput.findIndex(doc => doc._id === id)
|
const indexToRemove = this.localInput.findIndex(doc => doc._id === id)
|
||||||
|
@ -682,21 +692,6 @@ export default class Field_MultiRelationship extends FieldBase {
|
||||||
|
|
||||||
disabledIDList: string[] = []
|
disabledIDList: string[] = []
|
||||||
|
|
||||||
processSelectInteraction (input: null| I_ShortenedDocument) {
|
|
||||||
// TODO ADD THIS
|
|
||||||
/* if (input) {
|
|
||||||
this.disabledIDList.push(input._id)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const toRemoveIndex = this.disabledIDList.findIndex(id => id === this.inputDataValue.value._id)
|
|
||||||
|
|
||||||
if (toRemoveIndex) {
|
|
||||||
this.disabledIDList.splice(toRemoveIndex, 1)
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
this.processInput()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debounce timer to prevent buggy input sync
|
* Debounce timer to prevent buggy input sync
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -629,7 +629,7 @@ export default class Field_SingleRelationship extends FieldBase {
|
||||||
else {
|
else {
|
||||||
const toRemoveIndex = this.disabledIDList.findIndex(id => id === this.inputDataValue.value._id)
|
const toRemoveIndex = this.disabledIDList.findIndex(id => id === this.inputDataValue.value._id)
|
||||||
|
|
||||||
if (toRemoveIndex) {
|
if (toRemoveIndex > -1) {
|
||||||
this.disabledIDList.splice(toRemoveIndex, 1)
|
this.disabledIDList.splice(toRemoveIndex, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
- 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
|
- 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
|
- Fixed a bug that was re-triggering edit mode on document save without any actual edits
|
||||||
|
- Fixed a bug that was causing improperly filled in URLs in the text editor field to glitch out the whole app and require a restart
|
||||||
|
|
||||||
### New features
|
### New features
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,7 @@ export const charactersBlueprint: I_Blueprint = {
|
||||||
nameSingular: "Character",
|
nameSingular: "Character",
|
||||||
icon: "mdi-account",
|
icon: "mdi-account",
|
||||||
extraFields: [
|
extraFields: [
|
||||||
/*
|
|
||||||
{
|
|
||||||
id: "singleTest",
|
|
||||||
name: "SINGLE TO SINGLE TEST",
|
|
||||||
type: "singleToSingleRelationship",
|
|
||||||
icon: "mdi-account",
|
|
||||||
sizing: 12,
|
|
||||||
relationshipSettings: {
|
|
||||||
connectedObjectType: "characters",
|
|
||||||
connectedField: "singleTest"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "singleToMultiTest",
|
id: "singleToMultiTest",
|
||||||
name: "SINGLE TO MULTI TEST",
|
name: "SINGLE TO MULTI TEST",
|
||||||
|
@ -41,18 +30,6 @@ export const charactersBlueprint: I_Blueprint = {
|
||||||
connectedField: "singleToMultiTest"
|
connectedField: "singleToMultiTest"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
id: "multiTest",
|
|
||||||
name: "MULTI TO MULTI TEST",
|
|
||||||
type: "manyToManyRelationship",
|
|
||||||
icon: "mdi-account",
|
|
||||||
sizing: 12,
|
|
||||||
relationshipSettings: {
|
|
||||||
connectedObjectType: "characters",
|
|
||||||
connectedField: "multiTest"
|
|
||||||
}
|
|
||||||
}, */
|
|
||||||
{
|
{
|
||||||
id: "breakDocumentSettings",
|
id: "breakDocumentSettings",
|
||||||
name: "Document settings",
|
name: "Document settings",
|
||||||
|
|
Loading…
Reference in a new issue