0.1.1 version release

This commit is contained in:
Elvanos 2021-02-20 13:06:21 +01:00
parent 7dd85e4a95
commit 7dea02cb49
42 changed files with 2280 additions and 847 deletions

48
changelog.md Normal file
View file

@ -0,0 +1,48 @@
# Changelog
## 0.1.1
### Bugfixes
- Fixed a bunch of typos
- Fixed names not changing with single/multi relatinships if one gets name updated showing on the others properly
- Fixed forced lower-case for notes in lists and relashionship fields
### New features
- Added keyboard shorcut support
- Added quick-add new document pop-up
- Added quick-search existing document pop-up
- Added keybind cheetcheet pop-up
- Added control buttons for keybind cheetsheet, quick search and quick add
- Added document coloring support for the document hierarchical tree and tabs on the top
- Added category/document switch for handling custom subcategories
- Added tooltip support for all input fields
- Added "Color picker" type field
- Added "Switch" type field
### QoL adjustments
- Alphabetically sorted most predefined lists (eg: types of political groups) with "Other/Unique" fields at the bottom. The fields that are ordered logically (eg: severity of racial weakness/strength) remain ordered via the logical sorting and not by alphabet
- Added explanation via tooltip to "Belongs under", "Order" and "Color" fields
- Adjusted tooltip font-size to be actually readable
- Added program FAVICON support
- Moved the document edit/save/delet buttons to the top
- Adjusted text selection to look better with the aesthetics of the app
- Adjusted scrollbars to look better with the aesthetics of the app
- Added auto-focus on name field when opening edit mode of a document
- Added auto-focus AND auto-select of all text of the name field when creating new document
- Renamed "Lore notes" to "Other/Notes" for more intuitive usage
- Remamed "Other names" to "Other names & Epithets" across all document types
- Renamed "Power level" to "Combat rating" in "Characters" document type
- Renamed "Level of sentience" to "Level of sapience" in "Species/Races" document type
- Added "Oldest known" and "Average adulthood" fields to "Species/Races" document type
- Added "Continent" and "Landmass" to prefilled options to "Location type" field in "Locations" document type
- Added "Ethnicity" field in "Characters" document type
- Added "Titles" field in "Characters" document type
---
## 0.1.0
### Innitial release

View file

