-
+
+
+
{{inputDataBluePrint.name}}
+
+
-
Project screen for
+ Project overview for
{{projectName}}
@@ -164,7 +164,7 @@ export default class ProjectScreen extends BaseClass {
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
diff --git a/src/scripts/appSettings/defaultKeybinds.ts b/src/scripts/appSettings/defaultKeybinds.ts
index d16af61..466c335 100644
--- a/src/scripts/appSettings/defaultKeybinds.ts
+++ b/src/scripts/appSettings/defaultKeybinds.ts
@@ -11,6 +11,17 @@ export const defaultKeybinds = [
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
{
altKey: true,
@@ -231,6 +242,17 @@ export const defaultKeybinds = [
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
{
altKey: false,
@@ -255,7 +277,7 @@ export const defaultKeybinds = [
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,
ctrlKey: false,
diff --git a/src/scripts/documentActions/copyDocument.ts b/src/scripts/documentActions/copyDocument.ts
index cfac6f9..b3c7a14 100644
--- a/src/scripts/documentActions/copyDocument.ts
+++ b/src/scripts/documentActions/copyDocument.ts
@@ -1,6 +1,7 @@
+import { I_Blueprint } from "src/interfaces/I_Blueprint"
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.isNew = 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
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
}
diff --git a/src/scripts/projectManagement/projectManagent.ts b/src/scripts/projectManagement/projectManagent.ts
index cf76be6..6599f62 100644
--- a/src/scripts/projectManagement/projectManagent.ts
+++ b/src/scripts/projectManagement/projectManagent.ts
@@ -15,9 +15,16 @@ import path from "path"
export const createNewProject = async (projectName: string, vueRouter: any, quasar: any, vueInstance: any) => {
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 }
- await ProjectDB.put(newProject)
+
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
+ window.FA_dbs["project-data"].put(newProject)
/*eslint-disable */
// @ts-ignore
@@ -49,8 +56,6 @@ export const createNewProject = async (projectName: string, vueRouter: any, quas
vueInstance.SSET_resetDocuments()
vueInstance.SSET_resetAllDocuments()
/* eslint-enable */
-
- await ProjectDB.close()
}
/**
@@ -283,9 +288,49 @@ export const mergeExistingProject = (vueRouter: any, Loading: any, loadingSetup:
* Retrieves current project name
*/
export const retrieveCurrentProjectName = async () => {
- const ProjectDB = new PouchDB("project-data")
- const projectData = await ProjectDB.allDocs({ include_docs: true })
- await ProjectDB.close()
+ 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]?.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 => {
+ 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) || ""
+}
diff --git a/src/store/module-floatingWindows/getters.ts b/src/store/module-floatingWindows/getters.ts
index 76a5e25..94a5d55 100644
--- a/src/store/module-floatingWindows/getters.ts
+++ b/src/store/module-floatingWindows/getters.ts
@@ -5,6 +5,9 @@ import { FloatingWindowsStateInteface } from "./state"
const getters: GetterTree = {
getAdvSearchWindowVisible (context) {
return context.advSearchWindowVisible
+ },
+ getNoteCorkboardhWindowVisible (context) {
+ return context.noteCorkboardWindowVisible
}
}
diff --git a/src/store/module-floatingWindows/mutations.ts b/src/store/module-floatingWindows/mutations.ts
index 73649ae..4897d46 100644
--- a/src/store/module-floatingWindows/mutations.ts
+++ b/src/store/module-floatingWindows/mutations.ts
@@ -6,6 +6,10 @@ const mutation: MutationTree = {
setAdvSearchWindowVisible (state: FloatingWindowsStateInteface) {
state.advSearchWindowVisible = uid()
+ },
+
+ setNoteCorkboardWindowVisible (state: FloatingWindowsStateInteface) {
+ state.noteCorkboardWindowVisible = uid()
}
}
diff --git a/src/store/module-floatingWindows/state.ts b/src/store/module-floatingWindows/state.ts
index 92418ed..01115a3 100644
--- a/src/store/module-floatingWindows/state.ts
+++ b/src/store/module-floatingWindows/state.ts
@@ -1,11 +1,12 @@
export interface FloatingWindowsStateInteface {
advSearchWindowVisible: string,
-
+ noteCorkboardWindowVisible: string,
}
function state (): FloatingWindowsStateInteface {
return {
- advSearchWindowVisible: ""
+ advSearchWindowVisible: "",
+ noteCorkboardWindowVisible: ""
}
}
diff --git a/suggestionList.md b/suggestionList.md
index 77d6699..64bbfb7 100644
--- a/suggestionList.md
+++ b/suggestionList.md
@@ -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
-- Floating notes corkboard
+- Add on-the-fly generation of non-existent 2-way relationships
- Add hover/on-demand document preview to relationships
- Export for MD/PDF/ODT/DOCX
@@ -16,7 +10,6 @@
## 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)
- Rework stats (via reverse list)
- Add option for project graph to filter out categories or show them separately
@@ -48,7 +41,10 @@
- Add description tabs
- Add category for materials/resources OR adapt Items category
- 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
+- Consider adding color support for text shadow of individual documents
+- Consider adding coloring to icons of documents separately
### Project settings
@@ -71,7 +67,6 @@
- Settings search
- 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