0.1.6 - RC-2

This commit is contained in:
Elvanos 2021-04-28 03:06:41 +02:00
parent 250ad90a5d
commit 5cdcd32c3f
16 changed files with 226 additions and 33 deletions

View file

@ -258,7 +258,7 @@
active-class="bg-gunmetal-light text-cultured"
class="noHigh"
@click="repairProjectAssignUID"
:disable="!projectExists"
:disable="!projectExists || isFrontpage"
>
<q-item-section>Repair legacy project</q-item-section>
<q-item-section avatar>

View file

@ -85,12 +85,13 @@
<script lang="ts">
import { remote } from "electron"
import { extend, Loading, QSpinnerGears } from "quasar"
import { Component, Watch } from "vue-property-decorator"
import DialogBase from "src/components/dialogs/_DialogBase"
import { retrieveCurrentProjectName, exportProject } from "src/scripts/projectManagement/projectManagent"
import { Loading, QSpinnerGears } from "quasar"
import { I_ShortenedDocument } from "src/interfaces/I_OpenedDocument"
import { I_Blueprint } from "src/interfaces/I_Blueprint"
@ -171,6 +172,12 @@ export default class RepairProjectDialog extends DialogBase {
this.repairOngoing = false
this.repairFinished = true
const optionsSnapShot = extend(true, {}, this.SGET_options)
// @ts-ignore
optionsSnapShot.pre016check = false
// @ts-ignore
this.SSET_options(optionsSnapShot)
}
async remapDocument (document: I_ShortenedDocument, blueprint: I_Blueprint) {

View file

@ -31,7 +31,7 @@
v-if="editMode"
v-model.number="localInput"
type="text"
@keydown="signalInput"
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
dense
@ -44,7 +44,7 @@
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy transition-show="scale" transition-hide="scale">
<q-color
@input="signalInput"
@input="processInput"
v-model="localInput"
/>
</q-popup-proxy>
@ -94,6 +94,18 @@ export default class Field_ColorPicker extends FieldBase {
*/
localInput = ""
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**
* Signals the input change to the document body parent component
*/

View file

@ -87,7 +87,7 @@
class="grow-1"
:class="`listField_input${index}_${inputDataBluePrint.id}`"
dense
@keydown="signalInput"
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
>
@ -112,8 +112,8 @@
input-debounce="0"
new-value-mode="add"
dark
@input="signalInput"
@keydown="signalInput"
@input="processInput"
@keydown="processInput"
:label="(inputAffix) ? inputAffix : ''"
v-model="localInput[index].affix"
/>
@ -221,7 +221,7 @@ export default class Field_List extends FieldBase {
*/
removeFromList (index: number) {
this.localInput.splice(index, 1)
this.signalInput()
this.processInput()
}
/**
@ -243,7 +243,7 @@ export default class Field_List extends FieldBase {
newInput.focus()
}
this.signalInput()
this.processInput()
}
moveItem (index: number, direction: "up" | "down") {
@ -252,7 +252,19 @@ export default class Field_List extends FieldBase {
this.localInput.splice(to, 0, this.localInput.splice(from, 1)[0])
this.signalInput()
this.processInput()
}
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**

View file

@ -153,7 +153,7 @@
input-debounce="500"
v-model="localInput"
@filter="filterSelect"
@input="signalInput(false)"
@input="processInput()"
>
<template v-slot:append>
<q-btn round dense flat v-slot:append v-if="!hideAdvSearchCheatsheetButton" icon="mdi-help-rhombus" @click.stop.prevent="SSET_setAdvSearchWindowVisible"
@ -410,7 +410,7 @@
label="Note"
v-model="singleNote.value"
dense
@keydown="signalInput(false)"
@keydown="processInput()"
:outlined="!isDarkMode"
:filled="isDarkMode"
>
@ -680,7 +680,7 @@ export default class Field_MultiRelationship extends FieldBase {
this.localInput.splice(to, 0, this.localInput.splice(from, 1)[0])
this.inputNotes.splice(to, 0, this.inputNotes.splice(from, 1)[0])
this.signalInput(false)
this.processInput()
}
disabledIDList: string[] = []
@ -697,7 +697,19 @@ export default class Field_MultiRelationship extends FieldBase {
this.disabledIDList.splice(toRemoveIndex, 1)
}
} */
this.signalInput(false)
this.processInput()
}
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.processInput()
}, 500)
}
/**

View file

@ -51,8 +51,8 @@
new-value-mode="add"
multiple
v-model="localInput"
@input="signalInput"
@keydown="signalInput"
@input="processInput"
@keydown="processInput"
>
<template v-slot:selected-item="scope">
<q-chip
@ -229,7 +229,19 @@ export default class Field_MultiSelect extends FieldBase {
this.localInput.splice(to, 0, this.localInput.splice(from, 1)[0])
this.signalInput()
this.processInput()
}
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**

View file

@ -27,7 +27,7 @@
v-if="editMode"
v-model.number="localInput"
type="number"
@keydown="signalInput"
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
dense
@ -75,6 +75,18 @@ export default class Field_Number extends FieldBase {
*/
localInput: null|number = null
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**
* Signals the input change to the document body parent component
*/

