diff --git a/src/App.vue b/src/App.vue index b97e975..21ae0b6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,7 +11,7 @@ :width="425" :start-x="50" :start-y="150" - :actions="['close']" + :actions="['pin', 'close']" content-class="bg-gunmetal-light text-accent advSearchWindow" >
@@ -20,6 +20,37 @@
+ + +
+ + +
@@ -34,6 +65,7 @@ import { colors } from "quasar" import { tipsTricks } from "src/scripts/utilities/tipsTricks" import { shell } from "electron" import { summonAllPlusheForms } from "src/scripts/utilities/plusheMascot" +import { saveCorkboard, retrieveCorkboard } from "src/scripts/projectManagement/projectManagent" @Component({ components: { @@ -68,6 +100,8 @@ export default class App extends BaseClass { // Load the popup hint on start this.loadHintPopup() + + this.loadCorkboardCotent().catch(e => console.log(e)) } destroyed () { @@ -289,6 +323,34 @@ export default class App extends BaseClass { 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 /****************************************************************/ @@ -299,6 +361,11 @@ export default class App extends BaseClass { if (this.determineKeyBind("toggleAdvSearchCheatsheet")) { this.advSearchWindowVisible = !this.advSearchWindowVisible } + + // Toggle Note Board - CTRL + ALT + SHIFT + P + if (this.determineKeyBind("toggleNoteCorkboard")) { + this.corkboardWindowVisible = !this.corkboardWindowVisible + } } } diff --git a/src/BaseClass.ts b/src/BaseClass.ts index 49edce1..4f08093 100644 --- a/src/BaseClass.ts +++ b/src/BaseClass.ts @@ -40,14 +40,14 @@ export default class BaseClass extends Vue { } /** - * Async wait for XY miliseconds + * Async wait for XY miliseconds */ sleep (ms:number) { return new Promise(resolve => setTimeout(resolve, ms)) } /** - * Strip all tags from a string + * Strip all tags from a string */ stripTags (input: string) { return (input) ? input.replace(/<[^>]+>/g, "") : input @@ -60,6 +60,9 @@ export default class BaseClass extends Vue { @FloatingWindows.Getter("getAdvSearchWindowVisible") SGET_getAdvSearchWindowVisible!: string @FloatingWindows.Mutation("setAdvSearchWindowVisible") SSET_setAdvSearchWindowVisible!: () => void + @FloatingWindows.Getter("getNoteCorkboardhWindowVisible") SGET_getNoteCorkboardhWindowVisible!: string + @FloatingWindows.Mutation("setNoteCorkboardWindowVisible") SSET_setNoteCorkboardWindowVisible!: () => void + /****************************************************************/ // KEYBINDS MANAGEMENT /****************************************************************/ diff --git a/src/components/DocumentControl.vue b/src/components/DocumentControl.vue index 3df41ba..a37059e 100644 --- a/src/components/DocumentControl.vue +++ b/src/components/DocumentControl.vue @@ -137,6 +137,21 @@ + + + Show note board + + + + + Show note board + + + + + - Resume project + Show project overview - + @@ -563,6 +578,11 @@ export default class AppControl extends BaseClass { if (this.determineKeyBind("openAppOptions") && !this.SGET_getDialogsState) { this.programSettingsDialogAssignUID() } + + // App options + if (this.determineKeyBind("navigateToProjectOverview") && this.projectExists && !this.isProjectPage) { + this.navigateToProjectPage() + } } /****************************************************************/ diff --git a/src/components/appHeader/TopTabs.vue b/src/components/appHeader/TopTabs.vue index b827d56..af90a05 100644 --- a/src/components/appHeader/TopTabs.vue +++ b/src/components/appHeader/TopTabs.vue @@ -413,7 +413,8 @@ export default class TopTabs extends BaseClass { copyTargetDocument (currentDoc: I_OpenedDocument) { 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 = { doc: newDocument, diff --git a/src/components/dialogs/ExistingDocument.vue b/src/components/dialogs/ExistingDocument.vue index 7f3b921..e18227e 100644 --- a/src/components/dialogs/ExistingDocument.vue +++ b/src/components/dialogs/ExistingDocument.vue @@ -545,7 +545,8 @@ export default class ExistingDocumentDialog extends DialogBase { copyTargetDocument (currentDoc: I_OpenedDocument) { 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 = { doc: newDocument, diff --git a/src/components/dialogs/ProgramSettings.vue b/src/components/dialogs/ProgramSettings.vue index eed953e..5280ce0 100644 --- a/src/components/dialogs/ProgramSettings.vue +++ b/src/components/dialogs/ProgramSettings.vue @@ -185,10 +185,10 @@
- Hide tips on project screen + Hide tips on project overview - Hides the project screen tips & tricks info card. + Hides the project overview tips & tricks info card.
diff --git a/src/components/fields/Field_MultiRelationship.vue b/src/components/fields/Field_MultiRelationship.vue index b09cf21..e1c47da 100644 --- a/src/components/fields/Field_MultiRelationship.vue +++ b/src/components/fields/Field_MultiRelationship.vue @@ -799,7 +799,8 @@ export default class Field_MultiRelationship extends FieldBase { copyTargetDocument (currentDoc: I_OpenedDocument) { 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 = { doc: newDocument, diff --git a/src/components/fields/Field_SingleRelationship.vue b/src/components/fields/Field_SingleRelationship.vue index bf2f9a1..d12ef63 100644 --- a/src/components/fields/Field_SingleRelationship.vue +++ b/src/components/fields/Field_SingleRelationship.vue @@ -733,7 +733,8 @@ export default class Field_SingleRelationship extends FieldBase { copyTargetDocument (currentDoc: I_OpenedDocument) { 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 = { doc: newDocument, diff --git a/src/components/fields/Field_Switch.vue b/src/components/fields/Field_Switch.vue index b10a33b..4bfdfc5 100644 --- a/src/components/fields/Field_Switch.vue +++ b/src/components/fields/Field_Switch.vue @@ -10,8 +10,26 @@
+
+
+ + + Active + +
+
+ diff --git a/src/components/fields/Field_Wysiwyg.vue b/src/components/fields/Field_Wysiwyg.vue index e168dd1..12d87d7 100644 --- a/src/components/fields/Field_Wysiwyg.vue +++ b/src/components/fields/Field_Wysiwyg.vue @@ -1,13 +1,16 @@