@ -1,6 +1,6 @@
{
"name": "fantasiaarchive",
"version": "0.1.0",
"version": "0.1.1",
"description": "A database manager for world building",
"productName": "Fantasia archive",
"author": "Elvanos <elvanos66@gmail.com>",

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View file

@ -138,6 +138,7 @@ export default class BaseClass extends Vue {
@Blueprints.Getter("getBlueprint") SGET_blueprint!: (type: string) => I_Blueprint
@Blueprints.Mutation("setAllBlueprints") SSET_allBlueprints!: (input: I_Blueprint[]) => void
@Blueprints.Mutation("setBlueprint") SSET_blueprint!: (input: I_Blueprint) => void
addNewObjectType (e: I_NewObjectTrigger) {
// console.log(e.id)

View file

@ -1,191 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="67.407623mm"
height="62.908276mm"
viewBox="0 0 238.84591 222.90334"
id="svg3570"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="quasar-logo-full.svg">
<defs
id="defs3572" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.979899"
inkscape:cx="-39.753589"
inkscape:cy="27.706388"
inkscape:document-units="px"
inkscape:current-layer="g4895-4-4"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata3575">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-277.71988,-312.33911)">
<g
id="g4895-4-4"
transform="translate(1419.0442,398.9018)">
<g
transform="translate(-29.620665,-4)"
id="g4579-2-20">
<g
id="g4445-2-0"
transform="translate(12.499948,7.809312)">
<g
inkscape:export-ydpi="44.860481"
inkscape:export-xdpi="44.860481"
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
transform="translate(-712.85583,-503.26814)"
id="g4561-6-7-0">
<g
transform="translate(16.233481,0)"
style="font-style:normal;font-weight:normal;font-size:50.25774765px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#263238;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="flowRoot4513-6-6-08">
<path
d="m -402.73125,631.46823 q -0.6125,0.0438 -1.3125,0.0875 -0.65625,0 -1.4,0 l -9.31875,0 q -12.81875,0 -12.81875,-8.44375 l 0,-13.475 q 0,-8.26875 12.6,-8.26875 l 9.75625,0 q 12.6,0 12.6,8.26875 l 0,13.475 q 0,5.03125 -4.4625,7.04375 l 3.10625,2.14375 q 1.35625,0.83125 1.35625,1.70625 0,0.875 -0.7,1.3125 -0.65625,0.48125 -1.88125,0.48125 -0.30625,0 -0.7875,-0.13125 -0.4375,-0.0875 -1.05,-0.48125 l -5.6875,-3.71875 z m 5.38125,-21.74375 q 0,-4.76875 -7.9625,-4.76875 l -9.58125,0 q -7.9625,0 -7.9625,4.76875 l 0,13.3875 q 0,4.94375 8.3125,4.94375 l 8.88125,0 q 8.3125,0 8.3125,-4.94375 l 0,-13.3875 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3428" />
<path
d="m -368.0585,631.64323 q -11.2875,0 -11.2875,-6.9125 l 0,-12.73125 q 0,-1.8375 2.31875,-1.8375 2.31875,0 2.31875,1.8375 l 0,12.775 q 0,3.325 6.475,3.325 l 8.3125,0 q 6.475,0 6.475,-3.325 l 0,-12.775 q 0,-1.8375 2.31875,-1.8375 2.3625,0 2.3625,1.8375 l 0,12.73125 q 0,6.9125 -11.2875,6.9125 l -8.00625,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3430" />
<path
d="m -327.2833,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3432" />
<path
d="m -262.77031,626.74323 q 0,4.9 -9.975,4.9 l -17.0625,0 q -2.1875,0 -2.1875,-1.70625 0,-1.70625 2.1875,-1.70625 l 17.0625,0 q 5.38125,0 5.38125,-1.4875 l 0,-2.45 q 0,-1.4875 -5.38125,-1.4875 l -9.0125,0 q -9.975,0 -9.975,-4.76875 l 0,-2.05625 q 0,-5.6 10.28125,-5.6 l 5.99375,0 q 2.23125,0 2.23125,1.75 0,0.875 -0.6125,1.3125 -0.56875,0.39375 -1.61875,0.39375 l -5.99375,0 q -5.73125,0 -5.73125,2.14375 l 0,1.925 q 0,1.79375 5.6875,1.79375 l 9.0125,0 q 9.7125,0 9.7125,4.4625 l 0,2.58125 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3434" />
<path
d="m -241.91709,631.64323 q -9.3625,0 -9.3625,-5.81875 l 0,-2.49375 q 0,-5.775 9.3625,-5.775 l 18.59375,0 0,-0.65625 q 0,-3.0625 -5.38125,-3.0625 l -6.16875,0 q -2.1875,0 -2.1875,-1.70625 0,-1.75 2.1875,-1.75 l 6.16875,0 q 9.93125,0 9.93125,6.51875 l 0,8.575 q 0,6.16875 -9.5375,6.16875 l -13.60625,0 z m 13.34375,-3.4125 q 5.25,0 5.25,-2.8875 l 0,-4.76875 -18.24375,0 q -5.11875,0 -5.11875,2.66875 l 0,2.275 q 0,2.7125 5.11875,2.7125 l 12.99375,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3436" />
<path
d="m -205.62285,617.33698 q 0,-6.95625 11.2875,-6.95625 l 3.36875,0 q 2.23125,0 2.23125,1.79375 0,1.79375 -2.23125,1.79375 l -3.54375,0 q -6.475,0 -6.475,3.28125 l 0,12.775 q 0,1.8375 -2.31875,1.8375 -2.31875,0 -2.31875,-1.8375 l 0,-12.6875 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:43.75px;font-family:'Neuropol X';-inkscape-font-specification:'Neuropol X';text-align:start;letter-spacing:5px;word-spacing:0px;text-anchor:start;fill:#263238;fill-opacity:1"
id="path3438" />
</g>
</g>
</g>
</g>
<g
id="g5443-0-1-5-1-9"
transform="matrix(0.55595317,0,0,0.55595317,-521.93484,-328.66104)"
inkscape:export-filename="/home/emanuele/Desktop/logo1.png"
inkscape:export-xdpi="44.860481"
inkscape:export-ydpi="44.860481">
<g
inkscape:export-ydpi="3.4165223"
inkscape:export-xdpi="3.4165223"
transform="matrix(0.09527033,0,0,0.09527033,-1695.2716,706.62921)"
id="g8856-6-1-1-9-0-1-9">
<circle
r="1485"
cy="-1361.2571"
cx="8317.3574"
id="circle8858-1-3-7-6-5-3-0"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:50;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
inkscape:export-xdpi="10.031387"
inkscape:export-ydpi="10.031387" />
<path
inkscape:export-ydpi="10.031387"
inkscape:export-xdpi="10.031387"
style="opacity:1;fill:#263238;fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8560.3823,-1361.3029 a 242.947,242.947 0 0 1 -242.947,242.948 242.947,242.947 0 0 1 -242.947,-242.948 242.947,242.947 0 0 1 242.947,-242.946 242.947,242.947 0 0 1 242.947,242.946 z"
id="path8860-5-4-8-2-9-0-9"
inkscape:connector-curvature="0" />
<path
id="path8862-5-5-9-1-3-6-3"
d="m 9395.8755,-1984.028 a 1245.372,1245.372 0 0 0 -190.8415,-249.4971 l -280.8618,162.1556 c -87.542,-74.7796 -187.0349,-132.0588 -293.2407,-169.9527 -95.8868,97.1766 -172.0602,205.7604 -226.9672,323.8487 312.6411,-21.2772 635.5313,91.8725 935.2898,326.0721 l 176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -120.1398,-290.5734 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="-514.04855"
inkscape:transform-center-y="-444.04649" />
<path
inkscape:transform-center-y="265.80217"
inkscape:transform-center-x="-689.63727"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 9395.9474,-738.70387 a 1245.372,1245.372 0 0 0 120.6501,-290.02213 l -280.8618,-162.1557 c 20.99,-113.2034 20.8488,-228.0063 0.563,-338.9302 -132.1008,-34.4521 -264.2238,-46.1283 -393.9448,-34.635 174.7471,260.1165 238.2017,596.32248 185.2582,973.02076 l 176.7612,102.05309 a 1245.372,1245.372 0 0 0 191.5741,-249.33082 z"
id="path8864-4-8-1-2-4-4-4" />
<path
id="path8866-7-5-5-0-6-4-7"
d="m 8317.501,-115.97954 a 1245.372,1245.372 0 0 0 311.4916,-40.52501 l 0,-324.31131 c 108.5321,-38.42382 207.8837,-95.94755 293.8037,-168.97752 -36.214,-131.6287 -92.1636,-251.88868 -166.9776,-358.48372 -137.894,281.39369 -397.3296,504.44998 -750.0316,646.9487 l 0,204.10623 a 1245.372,1245.372 0 0 0 311.7139,41.24263 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="-117.49007"
inkscape:transform-center-y="639.34029" />
<path
inkscape:transform-center-y="444.04652"
inkscape:transform-center-x="514.04857"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 7238.9827,-738.57936 a 1245.372,1245.372 0 0 0 190.8415,249.49714 l 280.8618,-162.15566 c 87.5421,74.77965 187.0349,132.05879 293.2407,169.95271 95.8868,-97.17659 172.0602,-205.76036 226.9672,-323.8487 -312.6411,21.27714 -635.5313,-91.87254 -935.2898,-326.07203 l -176.7612,102.0531 a 1245.372,1245.372 0 0 0 120.1398,290.57344 z"
id="path8868-6-7-4-7-2-7-3" />
<path
id="path8870-5-3-9-3-5-5-1"
d="m 7238.9108,-1983.9035 a 1245.372,1245.372 0 0 0 -120.6501,290.0221 l 280.8618,162.1557 c -20.99,113.2035 -20.8488,228.0063 -0.563,338.9302 132.1008,34.4521 264.2238,46.1283 393.9448,34.635 -174.7471,-260.1165 -238.2017,-596.3225 -185.2582,-973.0207 l -176.7612,-102.0532 a 1245.372,1245.372 0 0 0 -191.5741,249.3309 z"
clip-path="none"
mask="none"
style="fill:#1976d2;fill-opacity:1"
inkscape:connector-curvature="0"
inkscape:transform-center-x="689.63729"
inkscape:transform-center-y="-265.80221" />
<path
inkscape:transform-center-y="-639.34032"
inkscape:transform-center-x="117.49005"
inkscape:connector-curvature="0"
style="fill:#42a5f5;fill-opacity:1"
mask="none"
clip-path="none"
d="m 8317.3572,-2606.6279 a 1245.372,1245.372 0 0 0 -311.4915,40.525 l -1e-4,324.3113 c -108.5321,38.4239 -207.8837,95.9476 -293.8037,168.9776 36.214,131.6287 92.1637,251.8886 166.9776,358.4837 137.894,-281.3937 397.3296,-504.45 750.0316,-646.9487 l 1e-4,-204.1063 a 1245.372,1245.372 0 0 0 -311.714,-41.2426 z"
id="path8872-6-3-2-1-3-3-7" />
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

View file

@ -0,0 +1,114 @@
<template>
<div>
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md" min="1"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<q-list
v-if="!editMode"
dense>
<q-item>
<q-item-section>
<div class="colorIndicatorWrapper">
<div class="colorIndicator" :style="`background-color: ${localInput}`">
</div>
{{localInput}}
</div>
</q-item-section>
</q-item>
</q-list>
<q-input
v-if="editMode"
v-model.number="localInput"
type="text"
@keyup="signalInput"
outlined
dense
>
<template v-slot:prepend>
<div class="colorIndicator" :style="`background-color: ${localInput}`">
</div>
</template>
<template v-slot:append>
<q-icon name="colorize" class="cursor-pointer">
<q-popup-proxy transition-show="scale" transition-hide="scale">
<q-color
@input="signalInput"
v-model="localInput"
/>
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<div class="separatorWrapper">
<q-separator color="grey q-mt-lg" />
</div>
</div>
</template>
<script lang="ts">
import { Component, Emit, Prop, Watch } from "vue-property-decorator"
import BaseClass from "src/BaseClass"
import { I_ExtraFields } from "src/interfaces/I_Blueprint"
@Component({
components: { }
})
export default class Field_ColorPicker extends BaseClass {
@Prop({ default: [] }) readonly inputDataBluePrint!: I_ExtraFields
@Prop({ default: null }) readonly inputDataValue!: null|number
@Prop() readonly editMode!: boolean
@Prop() readonly isNew!: boolean
changedInput = false
localInput: null|number = null
@Emit()
signalInput () {
this.changedInput = true
return this.localInput
}
get inputIcon () {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
@Watch("inputDataValue", { deep: true, immediate: true })
reactToInputChanges () {
this.localInput = this.inputDataValue
}
}
</script>
<style lang="scss" scoped>
.colorIndicator {
width: 20px;
height: 20px;
background-color: transparent;
}
.colorIndicatorWrapper {
display: flex;
margin-left: -15px;
.colorIndicator {
margin-right: 15px;
}
}
</style>

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<q-list
@ -15,7 +20,7 @@
<q-item-section>
<span>
{{input.value}}
<span v-if="localInput[index].affix" class="inline-block q-ml-xs text-italic text-lowercase">
<span v-if="localInput[index].affix" class="inline-block q-ml-xs text-italic">
({{localInput[index].affix}})
</span>
</span>
@ -130,6 +135,10 @@ export default class Field_List extends BaseClass {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
get hasExtraInput () {
// @ts-ignore
this.localExtraInput = this.inputDataBluePrint?.predefinedListExtras?.extraSelectValueList

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
<q-icon v-if="isOneWayRelationship" name="mdi-arrow-right-bold" size="16px" class="q-ml-md">
<q-tooltip>
This is a one-way relationship. <br> Editing this value <b>will not</b> have effect on the connected document/s.
@ -28,7 +33,7 @@
@click="openExistingDocument(single)">
<q-item-section>
{{single.label}}
<span class="inline-block q-ml-xs text-italic text-lowercase connectionNote">
<span class="inline-block q-ml-xs text-italic connectionNote">
{{retrieveNoteText(single._id)}}
</span>
</q-item-section>
@ -138,6 +143,10 @@ export default class Field_SingleRelationship extends BaseClass {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
extraInput: I_FieldRelationship[] = []
filteredInput: I_FieldRelationship[] = []
@ -202,6 +211,7 @@ export default class Field_SingleRelationship extends BaseClass {
disable: isDisabled,
url: `/project/display-content/${objectDoc.type}/${objectDoc._id}`,
label: objectDoc.extraFields.find(e => e.id === "name")?.value,
isCategory: objectDoc.extraFields.find(e => e.id === "categorySwitch")?.value,
pairedField: pairedField
}
}) as unknown as I_FieldRelationship[]
@ -215,11 +225,19 @@ export default class Field_SingleRelationship extends BaseClass {
if (!allObjectsWithoutCurrent.find(e => e._id === s._id)) {
// @ts-ignore
this.localInput.splice(index, 1)
} else {
const matchedFieldContent = allObjectsWithoutCurrent.find(e => e._id === s._id)
if (matchedFieldContent) {
this.localInput[index].label = matchedFieldContent.label
}
}
}
})
this.extraInput = allObjectsWithoutCurrent
const allObjectsWithoutCategories: I_FieldRelationship[] = allObjectsWithoutCurrent.filter((obj) => !obj.isCategory)
this.extraInput = allObjectsWithoutCategories
}
}

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<q-list
@ -75,6 +80,10 @@ export default class Field_MultiSelect extends BaseClass {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
extraInput: string[] = []
@Watch("inputDataBluePrint", { deep: true, immediate: true })

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md" min="1"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<q-list
@ -60,6 +65,10 @@ export default class Field_Number extends BaseClass {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
@Watch("inputDataValue", { deep: true, immediate: true })
reactToInputChanges () {
this.localInput = this.inputDataValue

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
<q-icon v-if="isOneWayRelationship" name="mdi-arrow-right-bold" size="16px" class="q-ml-md">
<q-tooltip>
This is a one-way relationship. <br> Editing this value <b>will not</b> have effect on the connected document/s.
@ -13,7 +18,6 @@
This is a two-way relationship. <br> Editing this value <b>will</b> also effect the connected document/s.
</q-tooltip>
</q-icon>
</div>
<q-list
@ -26,8 +30,8 @@
@click="openExistingDocument(localInput)">
<q-item-section>
{{localInput.label}}
<span class="inline-block q-ml-xs text-italic text-lowercase connectionNote">
{{retrieveNoteText(localInput._id)}}
<span class="inline-block q-ml-xs text-italic connectionNote">
{{retrieveNoteText()}}
</span>
</q-item-section>
</q-item>
@ -135,6 +139,10 @@ export default class Field_SingleRelationship extends BaseClass {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
get inputFieldID () {
return this.inputDataBluePrint?.id
}
@ -202,20 +210,32 @@ export default class Field_SingleRelationship extends BaseClass {
disable: isDisabled,
url: `/project/display-content/${objectDoc.type}/${objectDoc._id}`,
label: objectDoc.extraFields.find(e => e.id === "name")?.value,
isCategory: objectDoc.extraFields.find(e => e.id === "categorySwitch")?.value,
pairedField: pairedField
}
}) as unknown as I_FieldRelationship[]
const allObjectsWithoutCurrent: I_FieldRelationship[] = allObjects.filter((obj) => obj._id !== this.currentId)
const isBelongsUnder = (this.inputDataBluePrint.id === "parentDoc")
const allObjectsWithoutCategories: I_FieldRelationship[] = allObjects.filter((obj) => !obj.isCategory)
const objectsWithoutCurrent: I_FieldRelationship[] = (isBelongsUnder)
? allObjects.filter((obj) => obj._id !== this.currentId)
: allObjectsWithoutCategories.filter((obj) => obj._id !== this.currentId)
if (this.localInput._id) {
if (!allObjectsWithoutCurrent.find(e => e._id === this.localInput._id)) {
if (!objectsWithoutCurrent.find(e => e._id === this.localInput._id)) {
// @ts-ignore
this.localInput = ""
} else {
const matchedFieldContent = objectsWithoutCurrent.find(e => e._id === this.localInput._id)
if (matchedFieldContent) {
this.localInput.label = matchedFieldContent.label
}
}
}
this.extraInput = allObjectsWithoutCurrent
this.extraInput = objectsWithoutCurrent
}
}

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<q-list
@ -70,6 +75,10 @@ export default class Field_SingleSelect extends BaseClass {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
extraInput: string[] = []
@Watch("inputDataBluePrint", { deep: true, immediate: true })

View file

@ -0,0 +1,64 @@
<template>
<div>
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md" min="1"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<q-toggle
:disable="!editMode"
v-model="localInput"
@input="signalInput"
/>
<div class="separatorWrapper">
<q-separator color="grey q-mt-lg" />
</div>
</div>
</template>
<script lang="ts">
import { Component, Emit, Prop, Watch } from "vue-property-decorator"
import BaseClass from "src/BaseClass"
import { I_ExtraFields } from "src/interfaces/I_Blueprint"
@Component({
components: { }
})
export default class Field_Switch extends BaseClass {
@Prop({ default: [] }) readonly inputDataBluePrint!: I_ExtraFields
@Prop({ default: false }) readonly inputDataValue!: boolean
@Prop() readonly editMode!: boolean
@Prop() readonly isNew!: boolean
changedInput = false
localInput: null|boolean = null
@Emit()
signalInput () {
this.changedInput = true
return this.localInput
}
get inputIcon () {
return this.inputDataBluePrint?.icon
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
@Watch("inputDataValue", { immediate: true })
reactToInputChanges () {
this.localInput = (typeof this.inputDataValue === "boolean") ? this.inputDataValue : false
}
}
</script>

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<q-list
@ -21,6 +26,7 @@
@keyup="signalInput"
outlined
dense
:ref="`textField${this.inputDataBluePrint.id}`"
>
<template v-slot:append v-if="isNew && !changedInput && localInput.length > 0">
<q-icon name="close" @click="deletePlaceholder()" class="cursor-pointer" />
@ -65,10 +71,31 @@ export default class Field_Text extends BaseClass {
return this.localInput
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
get inputIcon () {
return this.inputDataBluePrint?.icon
}
@Watch("editMode", { immediate: true })
checkForNameFields () {
if (this.inputDataBluePrint?.id === "name" && this.editMode === true) {
this.$nextTick(function () {
/*eslint-disable */
// @ts-ignore
this.$refs[`textField${this.inputDataBluePrint.id}`].focus()
if(this.isNew && !this.changedInput && this.localInput.length > 0){
// @ts-ignore
this.$refs[`textField${this.inputDataBluePrint.id}`].select()
}
/* eslint-enable */
})
}
}
@Watch("inputDataValue", { deep: true, immediate: true })
reactToInputChanges () {
this.localInput = this.inputDataValue

View file

@ -3,6 +3,11 @@
<div class="flex justify-start items-center text-weight-bolder q-mb-sm q-mt-md">
<q-icon v-if="inputIcon" :name="inputIcon" :size="inputIcon.includes('fas')? '15px': '20px'" class="q-mr-md"/>
{{inputDataBluePrint.name}}
<q-icon v-if="toolTip" name="mdi-help-circle" size="16px" class="q-ml-md">
<q-tooltip>
<span v-html="toolTip"/>
</q-tooltip>
</q-icon>
</div>
<div v-if="!editMode" v-html="localInput">
@ -51,6 +56,10 @@ export default class Field_Wysiwyg extends BaseClass {
return this.localInput
}
get toolTip () {
return this.inputDataBluePrint?.tooltip
}
get inputIcon () {
return this.inputDataBluePrint?.icon
}

View file

@ -23,10 +23,11 @@
<template v-slot:default-header="prop">
<div class="row items-center col-grow">
<q-icon
:style="`color: ${prop.node.color}; width: 22px !important;`"
:size="(prop.node.icon.includes('fas')? '16px': '21px')"
:name="prop.node.icon"
class="q-mr-sm" />
<div class="documentLabel">
<div class="documentLabel" :style="`color: ${prop.node.color}`">
{{ prop.node.label }}
<span
class="text-primary text-weight-medium"
@ -80,12 +81,13 @@
</template>
<script lang="ts">
import { Component, Watch } from "vue-property-decorator"
import { Component, Watch, Prop } from "vue-property-decorator"
import BaseClass from "src/BaseClass"
import { I_ShortenedDocument } from "src/interfaces/I_OpenedDocument"
import { I_NewObjectTrigger } from "src/interfaces/I_NewObjectTrigger"
import PouchDB from "pouchdb"
import { I_KeyPressObject } from "src/interfaces/I_KeypressObject"
import { engageBlueprints, retrieveAllBlueprints } from "src/databaseManager/blueprintManager"
// import { cleanDatabases } from "src/databaseManager/cleaner"
import { I_Blueprint } from "src/interfaces/I_Blueprint"
@ -99,6 +101,23 @@ const menuAddNewItem = {
components: { }
})
export default class ObjectTree extends BaseClass {
@Prop() readonly pushedKey!: I_KeyPressObject
@Watch("pushedKey", { deep: true })
processKeyPress (keypress: I_KeyPressObject) {
// Focus left tree search - CTRL + SHIFT + Q
if (keypress.shiftKey && keypress.ctrlKey && !keypress.altKey && keypress.keyCode === 81) {
// @ts-ignore
const treeFilterDOM = this.$refs.treeFilter as unknown as HTMLInputElement
treeFilterDOM.focus()
}
// Clear input in the left tree search - CTRL + SHIFT + W
if (keypress.shiftKey && keypress.ctrlKey && !keypress.altKey && keypress.keyCode === 87) {
this.resetTreeFilter()
}
}
menuAddNewItem = menuAddNewItem
treeList: {children: I_ShortenedDocument[], icon: string, label: string}[] = []
@ -202,14 +221,17 @@ export default class ObjectTree extends BaseClass {
const doc = singleDocument.doc as unknown as I_ShortenedDocument
const parentDocID = doc.extraFields.find(e => e.id === "parentDoc")?.value.value as unknown as {_id: string}
const color = doc.extraFields.find(e => e.id === "documentColor")?.value as unknown as string
const isCategory = doc.extraFields.find(e => e.id === "categorySwitch")?.value as unknown as string
return {
label: doc.extraFields.find(e => e.id === "name")?.value,
icon: doc.icon,
icon: (isCategory) ? "fas fa-folder-open" : doc.icon,
sticker: doc.extraFields.find(e => e.id === "order")?.value,
parentDoc: (parentDocID) ? parentDocID._id : false,
handler: this.openExistingDocument,
expandable: true,
color: color,
type: doc.type,
children: [],
hasEdits: false,

View file

@ -11,7 +11,7 @@
elevated
class="bg-dark text-cultured"
>
<q-dialog
<q-dialog
v-if="currentlyCheckedDocument"
v-model="documentCloseDialogConfirm"
persistent>
@ -50,20 +50,22 @@
v-for="document in localDocuments"
:to="`/project/display-content/${document.type}/${document._id}`"
:key="document.type+document._id"
:icon="document.icon"
:icon="(retrieveFieldValue(document,'categorySwitch') ? 'fas fa-folder-open' : document.icon)"
:label="retrieveFieldValue(document,'name')"
:style="`color: ${retrieveFieldValue(document,'documentColor')}`"
:alert="document.hasEdits"
alert-icon="mdi-feather"
>
<q-btn
round
dense
class="z-max q-ml-sm"
:class="{'q-mr-sm': document.hasEdits}"
size="xs"
icon="close"
@click.stop.prevent="checkForCloseOpenedDocument(document)"
/>
round
dense
class="z-max q-ml-sm"
:class="{'q-mr-sm': document.hasEdits}"
size="xs"
icon="close"
style="color: #fff;"
@click.stop.prevent="checkForCloseOpenedDocument(document)"
/>
</q-route-tab>
</transition-group>
</q-tabs>
@ -74,7 +76,10 @@
</template>
<script lang="ts">
import { Component, Watch } from "vue-property-decorator"
import { I_KeyPressObject } from "src/interfaces/I_KeypressObject"
import { Component, Watch, Prop } from "vue-property-decorator"
import BaseClass from "src/BaseClass"
import { I_OpenedDocument } from "src/interfaces/I_OpenedDocument"
@ -112,6 +117,61 @@ export default class TppTabs extends BaseClass {
}
localDocuments: I_OpenedDocument[] = []
@Prop() readonly pushedKey!: I_KeyPressObject
@Watch("pushedKey", { deep: true })
processKeyPress (keypress: I_KeyPressObject) {
// Delete dialog - CTRL + W
if (!keypress.shiftKey && keypress.ctrlKey && !keypress.altKey && keypress.keyCode === 87 && this.localDocuments.length > 0) {
const matchingDocument = this.localDocuments.find(e => e.url === this.$route.path)
if (matchingDocument) {
this.checkForCloseOpenedDocument(matchingDocument)
}
}
// Next tab - ALT + RIGHT ARROW
if (!keypress.shiftKey && !keypress.ctrlKey && keypress.altKey && keypress.keyCode === 39 && this.localDocuments.length > 0) {
let index = -1
const matchingDocument = this.localDocuments.find((e, i) => {
index = i
return e.url === this.$route.path
})
if (matchingDocument && index !== this.localDocuments.length - 1) {
this.$router.push({ path: this.localDocuments[index + 1].url }).catch((e: {name: string}) => {
if (e && e.name !== "NavigationDuplicated") { console.log(e) }
})
}
if (matchingDocument && index === this.localDocuments.length - 1) {
this.$router.push({ path: this.localDocuments[0].url }).catch((e: {name: string}) => {
if (e && e.name !== "NavigationDuplicated") { console.log(e) }
})
}
}
// Previous tab - ALT + LEFT ARROW
if (!keypress.shiftKey && !keypress.ctrlKey && keypress.altKey && keypress.keyCode === 37 && this.localDocuments.length > 0) {
let index = -1
const matchingDocument = this.localDocuments.find((e, i) => {
index = i
return e.url === this.$route.path
})
if (matchingDocument && index !== 0) {
this.$router.push({ path: this.localDocuments[index - 1].url }).catch((e: {name: string}) => {
if (e && e.name !== "NavigationDuplicated") { console.log(e) }
})
}
if (matchingDocument && index === 0) {
this.$router.push({ path: this.localDocuments[this.localDocuments.length - 1].url }).catch((e: {name: string}) => {
if (e && e.name !== "NavigationDuplicated") { console.log(e) }
})
}
}
}
}
</script>

View file

@ -2,10 +2,61 @@
@import './app/customColors.scss';
* {
/* width */
::-webkit-scrollbar {
width: 5px;
}
/* Track */
::-webkit-scrollbar-track {
background: lighten($dark, 60);
}
/* Handle */
::-webkit-scrollbar-thumb {
background: lighten($dark, 25);
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: lighten($dark, 15);
}
}
body {
background-color: #fff;
/* WebKit/Blink Browsers */
::selection {
background: lighten($dark, 30);
color: white;
}
/* Gecko Browsers */
::-moz-selection {
background: lighten($dark, 30);
color: white;
}
}
.q-drawer-container * {
user-select: none !important;
}
.q-tooltip {
font-size: 11px;
}
.q-toggle__inner {
width: 100%;
}
.q-toggle__thumb {
transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.q-toggle__inner--truthy .q-toggle__thumb {
left: calc(100% - 30px);
}

View file

@ -11,13 +11,29 @@ export const chaptersBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "mdi-file-outline",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "chapters"
}
@ -27,6 +43,23 @@ export const chaptersBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{

File diff suppressed because it is too large Load diff

View file

@ -17,13 +17,29 @@ export const currenciesBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "fas fa-coins",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "currencies"
}
@ -33,11 +49,28 @@ export const currenciesBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6

View file

@ -17,13 +17,29 @@ export const eventsBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "mdi-account",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "events"
}
@ -33,11 +49,28 @@ export const eventsBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 4
@ -49,22 +82,23 @@ export const eventsBlueprint: I_Blueprint = {
icon: "fas fa-meteor",
sizing: 2,
predefinedSelectValues: [
"Annual",
"Battle/Skirmish",
"Celebration",
"Construction",
"Daily",
"Festival",
"Tragedy",
"Infrequent",
"Invention",
"Monthly",
"Natural occurance",
"One-time",
"Seasonal",
"Tragedy",
"Unique",
"Unnatural occurance",
"War",
"Battle/Skirmish",
"Construction",
"Invention",
"Unique",
"One-time",
"Annual",
"Seasonal",
"Monthly",
"Daily",
"Infrequent"
"Other"
]
},
{

View file

@ -17,13 +17,29 @@ export const itemsBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "mdi-sword-cross",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "items"
}
@ -33,11 +49,28 @@ export const itemsBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6

View file

@ -17,13 +17,29 @@ export const languagesBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "mdi-account",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "languages"
}
@ -33,11 +49,28 @@ export const languagesBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6

View file

@ -17,13 +17,29 @@ export const locationsBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "mdi-map-marker-radius",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "locations"
}
@ -33,11 +49,28 @@ export const locationsBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 3
@ -59,7 +92,22 @@ export const locationsBlueprint: I_Blueprint = {
type: "singleSelect",
icon: "fas fa-monument",
sizing: 2,
predefinedSelectValues: ["City", "Town", "Village", "Building", "Area", "Landmark", "Mountain", "Forest", "Body of water", "Terrain formation", "Unique"]
predefinedSelectValues: [
"Area",
"Body of water",
"Building",
"City",
"Continent",
"Forest",
"Landmark",
"Landmass",
"Mountain",
"Terrain formation",
"Town",
"Village",
"Other",
"Unique"
]
},
{
id: "population",
@ -185,7 +233,7 @@ export const locationsBlueprint: I_Blueprint = {
},
{
id: "governPolitical",
name: "Govening political groups/ideologies",
name: "Governing political groups/ideologies",
type: "manyToManyRelationship",
icon: "mdi-bank-outline",
sizing: 6,
@ -207,7 +255,7 @@ export const locationsBlueprint: I_Blueprint = {
},
{
id: "governReligious",
name: "Govening religious groups",
name: "Governing religious groups",
type: "manyToManyRelationship",
icon: "fas fa-ankh",
sizing: 6,
@ -229,7 +277,7 @@ export const locationsBlueprint: I_Blueprint = {
},
{
id: "governMagical",
name: "Govening magical groups",
name: "Governing magical groups",
type: "manyToManyRelationship",
icon: "fas fa-hat-wizard",
sizing: 6,
@ -251,7 +299,7 @@ export const locationsBlueprint: I_Blueprint = {
},
{
id: "governTech",
name: "Govening tech/scientifical groups",
name: "Governing tech/scientifical groups",
type: "manyToManyRelationship",
icon: "fas fa-wrench",
sizing: 6,

View file

@ -2,8 +2,8 @@ import { I_Blueprint } from "../../interfaces/I_Blueprint"
export const loreNotesBlueprint: I_Blueprint = {
_id: "loreNotes",
order: 19,
namePlural: "Lore notes",
nameSingular: "Lore note",
namePlural: "Other/Notes",
nameSingular: "Other/Note",
icon: "mdi-script-text-outline",
extraFields: [
{
@ -11,13 +11,29 @@ export const loreNotesBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "mdi-script-text-outline",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "loreNotes"
}
@ -27,6 +43,23 @@ export const loreNotesBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{

View file

@ -17,13 +17,29 @@ export const magicBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "fas fa-hat-wizard",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "magic"
}
@ -33,18 +49,35 @@ export const magicBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6
},
{
id: "headquarters",
name: "Headquesters",
name: "Headquarters",
type: "singleToNoneRelationship",
icon: "mdi-map-marker-radius",
sizing: 4,
@ -76,11 +109,11 @@ export const magicBlueprint: I_Blueprint = {
icon: "fas fa-monument",
sizing: 3,
predefinedSelectValues: [
"Spell",
"Ritual",
"Magical teaching",
"School of magic",
"Magical institution",
"Magical teaching",
"Ritual",
"School of magic",
"Spell",
"Other"
]
},
@ -91,14 +124,14 @@ export const magicBlueprint: I_Blueprint = {
icon: "fas fa-hand-sparkles",
sizing: 3,
predefinedSelectValues: [
"Conjuration",
"Necromancy",
"Evocation",
"Abjuration ",
"Transmutation",
"Conjuration",
"Divination",
"Enchantment",
"Evocation",
"Illusion",
"Necromancy",
"Transmutation",
"World alteration",
"Other"
]
@ -138,7 +171,7 @@ export const magicBlueprint: I_Blueprint = {
},
{
id: "connectedRaces",
name: "Common species/races among the practicioners",
name: "Common species/races among the practitioners",
type: "manyToManyRelationship",
icon: "fas fa-dragon",
sizing: 6,

View file

@ -17,13 +17,29 @@ export const mythsBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "fas fa-journal-whills",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "myths"
}
@ -33,11 +49,28 @@ export const mythsBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6

View file

@ -17,13 +17,29 @@ export const politicalGroupsBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "mdi-bank-outline",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "politicalGroups"
}
@ -33,18 +49,35 @@ export const politicalGroupsBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6
},
{
id: "headquarters",
name: "Headquesters",
name: "Headquarters",
type: "singleToNoneRelationship",
icon: "mdi-map-marker-radius",
sizing: 4,

View file

@ -17,13 +17,29 @@ export const racesBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "fas fa-dragon",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "races"
}
@ -33,11 +49,28 @@ export const racesBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6
@ -64,60 +97,76 @@ export const racesBlueprint: I_Blueprint = {
id: "age",
name: "Average lifespan",
type: "text",
icon: "mdi-timer-sand-empty",
sizing: 2
},
{
id: "ageAdult",
name: "Average adulthood",
type: "text",
icon: "mdi-timer-sand",
sizing: 2
},
{
id: "ageOldest",
name: "Oldest known",
type: "text",
icon: "mdi-timer-sand-full",
sizing: 2
},
{
id: "height",
name: "Average height",
type: "text",
icon: "mdi-human-male-height-variant",
sizing: 2
sizing: 3
},
{
id: "weight",
name: "Average weight",
type: "text",
icon: "mdi-weight",
sizing: 2
sizing: 3
},
{
id: "beingType",
name: "Type of being",
type: "multiSelect",
icon: "fas fa-paw",
sizing: 3,
sizing: 6,
predefinedSelectValues: [
"Animal",
"Mammal",
"Bird",
"Reptile",
"Amphibian",
"Fish",
"Insect",
"Plant",
"Mushroom",
"Lichen",
"Bacteria",
"Virus",
"Elemental",
"Sprititual",
"Animal",
"Atrificial",
"Bacteria",
"Bird",
"Draconoid",
"Elemental",
"Fish",
"Humanoid",
"Insect",
"Lichen",
"Mammal",
"Mushroom",
"Plant",
"Reptile",
"Sprititual",
"Virus",
"Other"
]
},
{
id: "sentience",
name: "Level of sentience",
name: "Level of sapience",
type: "multiSelect",
icon: "fas fa-brain",
sizing: 3,
sizing: 6,
predefinedSelectValues: [
"Ascended",
"Sentient",
"Half-sentient",
"Non-sentient",
"Hivemind",
"Non-sentient",
"Sentient",
"Other"
]
},
@ -201,31 +250,31 @@ export const racesBlueprint: I_Blueprint = {
"Minor",
"Medium",
"Severe",
"Impacitating",
"Imcapacitating",
"Deadly"
]
}
},
{
id: "commonNames",
name: "Common names",
name: "Common names among the race/species",
type: "list",
icon: "fas fa-signature",
sizing: 6,
predefinedListExtras: {
affix: "Normally used for",
extraSelectValueList: [
"Male",
"Female",
"Child",
"Female",
"Honorary",
"Male",
"Other"
]
}
},
{
id: "commonFamilyNames",
name: "Common family/clan names",
name: "Common family/clan names among the race/species",
type: "list",
icon: "mdi-family-tree",
sizing: 6,

View file

@ -17,13 +17,29 @@ export const religionsBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "fas fa-ankh",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "religions"
}
@ -33,18 +49,35 @@ export const religionsBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6
},
{
id: "headquarters",
name: "Headquesters",
name: "Headquarters",
type: "singleToNoneRelationship",
icon: "mdi-map-marker-radius",
sizing: 4,
@ -76,12 +109,13 @@ export const religionsBlueprint: I_Blueprint = {
icon: "fas fa-yin-yang",
sizing: 3,
predefinedSelectValues: [
"Individual teaching",
"Sect",
"Cult",
"Free-form faith",
"Individual teaching",
"Official teaching",
"Organized faith",
"Official teaching"
"Sect",
"Other"
]
},
{
@ -91,15 +125,16 @@ export const religionsBlueprint: I_Blueprint = {
icon: "fas fa-sun",
sizing: 3,
predefinedSelectValues: [
"Naturalism",
"Totemism",
"Ancestor worship",
"Animism",
"Spritism",
"Polytheism",
"Monotheism",
"Atheism",
"Monotheism",
"Naturalism",
"Polytheism",
"Spritism",
"Totemism",
"Virtue teaching",
"Ancestor worship"
"Other"
]
},
{

View file

@ -17,13 +17,29 @@ export const techBlueprint: I_Blueprint = {
name: "Name",
type: "text",
icon: "fas fa-wrench",
sizing: 6
sizing: 3
},
{
id: "documentColor",
name: "Color",
type: "colorPicker",
icon: "mdi-eyedropper",
tooltip:
`This field allows for custom-coloring your document to any available HEX or RBG color.
<br>The selected color will show on the icon and name of the document both in the hierarchical tree on the left and in the top tabs.
`,
sizing: 2
},
{
id: "parentDoc",
name: "Belongs under",
type: "singleToNoneRelationship",
sizing: 4,
tooltip:
`This field is used to build up custom hierarchical tree structure in the main list of items in the left side of the app.
<br> You can use this for an infinite amount of sub-levels to the hierarchical structure.
<br> An example would be multiple sub-groups (provinces) of Roman Empire belonging under the main political group called "Roman Empire".
`,
sizing: 3,
relationshipSettings: {
connectedObjectType: "tech"
}
@ -33,18 +49,35 @@ export const techBlueprint: I_Blueprint = {
name: "Order number",
type: "number",
icon: "mdi-file-tree",
tooltip:
`In case the default sorting via alphabet in the hierarchical tree on the left is inadequite for your needs, this field allows you to fill custom numbers to order by that get placed before the default alphabetical order.
<br>It is heavily suggested to "pad-out" the custom order numbers by writing for example 100 (or least 10) instead of 1.
<br>This allows for extra "padding" between the items in case a new one needs to be added in the middle without needing to redo the custom order on all documents.
`,
sizing: 2
},
{
id: "categorySwitch",
name: "Is a category",
type: "switch",
icon: "fas fa-folder-open",
tooltip:
`This setting allows for setting the current document to category mode.
<br>
A document with category mode toggled on will have most of its fields hidden and will not show in any other relationship searches except for "Belongs under".
`,
sizing: 2
},
{
id: "otherNames",
name: "Other names",
name: "Other names & Epithets",
type: "list",
icon: "mdi-book-plus",
sizing: 6
},
{
id: "headquarters",
name: "Headquesters",
name: "Headquarters",
type: "singleToNoneRelationship",
icon: "mdi-map-marker-radius",
sizing: 4,
@ -54,7 +87,7 @@ export const techBlueprint: I_Blueprint = {
},
{
id: "users",
name: "Practicioners/Engineers",
name: "Practitioners/Engineers",
type: "text",
icon: "mdi-account-group",
sizing: 2
@ -76,14 +109,13 @@ export const techBlueprint: I_Blueprint = {
icon: "fas fa-cogs",
sizing: 3,
predefinedSelectValues: [
"Technique",
"Invention",
"Factory/Manufacture",
"Invention",
"Machinery",
"Magi-tech creation",
"School of technology",
"Factory/Manufacture",
"Scientifical/Technological institution",
"Technique",
"Other"
]
},
@ -94,26 +126,26 @@ export const techBlueprint: I_Blueprint = {
icon: "fas fa-vial",
sizing: 3,
predefinedSelectValues: [
"Logic",
"Mathematics",
"Statistics",
"Physics",
"Chemistry",
"Biology",
"Magicology",
"Geology",
"Agricultural science",
"Astrology",
"Automation & Applied logic",
"Engineering",
"Agricultural science",
"Medicine",
"Biology",
"Chemistry",
"Economics",
"Politology",
"Sociology",
"Psychology",
"Pedagogy",
"Engineering",
"Geology",
"History",
"Linguistics",
"Logic",
"Magicology",
"Mathematics",
"Medicine",
"Pedagogy",
"Physics",
"Politology",
"Psychology",
"Sociology",
"Statistics",
"Other"
]
},
@ -141,7 +173,7 @@ export const techBlueprint: I_Blueprint = {
},
{
id: "connectedRaces",
name: "Common species/races among the practicioners",
name: "Common species/races among the practitioners",
type: "manyToManyRelationship",
icon: "fas fa-dragon",
sizing: 6,

View file

@ -169,7 +169,8 @@ export const many_addRelationShipToAnotherObject = async (
type: currentDocument.type,
url: `/project/display-content/${currentDocument.type}/${currentDocument._id}`,
label: currentDocument.extraFields.find(e => e.id === "name")?.value,
pairedField: field.id
pairedField: field.id,
isCategory: currentDocument.extraFields.find(e => e.id === "categorySwitch")?.value
}
pairedFieldValue = (Array.isArray(pairedFieldValue)) ? pairedFieldValue : []

View file

@ -3,9 +3,12 @@ export interface I_ExtraFields {
name: string,
icon?: string,
sizing: number
tooltip?: string
type:
"text" |
"number" |
"colorPicker" |
"switch" |
"list" |
"wysiwyg" |
"singleSelect" |

View file

@ -5,6 +5,7 @@ export interface I_FieldRelationship{
url: string
_id: string
pairedField: string
isCategory: boolean
}
export interface I_RelationshipPair {

View file

@ -0,0 +1,6 @@
export interface I_KeyPressObject {
altKey: boolean
ctrlKey: boolean
shiftKey: boolean
keyCode: number
}

View file

@ -1,21 +1,250 @@
<template>
<q-layout view="lHh LpR lfr">
<q-layout view="lHh LpR lfr"
>
<q-dialog
v-model="keyBindsDialog"
>
<q-card
class="keyBindsDialog"
>
<q-card-section class="row items-center">
<h6 class="text-center q-my-sm">Keybind list</h6>
</q-card-section>
<q-card-section>
<q-markup-table>
<thead>
<tr>
<th class="text-left">Action</th>
<th class="text-left">Keybind</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left">Focuses next input field/input element/hierarchical tree node</td>
<td class="text-left">TAB <br> <div class="text-italic keybindNote">(functionality is the same as when using a web-browser)</div></td>
</tr>
<tr>
<td class="text-left">Focuses previous input field/input element/hierarchical tree node</td>
<td class="text-left">SHFIT + TAB <br> <div class="text-italic keybindNote">(functionality is the same as when using a web-browser)</div></td>
</tr>
<tr>
<td class="text-left">Open the focused document in the left hierarchical tree</td>
<td class="text-left">SHIFT + TAB <br> <div class="text-italic keybindNote">(while the hierarchical tree item is focused)</div></td>
</tr>
<tr>
<td class="text-left">Open keybind cheatsheet</td>
<td class="text-left">CTRL + ALT + K</td>
</tr>
<tr>
<td class="text-left">Focus search field in the left hierarchical tree</td>
<td class="text-left">CTRL + SHIFT + Q</td>
</tr>
<tr>
<td class="text-left">Clears any inpuit in the search field in the left hierarchical tree</td>
<td class="text-left">CTRL + SHIFT + W</td>
</tr>
<tr>
<td class="text-left">Open the focused document in the left hierarchical tree</td>
<td class="text-left">ENTER <br> <div class="text-italic keybindNote">(while the hierarchical tree item is focused)</div></td>
</tr>
<tr>
<td class="text-left">Collapse or open the focused category in the left hierarchical tree</td>
<td class="text-left">SPACE <br> <div class="text-italic keybindNote">(while the hierarchical tree item is focused)</div></td>
</tr>
<tr>
<td class="text-left">Quick-search existing document</td>
<td class="text-left">CTRL + Q</td>
</tr>
<tr>
<td class="text-left">Quick-add new document</td>
<td class="text-left">CTRL + N</td>
</tr>
<tr>
<td class="text-left">Next tab</td>
<td class="text-left">ALT + RIGHT ARROW</td>
</tr>
<tr>
<td class="text-left">Previous tab</td>
<td class="text-left">ALT + LEFT ARROW</td>
</tr>
<tr>
<td class="text-left">Close active document</td>
<td class="text-left">CTRL + W</td>
</tr>
<tr>
<td class="text-left">Delete active document</td>
<td class="text-left">CTRL + D</td>
</tr>
<tr>
<td class="text-left">Edit active document</td>
<td class="text-left">CTRL + E</td>
</tr>
<tr>
<td class="text-left">Save active document</td>
<td class="text-left">CTRL + S</td>
</tr>
</tbody>
</q-markup-table>
</q-card-section>
<q-card-actions align="center" class="q-mb-lg q-mt-md">
<q-btn flat label="Close window" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
<q-dialog
v-model="newDocumentDialog"
>
<q-card
class="newDocumentPopup"
>
<q-card-section class="row items-center">
<h6 class="text-center q-my-sm">Add new document</h6>
</q-card-section>
<q-card-section class="row items-center">
<q-select
ref="ref_newDocument"
style="flex-grow: 1;"
dense
:options="filteredNewInput"
use-input
outlined
input-debounce="0"
v-model="newDocumentModel"
@filter="filterNewSelect"
@input="triggerNewInput"
>
<template v-slot:option="{ itemProps, itemEvents, opt }">
<q-item
v-bind="itemProps"
v-on="itemEvents"
>
<q-item-section avatar>
<q-icon :name="opt.icon" />
</q-item-section>
<q-item-section>
<q-item-label v-html="opt.label" ></q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</q-card-section>
<q-card-section>
<q-card-actions align="center" class="q-mb-sm">
<q-btn flat label="Close window" color="primary" v-close-popup />
</q-card-actions>
</q-card-section>
</q-card>
</q-dialog>
<q-dialog
v-model="existingDocumentDialog"
>
<q-card
class="newDocumentPopup"
>
<q-card-section class="row items-center">
<h6 class="text-center q-my-sm">Open existing document</h6>
</q-card-section>
<q-card-section class="row items-center">
<q-select
ref="ref_existingDocument"
style="flex-grow: 1;"
dense
:options="filteredExistingInput"
use-input
outlined
input-debounce="0"
v-model="existingDocumentModel"
@filter="filterExistingSelect"
@input="openExistingInput"
>
<template v-slot:option="{ itemProps, itemEvents, opt }">
<q-item
v-bind="itemProps"
v-on="itemEvents"
:style="`background-color: ${opt.color}99`"
>
<q-item-section avatar>
<q-icon :name="(opt.isCategory) ? 'fas fa-folder-open' : opt.icon" />
</q-item-section>
<q-item-section>
<q-item-label v-html="opt.label" ></q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</q-card-section>
<q-card-section>
<q-card-actions align="center" class="q-mb-sm">
<q-btn flat label="Close window" color="primary" v-close-popup />
</q-card-actions>
</q-card-section>
</q-card>
</q-dialog>
<!-- Left drawer -->
<q-drawer
class=""
content-class="bg-dark text-cultured"
content-class="bg-dark text-cultured sideWrapper"
v-model="leftDrawerOpen"
side="left"
show-if-above
bordered>
>
<objectTree/>
<objectTree
:pushed-key="pushedKey"
/>
<q-page-sticky position="bottom-right" class="controlButtons">
<q-btn
icon="mdi-note-plus-outline"
color="primary"
@click="populateNewObjectDialog"
>
<q-tooltip>
Quick-add a new document.
</q-tooltip>
</q-btn>
<q-btn
icon="mdi-database-search"
color="primary"
@click="populateExistingObjectDialog"
>
<q-tooltip>
Quick-search an existing document.
</q-tooltip>
</q-btn>
<q-btn
icon="mdi-keyboard-outline"
color="primary"
@click="keyBindsDialog = true"
>
<q-tooltip>
Show keybind cheetsheet.
</q-tooltip>
</q-btn>
</q-page-sticky>
</q-drawer>
<!-- Header -->
<topTabs/>
<topTabs
:pushed-key="pushedKey"
/>
<!-- Right drawer -->
<q-drawer
@ -32,7 +261,7 @@
appear
:duration="300"
>
<router-view :key="$route.path" />
<router-view :key="$route.path" :pushed-key="pushedKey" />
</transition>
</q-page-container>
@ -43,9 +272,20 @@
import { Component } from "vue-property-decorator"
import BaseClass from "src/BaseClass"
import PouchDB from "pouchdb"
import objectTree from "src/components/ObjectTree.vue"
import topTabs from "src/components/TopTabs.vue"
import { I_KeyPressObject } from "src/interfaces/I_KeypressObject"
import { I_ShortenedDocument } from "src/interfaces/I_OpenedDocument"
interface NewObjectDocument {
label: string
icon: string
order: number
_id: string
specialLabel: string
}
@Component({
components: { objectTree, topTabs }
@ -53,5 +293,271 @@ import topTabs from "src/components/TopTabs.vue"
export default class MainLayout extends BaseClass {
leftDrawerOpen = true
rightDrawerOpen = false
pushedKey = {} as I_KeyPressObject
created () {
window.addEventListener("keyup", this.triggerKeyPush)
}
destroyed () {
window.removeEventListener("keyup", this.triggerKeyPush)
}
// @ts-ignore
triggerKeyPush (e) {
if (this.newDocumentDialog || this.existingDocumentDialog || this.keyBindsDialog) { return false }
if (e?.altKey === true || e?.ctrlKey || e?.shiftKey) {
const ouputKeycombo = {
altKey: e.altKey,
ctrlKey: e.ctrlKey,
shiftKey: e.shiftKey,
keyCode: e.keyCode
}
this.pushedKey = ouputKeycombo
this.processKeyPush()
}
}
newDocumentDialog = false
processKeyPush () {
const currentKey = this.pushedKey
// New document - CTRL + ALT + K
if (!currentKey.shiftKey && currentKey.ctrlKey && currentKey.altKey && currentKey.keyCode === 75) {
this.keyBindsDialog = true
}
// New document - CTRL + N
if (!currentKey.shiftKey && currentKey.ctrlKey && !currentKey.altKey && currentKey.keyCode === 78) {
this.populateNewObjectDialog()
}
// Open existing document - CTRL + Q
if (!currentKey.shiftKey && currentKey.ctrlKey && !currentKey.altKey && currentKey.keyCode === 81) {
this.populateExistingObjectDialog().catch(e => console.log(e))
}
}
newObjectList = [] as NewObjectDocument[]
newDocumentModel = null
populateNewObjectDialog () {
this.newDocumentDialog = true
// @ts-ignore
this.newObjectList = this.SGET_allBlueprints.map(blueprint => {
return {
label: blueprint.namePlural,
icon: blueprint.icon,
order: blueprint.order,
_id: blueprint._id,
specialLabel: blueprint.nameSingular.toLowerCase()
}
})
this.$nextTick(function () {
/*eslint-disable */
setTimeout( () =>{
// @ts-ignore
this.$refs.ref_newDocument.focus()
}, 100)
/* eslint-enable */
})
}
filteredNewInput = null as unknown as NewObjectDocument[]
filterNewSelect (val: string, update: (e: () => void) => void) {
if (val === "") {
update(() => {
this.filteredNewInput = this.newObjectList
/*eslint-disable */
if(this.$refs.ref_newDocument && this.filteredNewInput.length > 0){
setTimeout(() => {
// @ts-ignore
this.$refs.ref_newDocument.setOptionIndex(-1)
// @ts-ignore
this.$refs.ref_newDocument.moveOptionSelection(1, true)
}, 300)
/* eslint-enable */
}
})
return
}
update(() => {
const needle = val.toLowerCase()
this.filteredNewInput = this.newObjectList.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
/*eslint-disable */
if(this.$refs.ref_newDocument && this.filteredNewInput.length > 0){
setTimeout(() => {
// @ts-ignore
this.$refs.ref_newDocument.setOptionIndex(-1)
// @ts-ignore
this.$refs.ref_newDocument.moveOptionSelection(1, true)
}, 300)
}
/* eslint-enable */
})
}
triggerNewInput (e: NewObjectDocument) {
this.newDocumentDialog = false
this.addNewObjectType(e)
this.newDocumentModel = null
}
existingObjectList = [] as I_ShortenedDocument[]
async populateExistingObjectDialog () {
this.existingDocumentDialog = true
let allDocs = [] as I_ShortenedDocument[]
for (const blueprint of this.SGET_allBlueprints) {
const CurrentObjectDB = new PouchDB(blueprint._id)
const dbDocuments = await CurrentObjectDB.allDocs({ include_docs: true })
const formattedDocuments = dbDocuments.rows.map(singleDocument => {
const doc = singleDocument.doc as unknown as I_ShortenedDocument
return {
label: doc.extraFields.find(e => e.id === "name")?.value,
icon: doc.icon,
url: doc.url,
color: doc.extraFields.find(e => e.id === "documentColor")?.value,
isCategory: doc.extraFields.find(e => e.id === "categorySwitch")?.value
} as unknown as I_ShortenedDocument
}).sort((a, b) => a.label.localeCompare(b.label))
// @ts-ignore
allDocs = [...allDocs, ...formattedDocuments]
}
this.existingObjectList = allDocs
this.$nextTick(function () {
/*eslint-disable */
setTimeout( () =>{
if(this.$refs.ref_existingDocument){
// @ts-ignore
this.$refs.ref_existingDocument.focus()
}
}, 300)
/* eslint-enable */
})
}
existingDocumentDialog = false
existingDocumentModel = null
filteredExistingInput = null as unknown as I_ShortenedDocument[]
filterExistingSelect (val: string, update: (e: () => void) => void) {
if (val === "") {
update(() => {
this.filteredExistingInput = this.existingObjectList
/*eslint-disable */
if(this.$refs.ref_existingDocument && this.filteredExistingInput.length > 0){
setTimeout(() => {
// @ts-ignore
this.$refs.ref_existingDocument.setOptionIndex(-1)
// @ts-ignore
this.$refs.ref_existingDocument.moveOptionSelection(1, true)
}, 300)
/* eslint-enable */
}
})
return
}
update(() => {
const needle = val.toLowerCase()
this.filteredExistingInput = this.existingObjectList.filter(v => v.label.toLowerCase().indexOf(needle) > -1)
/*eslint-disable */
if(this.$refs.ref_existingDocument && this.filteredExistingInput.length > 0){
setTimeout(() => {
// @ts-ignore
this.$refs.ref_existingDocument.setOptionIndex(-1)
// @ts-ignore
this.$refs.ref_existingDocument.moveOptionSelection(1, true)
}, 300)
/* eslint-enable */
}
})
}
openExistingInput (e: I_ShortenedDocument) {
this.existingDocumentDialog = false
// @ts-ignore
this.openExistingDocument(e)
this.existingDocumentModel = null
}
keyBindsDialog = false
}
</script>
<style lang="scss">
.q-layout {
outline: none !important;
}
.newDocumentPopup {
width: 400px;
margin-top: 100px;
align-self: flex-start;
h6 {
display: block;
text-align: center;
width: 100%;
}
}
.keyBindsDialog {
width: 100%;
max-width: 1000px !important;
h6 {
display: block;
text-align: center;
width: 100%;
}
table {
td {
max-width: 300px;
white-space: inherit;
}
}
.keybindNote {
opacity: 0.8;
font-size: 0.9em;
}
}
.sideWrapper {
padding-bottom: 70px !important;
&::after {
content: '';
position: absolute;
background-color: $dark;
left: 0;
bottom: 0;
right: 5px;
height: 60px;
}
}
.controlButtons {
z-index: 3;
margin: 10px 15px 10px 10px;
button {
margin: 0 5px;
}
}
</style>

View file

@ -1,10 +1,12 @@
<template>
<q-page class="q-pa-xl" v-if="bluePrintData">
<q-page class="q-pa-xl"
v-if="bluePrintData"
>
<div class="row justify-start q-col-gutter-x-xl">
<q-dialog
v-model="deleteConfirmationDialog"
persistent>
>
<q-card>
<q-card-section class="row items-center">
<span class="q-ml-sm">Are you sure want to delete <b>{{retrieveFieldValue(currentData,'name')}}</b>? <br> This action can not be reverted and the data will be lost <b>forever</b>.</span>
@ -22,104 +24,7 @@
</q-card>
</q-dialog>
<div
:class="`col-${field.sizing} q-mb-md`"
v-for="field in bluePrintData.extraFields"
:key="field.id">
<Field_Break
class="inputWrapper break"
v-if="field.type === 'break'"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
/>
<Field_Text
class="inputWrapper"
v-if="field.type === 'text' && retrieveFieldValue(currentData,field.id) || field.type === 'text' && retrieveFieldLength(currentData,field.id) === 0 "
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_Number
class="inputWrapper"
v-if="field.type === 'number'"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_List
class="inputWrapper"
v-if="field.type === 'list'"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_SingleSelect
class="inputWrapper"
v-if="field.type === 'singleSelect'"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_MultiSelect
class="inputWrapper"
v-if="field.type === 'multiSelect'"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_SingleRelationship
class="inputWrapper"
v-if="field.type === 'singleToNoneRelationship' || field.type === 'singleToSingleRelationship' || field.type === 'singleToManyRelationship'"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
:current-id="currentData._id"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_MultiRelationship
class="inputWrapper"
v-if="field.type === 'manyToNoneRelationship' || field.type ===
'manyToSingleRelationship' || field.type === 'manyToManyRelationship'"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
:current-id="currentData._id"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_Wysiwyg
class="inputWrapper"
v-if="field.type === 'wysiwyg'"
:inputDataBluePrint="field"
:inputDataValue="(retrieveFieldValue(currentData, field.id)) ? retrieveFieldValue(currentData, field.id) : ''"
:isNew="currentData.isNew"
:editMode="editMode"
:current-id="currentData._id"
@signal-input="reactToFieldUpdate($event, field)"
/>
</div>
<div class="col-12">
<div class="col-12 flex justify-end q-mb-xl q-mt-md">
<q-btn
color="primary"
:label="`Save ${bluePrintData.nameSingular}`"
@ -141,13 +46,133 @@
@click="openDeleteDialog"
/>
</div>
<div
:class="`col-${field.sizing} q-mb-md`"
v-for="field in bluePrintData.extraFields"
:key="field.id"
>
<Field_Break
class="inputWrapper break"
v-if="field.type === 'break' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
/>
<Field_Text
class="inputWrapper"
v-if="(field.type === 'text' && retrieveFieldValue(currentData,field.id) || field.type === 'text' && retrieveFieldLength(currentData,field.id) === 0) && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_Number
class="inputWrapper"
v-if="field.type === 'number' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_Switch
class="inputWrapper"
v-if="field.type === 'switch' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_ColorPicker
class="inputWrapper"
v-if="field.type === 'colorPicker' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_List
class="inputWrapper"
v-if="field.type === 'list' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_SingleSelect
class="inputWrapper"
v-if="field.type === 'singleSelect' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_MultiSelect
class="inputWrapper"
v-if="field.type === 'multiSelect' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_SingleRelationship
class="inputWrapper"
v-if="(field.type === 'singleToNoneRelationship' || field.type === 'singleToSingleRelationship' || field.type === 'singleToManyRelationship') && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
:current-id="currentData._id"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_MultiRelationship
class="inputWrapper"
v-if="(field.type === 'manyToNoneRelationship' || field.type ===
'manyToSingleRelationship' || field.type === 'manyToManyRelationship') && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="retrieveFieldValue(currentData, field.id)"
:isNew="currentData.isNew"
:editMode="editMode"
:current-id="currentData._id"
@signal-input="reactToFieldUpdate($event, field)"
/>
<Field_Wysiwyg
class="inputWrapper"
v-if="field.type === 'wysiwyg' && fieldLimiter(field.id)"
:inputDataBluePrint="field"
:inputDataValue="(retrieveFieldValue(currentData, field.id)) ? retrieveFieldValue(currentData, field.id) : ''"
:isNew="currentData.isNew"
:editMode="editMode"
:current-id="currentData._id"
@signal-input="reactToFieldUpdate($event, field)"
/>
</div>
</div>
</q-page>
</template>
<script lang="ts">
import { Component, Watch } from "vue-property-decorator"
import { Component, Watch, Prop } from "vue-property-decorator"
import BaseClass from "src/BaseClass"
@ -156,24 +181,30 @@ import { I_OpenedDocument } from "src/interfaces/I_OpenedDocument"
import PouchDB from "pouchdb"
// import { cleanDatabases } from "src/databaseManager/cleaner"
import { single_changeRelationshipToAnotherObject, many_changeRelationshipToAnotherObject } from "src/databaseManager/relationshipManager"
import { I_KeyPressObject } from "src/interfaces/I_KeypressObject"
import { extend } from "quasar"
import Field_Break from "src/components/Field_Break.vue"
import Field_Text from "src/components/Field_Text.vue"
import Field_Number from "src/components/Field_Number.vue"
import Field_Switch from "src/components/Field_Switch.vue"
import Field_ColorPicker from "src/components/Field_ColorPicker.vue"
import Field_List from "src/components/Field_List.vue"
import Field_SingleSelect from "src/components/Field_SingleSelect.vue"
import Field_MultiSelect from "src/components/Field_MultiSelect.vue"
import Field_SingleRelationship from "src/components/Field_SingleRelationship.vue"
import Field_MultiRelationship from "src/components/Field_MultiRelationship.vue"
import Field_Wysiwyg from "src/components/Field_Wysiwyg.vue"
import console from "console"
@Component({
components: {
Field_Break,
Field_Text,
Field_Number,
Field_Switch,
Field_ColorPicker,
Field_List,
Field_SingleSelect,
Field_MultiSelect,
@ -232,7 +263,7 @@ export default class PageDocumentDisplay extends BaseClass {
this.SSET_updateOpenedDocument(dataCopy)
}
// FIELD - Text
// FIELD - Number
if (field.type === "number") {
this.currentData.hasEdits = true
const indexToUpdate = this.currentData.extraFields.findIndex(s => s.id === field.id)
@ -243,6 +274,40 @@ export default class PageDocumentDisplay extends BaseClass {
this.SSET_updateOpenedDocument(dataCopy)
}
// FIELD - Switch
if (field.type === "switch") {
this.currentData.hasEdits = true
const indexToUpdate = this.currentData.extraFields.findIndex(s => s.id === field.id)
this.currentData.extraFields[indexToUpdate].value = inputData
const dataCopy: I_OpenedDocument = extend(true, {}, this.currentData)
this.SSET_updateOpenedDocument(dataCopy)
if (field.id === "categorySwitch") {
const localCopy: I_Blueprint = (extend(true, {}, this.bluePrintData))
const blueprintUpdateCopy: I_Blueprint = (extend(true, {}, this.bluePrintData))
blueprintUpdateCopy.extraFields = []
// Reset fields so they re-render
this.SSET_blueprint(blueprintUpdateCopy)
this.retrieveDocumentBlueprint()
this.SSET_blueprint(localCopy)
this.retrieveDocumentBlueprint()
}
}
// FIELD - Color Picker
if (field.type === "colorPicker") {
this.currentData.hasEdits = true
const indexToUpdate = this.currentData.extraFields.findIndex(s => s.id === field.id)
this.currentData.extraFields[indexToUpdate].value = inputData
const dataCopy: I_OpenedDocument = extend(true, {}, this.currentData)
this.SSET_updateOpenedDocument(dataCopy)
}
// FIELD - List
if (field.type === "list") {
this.currentData.hasEdits = true
@ -405,6 +470,26 @@ export default class PageDocumentDisplay extends BaseClass {
editMode = false
@Prop() readonly pushedKey!: I_KeyPressObject
@Watch("pushedKey", { deep: true })
processKeyPress (keypress: I_KeyPressObject) {
// Save document - CTRL + S
if (this.editMode && !keypress.shiftKey && keypress.ctrlKey && !keypress.altKey && keypress.keyCode === 83) {
this.saveDocument().catch(e => { console.log(e) })
}
// Edit document - CTRL + E
if (!this.editMode && !keypress.shiftKey && keypress.ctrlKey && !keypress.altKey && keypress.keyCode === 69) {
this.toggleEditMode()
}
// Delete dialog - CTRL + D
if (keypress.ctrlKey && !keypress.shiftKey && keypress.ctrlKey && !keypress.altKey && keypress.keyCode === 68) {
this.openDeleteDialog()
}
}
openDeleteDialog () {
this.deleteConfirmationDialog = true
}
@ -489,6 +574,13 @@ export default class PageDocumentDisplay extends BaseClass {
extraFields: []
}
}
fieldLimiter (currentFieldID: string) {
const isCategory = this.retrieveFieldValue(this.currentData, "categorySwitch")
const ignoredList = ["breakBasic", "name", "documentColor", "parentDoc", "order", "categorySwitch"]
return (!isCategory || ignoredList.includes(currentFieldID))
}
}
</script>

View file

@ -5,6 +5,15 @@ import { BlueprintStateInterface } from "./state"
const mutation: MutationTree<BlueprintStateInterface> = {
setAllBlueprints (state: BlueprintStateInterface, blueprints: I_Blueprint[]) {
state.blueprints = blueprints
},
setBlueprint (state: BlueprintStateInterface, blueprint: I_Blueprint) {
const index = state.blueprints.findIndex((single: I_Blueprint) => blueprint._id === single._id)
if (index !== -1) {
state.blueprints[index] = blueprint
} else {
state.blueprints.push(blueprint)
}
}
}

22
suggestionList.md Normal file
View file

@ -0,0 +1,22 @@
- !!!FIX 2-WAY BUG!!!
- Add "Predecessors", "Successors", "Date of start", "Date of end" and "How long it lasted" fields to locations and all other groups
- Add on-the-fly generation of non-existent 2-way relationships
- Add subtabs (character stats, general info, etc)
- Custom icons/images to documents
- Middle mouse button close tab
- Add option to make the command buttons for document sticky (save/delete/edit)
- Allow/Disallow default document types
- Dark mode
- Drag/drop tree list
- Calendar field
- Custom order document types
- Auto-export (save) at X time cycle with X saves iterations
- Add tags field & search functionality from it
- Disable tabs option
- Add detailed family relationship fields to characters
- Timeline/Calendar support
- AFMG support
- Add printing support