View file

@ -361,7 +361,7 @@
label="Note"
v-model="inputNote.value"
dense
@keydown="signalInput"
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
>
@ -633,7 +633,19 @@ export default class Field_SingleRelationship extends FieldBase {
this.disabledIDList.splice(toRemoveIndex, 1)
}
}
this.signalInput()
this.processInput()
}
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**

View file

@ -38,8 +38,8 @@
input-debounce="0"
new-value-mode="add"
v-model="localInput"
@input="signalInput"
@keydown="signalInput"
@input="processInput"
@keydown="processInput"
>
<template v-slot:selected-item="scope">
<q-chip
@ -150,6 +150,18 @@ export default class Field_SingleSelect extends FieldBase {
})
}
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**
* Signals the input change to the document body parent component
*/

View file

@ -13,7 +13,7 @@
<q-toggle
:disable="!editMode"
v-model="localInput"
@input="signalInput"
@input="processInput"
/>
<div class="separatorWrapper">
@ -58,6 +58,18 @@ export default class Field_Switch extends FieldBase {
*/
localInput: null|boolean = null
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**
* Signals the input change to the document body parent component
*/

View file

@ -42,8 +42,8 @@
multiple
v-model="localInput"
@new-value="addNewValue"
@input="signalInput"
@keydown="signalInput"
@input="processInput"
@keydown="processInput"
error-message="This tag is already present in the selection."
:error="tagAlreadyExists"
>
@ -120,6 +120,18 @@ export default class Field_Tags extends FieldBase {
this.buildTagList()
}
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**
* Signals the input change to the document body parent component
*/
@ -179,7 +191,7 @@ export default class Field_Tags extends FieldBase {
// @ts-ignore
this.$refs[`tagField${this.inputDataBluePrint.id}`].updateInputValue ('')
/* eslint-enable */
this.signalInput()
this.processInput()
}
if (tagAlreadyExistsInList && tagAlreadyExistsAttached) {

View file

@ -26,7 +26,7 @@
<q-input
v-if="editMode"
v-model="localInput"
@keydown="signalInput"
@keydown="processInput"
:outlined="!isDarkMode"
:filled="isDarkMode"
dense
@ -95,7 +95,7 @@ export default class Field_Text extends FieldBase {
*/
deletePlaceholder () {
this.localInput = ""
this.signalInput()
this.processInput()
}
/**
@ -118,6 +118,18 @@ export default class Field_Text extends FieldBase {
}
}
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**
* Signals the input change to the document body parent component
*/

View file

@ -22,7 +22,7 @@
@paste.native="evt => pasteCapture(evt)"
:toolbar="wysiwygOptions"
:fonts="wysiwygFonts"
@input="signalInput"
@input="processInput"
:flat="isDarkMode"
v-if="editMode"
:definitions="definitions"
@ -72,6 +72,18 @@ export default class Field_Wysiwyg extends FieldBase {
*/
localInput = ""
/**
* Debounce timer to prevent buggy input sync
*/
pullTimer = null as any
processInput () {
clearTimeout(this.pullTimer)
this.pullTimer = setTimeout(() => {
this.signalInput()
}, 500)
}
/**
* Signals the input change to the document body parent component
*/

View file

@ -25,6 +25,7 @@
- Added support for filtering via `Is a category` switch field
- Added multiple predefined values list multiple list field across the different document types
- Added a super obnoxious propmt for people to repair their project on start-up so they hopefully actually do it! Woo-hoo!
### QoL adjustments

View file

@ -1,6 +1,25 @@
<template>
<q-layout view="hHh LpR lfr">
<!-- Repair project dialog -->
<repairProjectDialog
:dialog-trigger="repairProjectDialogTrigger"
@trigger-dialog-close="repairProjectDialogClose"
/>
<q-dialog v-model="pre016check" seamless position="bottom">
<q-card style="width: 100vw; min-width: 100vw;" dark class="text-accent bg-secondary">
<q-card-section class="row items-center no-wrap justify-center">
<div>
If you are working with a pre-0.1.6 version project, then please <span class="q-mx-lg"><q-btn outline label="Repair your project" color="accent" @click="repairProjectAssignUID" /></span>
</div>
<q-btn outline round icon="close" v-close-popup @click="close016Notification" class="notifClose" />
</q-card-section>
</q-card>
</q-dialog>
<!-- Header -->
<appHeader/>
@ -57,6 +76,7 @@ import objectTree from "src/components/ObjectTree.vue"
import appHeader from "src/components/AppHeader.vue"
import documentControl from "src/components/DocumentControl.vue"
import { engageBlueprints, retrieveAllBlueprints } from "src/scripts/databaseManager/blueprintManager"
import repairProjectDialog from "src/components/dialogs/RepairProject.vue"
import { extend } from "quasar"
import { OptionsStateInteface } from "src/store/module-options/state"
@ -67,7 +87,8 @@ import { I_ShortenedDocument } from "src/interfaces/I_OpenedDocument"
components: {
objectTree,
appHeader,
documentControl
documentControl,
repairProjectDialog
}
})
export default class DocumentLayout extends BaseClass {
@ -103,7 +124,7 @@ export default class DocumentLayout extends BaseClass {
}
establishAllDocumentDatabases () {
// @ts-ignore
// @ts-ignore
window.FA_dbs = {}
for (const blueprint of this.SGET_allBlueprints) {
window.FA_dbs[blueprint._id] = new PouchDB(blueprint._id)
@ -112,7 +133,7 @@ export default class DocumentLayout extends BaseClass {
async loadAllProjectDocuments () {
for (const blueprint of this.SGET_allBlueprints) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
const dbRows = await window.FA_dbs[blueprint._id].allDocs({ include_docs: true })
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
@ -150,6 +171,8 @@ export default class DocumentLayout extends BaseClass {
*/
splitterModel = 375
pre016check = false
/**
* Special class for the splitter
*/
@ -176,6 +199,9 @@ export default class DocumentLayout extends BaseClass {
const options = this.SGET_options
this.hideHierarchyTree = options.hideHierarchyTree
// @ts-ignore
this.pre016check = options.pre016check
if (options.treeWidth && !this.hideHierarchyTree) {
this.splitterModel = options.treeWidth
}
@ -204,6 +230,12 @@ export default class DocumentLayout extends BaseClass {
*/
optionsSnapShot = {} as OptionsStateInteface
close016Notification () {
this.optionsSnapShot = extend(true, {}, this.SGET_options)
this.optionsSnapShot.pre016check = false
this.SSET_options(this.optionsSnapShot)
}
/**
* React to dragging of the splitter
*/
@ -220,12 +252,31 @@ export default class DocumentLayout extends BaseClass {
this.SSET_options(this.optionsSnapShot)
}, 500)
}
/****************************************************************/
// Repair project dialog
/****************************************************************/
repairProjectDialogTrigger: string | false = false
repairProjectDialogClose () {
this.repairProjectDialogTrigger = false
}
repairProjectAssignUID () {
this.repairProjectDialogTrigger = this.generateUID()
}
}
</script>
<style lang="scss">
.notifClose {
position: absolute;
right: 20px;
top: 14px;
}
.sideWrapper {
height: calc(100% - 40px) !important;
}

View file

@ -36,6 +36,7 @@ export interface OptionsStateInteface {
userKeybindList: any[]
treeWidth?: number
pre016check?: boolean
}
function state (): OptionsStateInteface {
@ -74,7 +75,8 @@ function state (): OptionsStateInteface {
hideTreeIconEdit: false,
hideTreeIconView: false,
treeWidth: 374,
userKeybindList: []
userKeybindList: [],
pre016check: true
}
}