From d9a3d386e44b0a92e21a5d50353df304844cb76d Mon Sep 17 00:00:00 2001
From: Adam Procter <adamprocter@researchnot.es>
Date: Sat, 29 Feb 2020 22:04:20 +0000
Subject: [PATCH] added version info from package.json

added version info in About page to be taken from package.json / also fixed some links in the  .md files
---
 CONTRIBUTING.md         |  2 +-
 README.md               |  2 +-
 app/README.md           | 24 ------------------------
 app/src/store/index.js  |  2 ++
 app/src/views/About.vue | 17 ++++++++++++++++-
 app/vue.config.js       |  1 +
 6 files changed, 21 insertions(+), 27 deletions(-)
 delete mode 100644 app/README.md

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d0dea72..8328050 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -28,7 +28,7 @@ VUE_APP_COUCH_PASS=yourpassword
 
 Please note we use [PouchDB](https://pouchdb.com/) to talk to CouchDB. This is what enables offline and local first support.
 
-All the internal code should use the GNU Affero General Public [License](LICENSE.md).Any dependancies that are brought into nodenogg.in must have as open a License as possible. Dependancies should be loaded in via Vue.js ui cli.
+All the internal code should use the GNU Affero General Public [License](LICENSE).Any dependancies that are brought into nodenogg.in must have as open a License as possible. Dependancies should be loaded in via Vue.js ui cli.
 
 Please Use arrow functions,and as much ES6 as possible. The code should be as neat as possible. However all code should be human understandable. So again verbose is good.
 
diff --git a/README.md b/README.md
index f155f16..fa6712c 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ nodenogg.in is free open source software, built in the open, inclusive by design
 
 # Overarching Guide for Contributions
 
-Contributions to nodenogg.in must abide by the [Delightful Design Manifesto](MANIFESTO.md). More detail on Contributing can be read [here](CONTRIIBUTING.md).
+Contributions to nodenogg.in must abide by the [Delightful Design Manifesto](MANIFESTO.md). More detail on Contributing can be read [here](CONTRIBUTING.md).
 
 # Keeping up with nodenogg.in
 
diff --git a/app/README.md b/app/README.md
deleted file mode 100644
index dbd8bbe..0000000
--- a/app/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# canvas-10-feb
-
-## Project setup
-```
-yarn install
-```
-
-### Compiles and hot-reloads for development
-```
-yarn serve
-```
-
-### Compiles and minifies for production
-```
-yarn build
-```
-
-### Lints and fixes files
-```
-yarn lint
-```
-
-### Customize configuration
-See [Configuration Reference](https://cli.vuejs.org/config/).
diff --git a/app/src/store/index.js b/app/src/store/index.js
index f2994af..62d9141 100644
--- a/app/src/store/index.js
+++ b/app/src/store/index.js
@@ -33,6 +33,7 @@ var remote =
 
 const store = new Vuex.Store({
   state: {
+    version: process.env.VUE_APP_VERSION,
     localnodeid: '',
     global_pos_name: 'positions',
     global_con_name: 'connections',
@@ -91,6 +92,7 @@ const store = new Vuex.Store({
     },
 
     GET_ALL_NODES(state) {
+      console.log(state.deploydate)
       pouchdb
         .allDocs({
           include_docs: true,
diff --git a/app/src/views/About.vue b/app/src/views/About.vue
index 2e09356..988a85c 100644
--- a/app/src/views/About.vue
+++ b/app/src/views/About.vue
@@ -14,7 +14,8 @@
       <em>(+ helpers &amp; supporters)</em>
     </p>
 
-    <h3>version 0.1.0</h3>
+    <h3>version {{ myVersion }}</h3>
+
     <ul>
       <li>
         Co-create and contribute ideas, with text, links and attachments with
@@ -88,3 +89,17 @@
     </ul>
   </div>
 </template>
+<script>
+import { mapState } from 'vuex'
+
+export default {
+  name: 'About',
+
+  data: function() {
+    return {}
+  },
+  computed: mapState({
+    myVersion: state => state.version
+  })
+}
+</script>
diff --git a/app/vue.config.js b/app/vue.config.js
index e69de29..fe3a2ba 100644
--- a/app/vue.config.js
+++ b/app/vue.config.js
@@ -0,0 +1 @@
+process.env.VUE_APP_VERSION = require('./package.json').version
\ No newline at end of file
-- 
GitLab