diff --git a/src/App.vue b/src/App.vue index 35c10d1..6401433 100644 --- a/src/App.vue +++ b/src/App.vue @@ -13,6 +13,7 @@ import appWindowButtons from "src/components/appHeader/AppWindowButtons.vue" import PouchDB from "pouchdb" import { OptionsStateInteface } from "./store/module-options/state" import { colors } from "quasar" +import { tipsTricks } from "src/scripts/utilities/tipsTricks" @Component({ components: { @@ -32,6 +33,37 @@ export default class App extends BaseClass { this.loadSettings().catch(e => console.log(e)) window.addEventListener("keydown", this.triggerKeyPush) + this.loadHintPopup() + } + + popupCheck = 0 + + loadHintPopup () { + const options = this.SGET_options + + // Considering there is a bit of a delay between the initial load of the store DB content, we give the program 3 attempts to load the data over 3 seconds. If no is loaded in that time, we assume that the settings are not set at all and display the hint as normal. + if ((!options._id || !options._rev) && this.popupCheck < 3) { + setTimeout(() => { + this.popupCheck++ + this.loadHintPopup() + }, 1000) + return + } + + if (options.hideTooltipsStart) { + return + } + + const messageToShow = tipsTricks[Math.floor(Math.random() * tipsTricks.length)] + + this.$q.notify({ + timeout: 15000, + icon: "mdi-help", + type: "info", + message: "Did you know?", + caption: messageToShow, + actions: [{ icon: "mdi-close", color: "white" }] + }) } triggerKeyPush (e:any) { @@ -109,7 +141,7 @@ export default class App extends BaseClass { } else { colors.setBrand("dark", "#18303a") - colors.setBrand("primary", "#d7ac47") + colors.setBrand("primary", "#e8bb50") } } } diff --git a/src/components/DocumentControl.vue b/src/components/DocumentControl.vue index 6cfd557..6d21e3c 100644 --- a/src/components/DocumentControl.vue +++ b/src/components/DocumentControl.vue @@ -32,6 +32,12 @@ @trigger-dialog-close="keybindsDialogClose" /> + + +
@@ -71,6 +77,21 @@ + + + Open Tips, Tricks & Trivia + + + @@ -214,6 +235,7 @@ import existingDocumentDialog from "src/components/dialogs/ExistingDocument.vue" import deleteDocumentCheckDialog from "src/components/dialogs/DeleteDocumentCheck.vue" import advancedSearchGuideDialog from "src/components/dialogs/AdvancedSearchGuide.vue" import keybindCheatsheetDialog from "src/components/dialogs/KeybindCheatsheet.vue" +import tipsTricksTriviaDialog from "src/components/dialogs/TipsTricksTrivia.vue" import { I_OpenedDocument } from "src/interfaces/I_OpenedDocument" import { extend, Loading, QSpinnerGears } from "quasar" @@ -227,7 +249,8 @@ import { retrieveCurrentProjectName, exportProject } from "src/scripts/projectMa existingDocumentDialog, deleteDocumentCheckDialog, advancedSearchGuideDialog, - keybindCheatsheetDialog + keybindCheatsheetDialog, + tipsTricksTriviaDialog } }) export default class DocumentControl extends BaseClass { @@ -355,6 +378,19 @@ export default class DocumentControl extends BaseClass { this.existingObjectDialogTrigger = this.generateUID() } + /****************************************************************/ + // Tips, Tricka & Trivia dialog + /****************************************************************/ + + tipsTricksDialogTrigger: string | false = false + tipsTricksDialogClose () { + this.tipsTricksDialogTrigger = false + } + + tipsTricksAssignUID () { + this.tipsTricksDialogTrigger = this.generateUID() + } + /****************************************************************/ // Export project /****************************************************************/ diff --git a/src/components/appHeader/AppControl.vue b/src/components/appHeader/AppControl.vue index 7d76e8a..c408e62 100644 --- a/src/components/appHeader/AppControl.vue +++ b/src/components/appHeader/AppControl.vue @@ -65,6 +65,12 @@ @trigger-dialog-close="advancedSearchGuideDialogClose" /> + + + + + Tips, Tricks & Trivia + + + + + diff --git a/src/components/dialogs/ProgramSettings.vue b/src/components/dialogs/ProgramSettings.vue index a6cd1ca..b0ea000 100644 --- a/src/components/dialogs/ProgramSettings.vue +++ b/src/components/dialogs/ProgramSettings.vue @@ -116,6 +116,36 @@ /> +
+
+ Hide tips popup on start screen + + + Hides the start screen tips & tricks popup. + + +
+ + +
+ +
+
+ Hide tips on project screen + + + Hides all the social links on the Project overview screen. + + +
+ + +
+
Document view settings @@ -392,6 +422,7 @@