Commit 36a2b302 authored by Mathew Parker's avatar Mathew Parker

more cleanup

parent 53c890ca
Pipeline #98 failed with stages
in 1 minute and 14 seconds
import SVG from 'svg.js'
// next two libaries used within SVG.js
//
/* eslint-disable no-unused-vars */
import { draggy } from 'svg.draggy.js'
import { connectable } from 'svg.connectable.js'
/* global exports draggy */
/* global exports connectable */
export function svg() {
// SVG UI next
var that = {}
......@@ -32,3 +37,4 @@ export function svg() {
}
return that
}
/* eslint-enable no-unused-vars */
......@@ -8,7 +8,7 @@
<script>
import spatialui from './spatial-ui.vue'
// helper to access data from vuex
import { mapActions, mapGetters } from 'vuex'
//import { mapActions, mapGetters } from 'vuex'
export default {
name: 'current-instance',
......
......@@ -17,58 +17,57 @@ import pouchdb from 'pouchdb'
// server admin has to create DB first and CORS allows specific domains.
var db = new pouchdb('https://nn.adamprocter.co.uk/testingdb');
export default {
name: 'register-account',
data() {
return {
name:'',
email:'',
domain:'',
permissions:1,
verified:false
}
name: '',
email: '',
domain: '',
permissions: 1,
verified: false
}
},
mounted() {
this.checkData()
},
mounted() {
this.checkData();
},
methods: {
register() {
var uniqueid = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
var uniqueid
= Math.random()
.toString(36)
.substring(2, 15) + Math.random().toString(36).substring(2, 15)
db.put({
_id:uniqueid,
name:this.name,
email:this.email,
domain:this.domain,
permissions:this.permissions,
verified:this.verified
})
},
checkData(){
db.info().then(function (info) {
// console.log(info);
})
// db.get('one').then(function (doc) {
// console.log(doc);
// });
db.put({
_id: uniqueid,
name: this.name,
email: this.email,
domain: this.domain,
permissions: this.permissions,
verified: this.verified
})
},
checkData(){
db.info()
.then(function () {
//.then(function (info) {
})
// db.get('one').then(function (doc) {
// console.log(doc);
// });
db.allDocs({
include_docs: true,
attachments: true
}).then(function (result) {
// handle result
// console.log(result)
}).catch(function (err) {
// console.log(err);
});
}
db.allDocs({
include_docs: true,
attachments: true
}).then(function () {
//}).then(function (result) {
// handle result
// console.log(result)
}).catch(function () {
//}).catch(function (err) {
// console.log(err);
})
}
}
}
</script>
......
......@@ -29,7 +29,7 @@ export default new Vuex.Store({
}
},
actions: {
login({ commit }, creds) {
login({ commit }) {
commit(LOGIN);
return new Promise(resolve => {
setTimeout(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment