mirror of
https://github.com/Elvanos/fantasia-archive.git
synced 2024-09-29 08:41:49 +13:00
0.1.6a-RC-1
This commit is contained in:
parent
b91b6b845c
commit
8f8b7d2e7f
25 changed files with 305 additions and 44 deletions
69
src/App.vue
69
src/App.vue
|
@ -11,7 +11,7 @@
|
||||||
:width="425"
|
:width="425"
|
||||||
:start-x="50"
|
:start-x="50"
|
||||||
:start-y="150"
|
:start-y="150"
|
||||||
:actions="['close']"
|
:actions="['pin', 'close']"
|
||||||
content-class="bg-gunmetal-light text-accent advSearchWindow"
|
content-class="bg-gunmetal-light text-accent advSearchWindow"
|
||||||
>
|
>
|
||||||
<div class="q-pa-md fit">
|
<div class="q-pa-md fit">
|
||||||
|
@ -20,6 +20,37 @@
|
||||||
</q-markdown>
|
</q-markdown>
|
||||||
</div>
|
</div>
|
||||||
</q-window>
|
</q-window>
|
||||||
|
|
||||||
|
<q-window
|
||||||
|
v-model="corkboardWindowVisible"
|
||||||
|
dark
|
||||||
|
title="Note board"
|
||||||
|
gripper-border-color="primary"
|
||||||
|
gripper-background-color="primary"
|
||||||
|
:height="600"
|
||||||
|
:width="350"
|
||||||
|
:start-x="350"
|
||||||
|
:start-y="100"
|
||||||
|
:actions="['pin', 'close']"
|
||||||
|
content-class="bg-gunmetal-light text-accent advSearchWindow"
|
||||||
|
>
|
||||||
|
<form
|
||||||
|
class="corkboardInput"
|
||||||
|
autocorrect="off"
|
||||||
|
autocapitalize="off"
|
||||||
|
autocomplete="off"
|
||||||
|
spellcheck="false"
|
||||||
|
>
|
||||||
|
<q-input
|
||||||
|
|
||||||
|
v-model="corkboardContent"
|
||||||
|
filled
|
||||||
|
dark
|
||||||
|
@keyup="processCorkboardInput"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
|
</q-window>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -34,6 +65,7 @@ import { colors } from "quasar"
|
||||||
import { tipsTricks } from "src/scripts/utilities/tipsTricks"
|
import { tipsTricks } from "src/scripts/utilities/tipsTricks"
|
||||||
import { shell } from "electron"
|
import { shell } from "electron"
|
||||||
import { summonAllPlusheForms } from "src/scripts/utilities/plusheMascot"
|
import { summonAllPlusheForms } from "src/scripts/utilities/plusheMascot"
|
||||||
|
import { saveCorkboard, retrieveCorkboard } from "src/scripts/projectManagement/projectManagent"
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
|
@ -68,6 +100,8 @@ export default class App extends BaseClass {
|
||||||
|
|
||||||
// Load the popup hint on start
|
// Load the popup hint on start
|
||||||
this.loadHintPopup()
|
this.loadHintPopup()
|
||||||
|
|
||||||
|
this.loadCorkboardCotent().catch(e => console.log(e))
|
||||||
}
|
}
|
||||||
|
|
||||||
destroyed () {
|
destroyed () {
|
||||||
|
@ -289,6 +323,34 @@ export default class App extends BaseClass {
|
||||||
|
|
||||||
advSearchWindowVisible = false
|
advSearchWindowVisible = false
|
||||||
|
|
||||||
|
@Watch("SGET_getNoteCorkboardhWindowVisible")
|
||||||
|
onCorkboardWindowOpen () {
|
||||||
|
this.corkboardWindowVisible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
corkboardWindowVisible = false
|
||||||
|
|
||||||
|
corkboardContent = ""
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Debounce timer to prevent buggy input sync
|
||||||
|
*/
|
||||||
|
corkboardTimer = null as any
|
||||||
|
|
||||||
|
processCorkboardInput () {
|
||||||
|
clearTimeout(this.corkboardTimer)
|
||||||
|
this.corkboardTimer = setTimeout(() => {
|
||||||
|
saveCorkboard(this.corkboardContent).catch(e => console.log(e))
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
async loadCorkboardCotent () {
|
||||||
|
this.corkboardContent = await retrieveCorkboard()
|
||||||
|
if (this.corkboardContent.length > 0) {
|
||||||
|
this.corkboardWindowVisible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
// Local keybinds
|
// Local keybinds
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
@ -299,6 +361,11 @@ export default class App extends BaseClass {
|
||||||
if (this.determineKeyBind("toggleAdvSearchCheatsheet")) {
|
if (this.determineKeyBind("toggleAdvSearchCheatsheet")) {
|
||||||
this.advSearchWindowVisible = !this.advSearchWindowVisible
|
this.advSearchWindowVisible = !this.advSearchWindowVisible
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Toggle Note Board - CTRL + ALT + SHIFT + P
|
||||||
|
if (this.determineKeyBind("toggleNoteCorkboard")) {
|
||||||
|
this.corkboardWindowVisible = !this.corkboardWindowVisible
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -60,6 +60,9 @@ export default class BaseClass extends Vue {
|
||||||
@FloatingWindows.Getter("getAdvSearchWindowVisible") SGET_getAdvSearchWindowVisible!: string
|
@FloatingWindows.Getter("getAdvSearchWindowVisible") SGET_getAdvSearchWindowVisible!: string
|
||||||
@FloatingWindows.Mutation("setAdvSearchWindowVisible") SSET_setAdvSearchWindowVisible!: () => void
|
@FloatingWindows.Mutation("setAdvSearchWindowVisible") SSET_setAdvSearchWindowVisible!: () => void
|
||||||
|
|
||||||
|
@FloatingWindows.Getter("getNoteCorkboardhWindowVisible") SGET_getNoteCorkboardhWindowVisible!: string
|
||||||
|
@FloatingWindows.Mutation("setNoteCorkboardWindowVisible") SSET_setNoteCorkboardWindowVisible!: () => void
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
// KEYBINDS MANAGEMENT
|
// KEYBINDS MANAGEMENT
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
|
@ -137,6 +137,21 @@
|
||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
|
<q-btn
|
||||||
|
icon="mdi-clipboard-text-outline"
|
||||||
|
color="primary"
|
||||||
|
outline
|
||||||
|
@click="SSET_setNoteCorkboardWindowVisible"
|
||||||
|
>
|
||||||
|
<q-tooltip
|
||||||
|
:delay="500"
|
||||||
|
anchor="bottom middle"
|
||||||
|
self="top middle"
|
||||||
|
>
|
||||||
|
Show note board
|
||||||
|
</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
<q-separator vertical inset color="accent" />
|
<q-separator vertical inset color="accent" />
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
@ -512,7 +527,8 @@ export default class DocumentControl extends BaseClass {
|
||||||
copyTargetDocument () {
|
copyTargetDocument () {
|
||||||
this.documentPass = extend(true, {}, this.findRequestedOrActiveDocument())
|
this.documentPass = extend(true, {}, this.findRequestedOrActiveDocument())
|
||||||
|
|
||||||
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
const blueprint = this.SGET_blueprint(this.documentPass.type)
|
||||||
|
const newDocument = copyDocument(this.documentPass, this.generateUID(), blueprint)
|
||||||
|
|
||||||
const dataPass = {
|
const dataPass = {
|
||||||
doc: newDocument,
|
doc: newDocument,
|
||||||
|
|
|
@ -1038,7 +1038,8 @@ export default class ObjectTree extends BaseClass {
|
||||||
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
||||||
this.documentPass = extend(true, {}, this.SGET_document(currentDoc._id))
|
this.documentPass = extend(true, {}, this.SGET_document(currentDoc._id))
|
||||||
|
|
||||||
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
const blueprint = this.SGET_blueprint(this.documentPass.type)
|
||||||
|
const newDocument = copyDocument(this.documentPass, this.generateUID(), blueprint)
|
||||||
|
|
||||||
const dataPass = {
|
const dataPass = {
|
||||||
doc: newDocument,
|
doc: newDocument,
|
||||||
|
|
|
@ -179,6 +179,21 @@
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
|
<q-item
|
||||||
|
v-close-popup
|
||||||
|
clickable
|
||||||
|
active
|
||||||
|
active-class="bg-gunmetal-light text-cultured"
|
||||||
|
class="noHigh"
|
||||||
|
@click="SSET_setNoteCorkboardWindowVisible"
|
||||||
|
:disable="!projectExists"
|
||||||
|
>
|
||||||
|
<q-item-section>Show note board</q-item-section>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon name="mdi-clipboard-text-outline" />
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
|
||||||
<q-separator dark />
|
<q-separator dark />
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
|
@ -279,11 +294,11 @@
|
||||||
active-class="bg-gunmetal-light text-cultured"
|
active-class="bg-gunmetal-light text-cultured"
|
||||||
class="noHigh"
|
class="noHigh"
|
||||||
@click="navigateToProjectPage"
|
@click="navigateToProjectPage"
|
||||||
:disable="!projectExists || isProjectPage || SGET_allOpenedDocuments.docs.length > 0"
|
:disable="!projectExists || isProjectPage"
|
||||||
>
|
>
|
||||||
<q-item-section>Resume project</q-item-section>
|
<q-item-section>Show project overview</q-item-section>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-icon name="mdi-folder-open-outline" />
|
<q-icon name="mdi-chart-bar" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
|
@ -563,6 +578,11 @@ export default class AppControl extends BaseClass {
|
||||||
if (this.determineKeyBind("openAppOptions") && !this.SGET_getDialogsState) {
|
if (this.determineKeyBind("openAppOptions") && !this.SGET_getDialogsState) {
|
||||||
this.programSettingsDialogAssignUID()
|
this.programSettingsDialogAssignUID()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// App options
|
||||||
|
if (this.determineKeyBind("navigateToProjectOverview") && this.projectExists && !this.isProjectPage) {
|
||||||
|
this.navigateToProjectPage()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************/
|
/****************************************************************/
|
||||||
|
|
|
@ -413,7 +413,8 @@ export default class TopTabs extends BaseClass {
|
||||||
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
||||||
this.documentPass = extend(true, {}, currentDoc)
|
this.documentPass = extend(true, {}, currentDoc)
|
||||||
|
|
||||||
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
const blueprint = this.SGET_blueprint(this.documentPass.type)
|
||||||
|
const newDocument = copyDocument(this.documentPass, this.generateUID(), blueprint)
|
||||||
|
|
||||||
const dataPass = {
|
const dataPass = {
|
||||||
doc: newDocument,
|
doc: newDocument,
|
||||||
|
|
|
@ -545,7 +545,8 @@ export default class ExistingDocumentDialog extends DialogBase {
|
||||||
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
||||||
this.documentPass = extend(true, {}, currentDoc)
|
this.documentPass = extend(true, {}, currentDoc)
|
||||||
|
|
||||||
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
const blueprint = this.SGET_blueprint(this.documentPass.type)
|
||||||
|
const newDocument = copyDocument(this.documentPass, this.generateUID(), blueprint)
|
||||||
|
|
||||||
const dataPass = {
|
const dataPass = {
|
||||||
doc: newDocument,
|
doc: newDocument,
|
||||||
|
|
|
@ -185,10 +185,10 @@
|
||||||
|
|
||||||
<div class="col-12 col-md-6 col-lg-4 optionWrapper">
|
<div class="col-12 col-md-6 col-lg-4 optionWrapper">
|
||||||
<div class="optionTitle">
|
<div class="optionTitle">
|
||||||
Hide tips on project screen
|
Hide tips on project overview
|
||||||
<q-icon name="mdi-help-circle" size="16px" class="q-ml-md">
|
<q-icon name="mdi-help-circle" size="16px" class="q-ml-md">
|
||||||
<q-tooltip :delay="500">
|
<q-tooltip :delay="500">
|
||||||
Hides the project screen tips & tricks info card.
|
Hides the project overview tips & tricks info card.
|
||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -799,7 +799,8 @@ export default class Field_MultiRelationship extends FieldBase {
|
||||||
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
||||||
this.documentPass = extend(true, {}, currentDoc)
|
this.documentPass = extend(true, {}, currentDoc)
|
||||||
|
|
||||||
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
const blueprint = this.SGET_blueprint(this.documentPass.type)
|
||||||
|
const newDocument = copyDocument(this.documentPass, this.generateUID(), blueprint)
|
||||||
|
|
||||||
const dataPass = {
|
const dataPass = {
|
||||||
doc: newDocument,
|
doc: newDocument,
|
||||||
|
|
|
@ -733,7 +733,8 @@ export default class Field_SingleRelationship extends FieldBase {
|
||||||
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
copyTargetDocument (currentDoc: I_OpenedDocument) {
|
||||||
this.documentPass = extend(true, {}, currentDoc)
|
this.documentPass = extend(true, {}, currentDoc)
|
||||||
|
|
||||||
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
const blueprint = this.SGET_blueprint(this.documentPass.type)
|
||||||
|
const newDocument = copyDocument(this.documentPass, this.generateUID(), blueprint)
|
||||||
|
|
||||||
const dataPass = {
|
const dataPass = {
|
||||||
doc: newDocument,
|
doc: newDocument,
|
||||||
|
|
|
@ -10,8 +10,26 @@
|
||||||
</q-icon>
|
</q-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!editMode && localInput">
|
||||||
|
<div
|
||||||
|
v-if="!editMode"
|
||||||
|
>
|
||||||
|
<q-chip
|
||||||
|
:color="(isDarkMode) ? 'accent' : 'gunmetal-light'"
|
||||||
|
:text-color="(isDarkMode) ? 'dark' :'satin-sheen-gold-light'"
|
||||||
|
:class="(isDarkMode) ? 'text-weight-bold':'text-weight-medium'">
|
||||||
|
<q-icon
|
||||||
|
:color="(isDarkMode) ? 'dark' :'satin-sheen-gold-light'"
|
||||||
|
name="mdi-check-bold"
|
||||||
|
class="q-mr-sm"
|
||||||
|
/>
|
||||||
|
Active
|
||||||
|
</q-chip>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-toggle
|
<q-toggle
|
||||||
:disable="!editMode"
|
v-if="editMode"
|
||||||
v-model="localInput"
|
v-model="localInput"
|
||||||
@input="processInput"
|
@input="processInput"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md fieldWysiwygTitle">
|
<div class="flex justify-center items-center text-weight-bolder q-mb-sm q-mt-md fieldWysiwygTitle">
|
||||||
|
<span>
|
||||||
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
|
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
|
||||||
{{inputDataBluePrint.name}}
|
{{inputDataBluePrint.name}}
|
||||||
<q-icon v-if="toolTip && !disableDocumentToolTips" name="mdi-help-circle" size="16px" class="q-ml-md">
|
<q-icon v-if="toolTip && !disableDocumentToolTips" name="mdi-help-circle" size="16px" class="q-ml-md">
|
||||||
|
@ -8,6 +9,8 @@
|
||||||
<span v-html="toolTip"/>
|
<span v-html="toolTip"/>
|
||||||
</q-tooltip>
|
</q-tooltip>
|
||||||
</q-icon>
|
</q-icon>
|
||||||
|
</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -607,3 +607,36 @@ body .q-tooltip {
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 30px;
|
background-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.corkboardInput {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
form {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-validation-component {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-field__control {
|
||||||
|
height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-field__control::before,
|
||||||
|
.q-field--filled.q-field--dark .q-field__control,
|
||||||
|
.q-field--filled.q-field--dark .q-field__control::before {
|
||||||
|
background: transparent !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
padding: 17px 12px;
|
||||||
|
height: 100% !important;
|
||||||
|
resize: none !important;
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
### Known issues
|
### Known issues
|
||||||
|
|
||||||
- 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 and/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 and/or objects paired underneath them.
|
||||||
- When using the `Legacy project repair` tool, a very small amount of users report being stuck on the progress. If you suffer from the issue, restart the app and then restart the fixing process - this seems to be a workaround for now.
|
|
||||||
- Importing existing project can sometimes get stuck. Restarting the app fixes this.
|
- Importing existing project can sometimes get stuck. Restarting the app fixes this.
|
||||||
|
|
||||||
### Bugfixes & Optimizations
|
### Bugfixes & Optimizations
|
||||||
|
@ -18,13 +17,22 @@
|
||||||
- Fixed a bug that was causing import/merge/repair tools to get stuck after exporting in the same popup
|
- Fixed a bug that was causing import/merge/repair tools to get stuck after exporting in the same popup
|
||||||
- Fixed an issue with flickering select menus
|
- Fixed an issue with flickering select menus
|
||||||
- Fixed functionality of the `Connected Locations` field in the `Teachings/Religious groups` document type
|
- Fixed functionality of the `Connected Locations` field in the `Teachings/Religious groups` document type
|
||||||
|
- Fixed a bug that waas causing the copy document functionality to also copy single-to-single and many-to-single relationships.
|
||||||
|
- These relationships can not be copied as they are logically unique across the whole web of all relationships the user build and can exist only once in the whole system
|
||||||
|
- Example: Bilbo has `Place of origin` set to Shire - if you make a copy of Shire, Bilbo will get automatically removed from the `Characters originated from location` in the copy of the Shire as he is already linked to the original Shire and logically couldn't have originated from two places at once.
|
||||||
|
|
||||||
### New features
|
### New features
|
||||||
|
|
||||||
- Added new options to predefeined select lists across the app
|
- Added new options to predefeined select lists across the app
|
||||||
|
- Added new display for non-edit mode for switch fields
|
||||||
|
- Added keybind: Show project overview
|
||||||
|
|
||||||
### QoL adjustments
|
### QoL adjustments
|
||||||
|
|
||||||
|
- Adjusted label-align of text editor fields to look more representstive of half-coherent UI
|
||||||
|
- Adjusted the behavior, icon and name of the `Resume project` functionality in the menu
|
||||||
|
- Renamed "Project screen" to "Project overview" app-wide
|
||||||
|
|
||||||
## 0.1.6
|
## 0.1.6
|
||||||
|
|
||||||
### Known issues
|
### Known issues
|
||||||
|
|
|
@ -124,8 +124,10 @@ export default class DocumentLayout extends BaseClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
establishAllDocumentDatabases () {
|
establishAllDocumentDatabases () {
|
||||||
|
if (!window.FA_dbs) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
window.FA_dbs = {}
|
window.FA_dbs = {}
|
||||||
|
}
|
||||||
for (const blueprint of this.SGET_allBlueprints) {
|
for (const blueprint of this.SGET_allBlueprints) {
|
||||||
window.FA_dbs[blueprint._id] = new PouchDB(blueprint._id)
|
window.FA_dbs[blueprint._id] = new PouchDB(blueprint._id)
|
||||||
}
|
}
|
||||||
|
|
|
@ -872,7 +872,8 @@ export default class PageDocumentDisplay extends BaseClass {
|
||||||
copyTargetDocument () {
|
copyTargetDocument () {
|
||||||
this.documentPass = extend(true, {}, this.findRequestedOrActiveDocument())
|
this.documentPass = extend(true, {}, this.findRequestedOrActiveDocument())
|
||||||
|
|
||||||
const newDocument = copyDocument(this.documentPass, this.generateUID())
|
const blueprint = this.SGET_blueprint(this.documentPass.type)
|
||||||
|
const newDocument = copyDocument(this.documentPass, this.generateUID(), blueprint)
|
||||||
|
|
||||||
const dataPass = {
|
const dataPass = {
|
||||||
doc: newDocument,
|
doc: newDocument,
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h5 class="mainProjectSubTitle">Project screen for </h5>
|
<h5 class="mainProjectSubTitle">Project overview for </h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h2 class="mainProjectTitle"> {{projectName}}</h2>
|
<h2 class="mainProjectTitle"> {{projectName}}</h2>
|
||||||
|
@ -164,7 +164,7 @@ export default class ProjectScreen extends BaseClass {
|
||||||
disableDocumentControlBar = false
|
disableDocumentControlBar = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines if the project screen help hint should show or not
|
* Determines if the project overview help hint should show or not
|
||||||
*/
|
*/
|
||||||
hideTooltipsProject = false
|
hideTooltipsProject = false
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,17 @@ export const defaultKeybinds = [
|
||||||
tooltip: "Open keybind cheatsheet"
|
tooltip: "Open keybind cheatsheet"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Show project overview - NONE
|
||||||
|
{
|
||||||
|
altKey: false,
|
||||||
|
ctrlKey: false,
|
||||||
|
shiftKey: false,
|
||||||
|
which: false,
|
||||||
|
editable: true,
|
||||||
|
id: "navigateToProjectOverview",
|
||||||
|
tooltip: "Show project overview"
|
||||||
|
},
|
||||||
|
|
||||||
// Open app options - CTRL + ALT + J
|
// Open app options - CTRL + ALT + J
|
||||||
{
|
{
|
||||||
altKey: true,
|
altKey: true,
|
||||||
|
@ -231,6 +242,17 @@ export const defaultKeybinds = [
|
||||||
tooltip: "Toggle the Advanced search cheatsheet"
|
tooltip: "Toggle the Advanced search cheatsheet"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Toggle Note Board - CTRL + ALT + SHIFT + P
|
||||||
|
{
|
||||||
|
altKey: true,
|
||||||
|
ctrlKey: true,
|
||||||
|
shiftKey: true,
|
||||||
|
which: 80,
|
||||||
|
editable: true,
|
||||||
|
id: "toggleNoteCorkboard",
|
||||||
|
tooltip: "Toggle Note board"
|
||||||
|
},
|
||||||
|
|
||||||
// Next focus - Tab
|
// Next focus - Tab
|
||||||
{
|
{
|
||||||
altKey: false,
|
altKey: false,
|
||||||
|
@ -255,7 +277,7 @@ export const defaultKeybinds = [
|
||||||
note: "(functionality is the same as when using a web-browser)"
|
note: "(functionality is the same as when using a web-browser)"
|
||||||
},
|
},
|
||||||
|
|
||||||
// Open document coresponding to the tre node - Enter
|
// Open document coresponding to the tree node - Enter
|
||||||
{
|
{
|
||||||
altKey: false,
|
altKey: false,
|
||||||
ctrlKey: false,
|
ctrlKey: false,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
import { I_Blueprint } from "src/interfaces/I_Blueprint"
|
||||||
import { I_OpenedDocument } from "src/interfaces/I_OpenedDocument"
|
import { I_OpenedDocument } from "src/interfaces/I_OpenedDocument"
|
||||||
|
|
||||||
export const copyDocument = (currentDoc: I_OpenedDocument, newDocumentID: string) : I_OpenedDocument => {
|
export const copyDocument = (currentDoc: I_OpenedDocument, newDocumentID: string, documentBlueprint: I_Blueprint) : I_OpenedDocument => {
|
||||||
currentDoc._id = newDocumentID
|
currentDoc._id = newDocumentID
|
||||||
currentDoc.isNew = true
|
currentDoc.isNew = true
|
||||||
currentDoc.editMode = true
|
currentDoc.editMode = true
|
||||||
|
@ -38,5 +39,19 @@ export const copyDocument = (currentDoc: I_OpenedDocument, newDocumentID: string
|
||||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||||
currentDoc.extraFields[documentNameIndex].value = `Copy of - ${currentDoc.extraFields[documentNameIndex].value}`
|
currentDoc.extraFields[documentNameIndex].value = `Copy of - ${currentDoc.extraFields[documentNameIndex].value}`
|
||||||
|
|
||||||
|
currentDoc.extraFields.map(field => {
|
||||||
|
const fieldType = documentBlueprint.extraFields.find(blueprintField => field.id === blueprintField.id)?.type
|
||||||
|
|
||||||
|
if (fieldType === "singleToSingleRelationship") {
|
||||||
|
field.value = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fieldType === "manyToSingleRelationship") {
|
||||||
|
field.value = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return field
|
||||||
|
})
|
||||||
|
|
||||||
return currentDoc
|
return currentDoc
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,9 +15,16 @@ import path from "path"
|
||||||
export const createNewProject = async (projectName: string, vueRouter: any, quasar: any, vueInstance: any) => {
|
export const createNewProject = async (projectName: string, vueRouter: any, quasar: any, vueInstance: any) => {
|
||||||
await removeCurrentProject()
|
await removeCurrentProject()
|
||||||
|
|
||||||
const ProjectDB = new PouchDB("project-data")
|
if (!window.FA_dbs) {
|
||||||
|
// @ts-ignore
|
||||||
|
window.FA_dbs = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.FA_dbs["project-data"] = new PouchDB("project-data")
|
||||||
const newProject = { _id: projectName }
|
const newProject = { _id: projectName }
|
||||||
await ProjectDB.put(newProject)
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||||
|
window.FA_dbs["project-data"].put(newProject)
|
||||||
|
|
||||||
/*eslint-disable */
|
/*eslint-disable */
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
@ -49,8 +56,6 @@ export const createNewProject = async (projectName: string, vueRouter: any, quas
|
||||||
vueInstance.SSET_resetDocuments()
|
vueInstance.SSET_resetDocuments()
|
||||||
vueInstance.SSET_resetAllDocuments()
|
vueInstance.SSET_resetAllDocuments()
|
||||||
/* eslint-enable */
|
/* eslint-enable */
|
||||||
|
|
||||||
await ProjectDB.close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -283,9 +288,49 @@ export const mergeExistingProject = (vueRouter: any, Loading: any, loadingSetup:
|
||||||
* Retrieves current project name
|
* Retrieves current project name
|
||||||
*/
|
*/
|
||||||
export const retrieveCurrentProjectName = async () => {
|
export const retrieveCurrentProjectName = async () => {
|
||||||
const ProjectDB = new PouchDB("project-data")
|
if (!window.FA_dbs) {
|
||||||
const projectData = await ProjectDB.allDocs({ include_docs: true })
|
// @ts-ignore
|
||||||
await ProjectDB.close()
|
window.FA_dbs = {}
|
||||||
|
}
|
||||||
|
window.FA_dbs["project-data"] = new PouchDB("project-data")
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||||
|
const projectData = await window.FA_dbs["project-data"].allDocs({ include_docs: true })
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
return projectData?.rows[0]?.id
|
return projectData?.rows[0]?.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save corkboard update
|
||||||
|
*/
|
||||||
|
export const saveCorkboard = async (input: string) => {
|
||||||
|
if (!window.FA_dbs) {
|
||||||
|
// @ts-ignore
|
||||||
|
window.FA_dbs = {}
|
||||||
|
}
|
||||||
|
window.FA_dbs["project-data"] = new PouchDB("project-data")
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||||
|
const projectData = await window.FA_dbs["project-data"].allDocs({ include_docs: true })
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
|
projectData.rows[0].doc.corkboardText = input.trim()
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||||
|
window.FA_dbs["project-data"].put(projectData.rows[0].doc)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieve corkboard
|
||||||
|
*/
|
||||||
|
export const retrieveCorkboard = async (): Promise<string> => {
|
||||||
|
if (!window.FA_dbs) {
|
||||||
|
// @ts-ignore
|
||||||
|
window.FA_dbs = {}
|
||||||
|
}
|
||||||
|
window.FA_dbs["project-data"] = new PouchDB("project-data")
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||||
|
const projectData = await window.FA_dbs["project-data"].allDocs({ include_docs: true })
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||||
|
return (projectData.rows[0]?.doc.corkboardText) || ""
|
||||||
|
}
|
||||||
|
|
|
@ -5,6 +5,9 @@ import { FloatingWindowsStateInteface } from "./state"
|
||||||
const getters: GetterTree<FloatingWindowsStateInteface, StateInterface> = {
|
const getters: GetterTree<FloatingWindowsStateInteface, StateInterface> = {
|
||||||
getAdvSearchWindowVisible (context) {
|
getAdvSearchWindowVisible (context) {
|
||||||
return context.advSearchWindowVisible
|
return context.advSearchWindowVisible
|
||||||
|
},
|
||||||
|
getNoteCorkboardhWindowVisible (context) {
|
||||||
|
return context.noteCorkboardWindowVisible
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,10 @@ const mutation: MutationTree<FloatingWindowsStateInteface> = {
|
||||||
|
|
||||||
setAdvSearchWindowVisible (state: FloatingWindowsStateInteface) {
|
setAdvSearchWindowVisible (state: FloatingWindowsStateInteface) {
|
||||||
state.advSearchWindowVisible = uid()
|
state.advSearchWindowVisible = uid()
|
||||||
|
},
|
||||||
|
|
||||||
|
setNoteCorkboardWindowVisible (state: FloatingWindowsStateInteface) {
|
||||||
|
state.noteCorkboardWindowVisible = uid()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
export interface FloatingWindowsStateInteface {
|
export interface FloatingWindowsStateInteface {
|
||||||
advSearchWindowVisible: string,
|
advSearchWindowVisible: string,
|
||||||
|
noteCorkboardWindowVisible: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
function state (): FloatingWindowsStateInteface {
|
function state (): FloatingWindowsStateInteface {
|
||||||
return {
|
return {
|
||||||
advSearchWindowVisible: ""
|
advSearchWindowVisible: "",
|
||||||
|
noteCorkboardWindowVisible: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
|
|
||||||
- Fix file name symbols for OSs in new project names
|
|
||||||
- Add a way to view the project graph without closing all the documents
|
|
||||||
- Add checkbox or something for viewmode switch fields
|
|
||||||
- Consider adding color support for text shadow of individual documents
|
|
||||||
- Consider adding coloring to icons of documents separately
|
|
||||||
|
|
||||||
## THE GM BATCH
|
## THE GM BATCH
|
||||||
|
|
||||||
- Floating notes corkboard
|
- Add on-the-fly generation of non-existent 2-way relationships
|
||||||
- Add hover/on-demand document preview to relationships
|
- Add hover/on-demand document preview to relationships
|
||||||
|
|
||||||
- Export for MD/PDF/ODT/DOCX
|
- Export for MD/PDF/ODT/DOCX
|
||||||
|
@ -16,7 +10,6 @@
|
||||||
|
|
||||||
## THE GM BATCH END
|
## THE GM BATCH END
|
||||||
|
|
||||||
- Add debounce timer to input fields (bad sync updating with store)
|
|
||||||
- Add reverse list field option (dropdown first, value in bracket)
|
- Add reverse list field option (dropdown first, value in bracket)
|
||||||
- Rework stats (via reverse list)
|
- Rework stats (via reverse list)
|
||||||
- Add option for project graph to filter out categories or show them separately
|
- Add option for project graph to filter out categories or show them separately
|
||||||
|
@ -48,7 +41,10 @@
|
||||||
- Add description tabs
|
- Add description tabs
|
||||||
- Add category for materials/resources OR adapt Items category
|
- Add category for materials/resources OR adapt Items category
|
||||||
- Add category for diseases/curses/etc
|
- Add category for diseases/curses/etc
|
||||||
|
- Add category for classes/jobs
|
||||||
- Add support for individual document order hiding inside the hierarchical tree for each document
|
- Add support for individual document order hiding inside the hierarchical tree for each document
|
||||||
|
- Consider adding color support for text shadow of individual documents
|
||||||
|
- Consider adding coloring to icons of documents separately
|
||||||
|
|
||||||
### Project settings
|
### Project settings
|
||||||
|
|
||||||
|
@ -71,7 +67,6 @@
|
||||||
- Settings search
|
- Settings search
|
||||||
|
|
||||||
- Vanity project-wide word count (lol...)
|
- Vanity project-wide word count (lol...)
|
||||||
- Add on-the-fly generation of non-existent 2-way relationships
|
|
||||||
|
|
||||||
- Automatic thumbnail generation AND re-checking based on date
|
- Automatic thumbnail generation AND re-checking based on date
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue