diff --git a/.gitignore b/.gitignore index d9b324b..07b36b1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /decks /dist/ /.cache/ +/decks.db diff --git a/package-lock.json b/package-lock.json index 5278a4e..0c703df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1297,6 +1297,14 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==" }, + "binary-search-tree": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/binary-search-tree/-/binary-search-tree-0.2.5.tgz", + "integrity": "sha1-fbs7IQ/coIJFDa0jNMMErzm9x4Q=", + "requires": { + "underscore": "~1.4.4" + } + }, "bindings": { "version": "1.2.1", "resolved": "http://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", @@ -4000,6 +4008,11 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, "import-fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", @@ -4422,6 +4435,22 @@ "type-check": "~0.3.2" } }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "requires": { + "immediate": "~3.0.5" + } + }, + "localforage": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.7.3.tgz", + "integrity": "sha512-1TulyYfc4udS7ECSBT2vwJksWbkwwTX8BzeUIiq8Y07Riy7bDAAnxDaPU/tWyOVmQAcWJIEIFP9lPfBGqVoPgQ==", + "requires": { + "lie": "3.1.1" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -4679,6 +4708,33 @@ "to-regex": "^3.0.1" } }, + "nedb": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/nedb/-/nedb-1.8.0.tgz", + "integrity": "sha1-DjUCzYLABNU1WkPJ5VV3vXvZHYg=", + "requires": { + "async": "0.2.10", + "binary-search-tree": "0.2.5", + "localforage": "^1.3.0", + "mkdirp": "~0.5.1", + "underscore": "~1.4.4" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "http://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + } + } + }, + "nedb-promises": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/nedb-promises/-/nedb-promises-3.0.2.tgz", + "integrity": "sha512-9GyvhZF7LRHMbOsk+6peJc9IdmWifZAGG/er0sE8VZSOsNJII+Aywcrm5OcesSbu9GZ7E1PxnL63kYqypeZw9Q==", + "requires": { + "nedb": "^1.8.0" + } + }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", @@ -7026,6 +7082,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "underscore": { + "version": "1.4.4", + "resolved": "http://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz", + "integrity": "sha1-YaajIBBiKvoHljvzJSA88SI51gQ=" + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", diff --git a/package.json b/package.json index 7e361ca..15fc4e4 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dependencies": { "express": "^4.16.4", "interactjs": "^1.3.4", + "nedb-promises": "^3.0.2", "parcel-bundler": "^1.11.0", "phantom": "^4.0.12", "v-runtime-template": "^1.5.2", diff --git a/src/404.vue b/src/404.vue new file mode 100644 index 0000000..a00cfab --- /dev/null +++ b/src/404.vue @@ -0,0 +1,19 @@ + + + + Error 404: Path {{ path }} not found + You seem to have gone to the wrong place, would you like to go + back to the Deck Index? + + + + diff --git a/src/Deck.vue b/src/Deck.vue new file mode 100644 index 0000000..a46fe9b --- /dev/null +++ b/src/Deck.vue @@ -0,0 +1,47 @@ + + + + + + + + + + + + diff --git a/src/DeckIndex.vue b/src/DeckIndex.vue index 4fcca8c..33cade9 100644 --- a/src/DeckIndex.vue +++ b/src/DeckIndex.vue @@ -1,14 +1,11 @@ - Create New Deck: - - + Create New Deck - {{ deck }}: - Play - Edit + {{ deck.deck.meta.name }}: + Play + Edit @@ -26,7 +23,8 @@ created() { fetch('/decks.json') .then(r => r.json()) - .then(d => this.decks = d); + .then(d => this.decks = d) + .catch(err => console.log("Couldn't get deck list")); }, } diff --git a/src/Editor.vue b/src/Editor.vue index 1c8239a..5987026 100644 --- a/src/Editor.vue +++ b/src/Editor.vue @@ -8,7 +8,7 @@ + @click="downloadFile('/decks/' + deckID + '.tts.json', deckInfo.meta.name + '.tts.json')"> Download Tabletop Output JSON @@ -21,11 +21,11 @@ - Deck Name: + Deck Name: Deck Type: - + hero villain environment @@ -37,84 +37,53 @@ X - + {{ prop }} - + - - - - - +