Commit eb1d76ea authored by Adam Procter's avatar Adam Procter

stops local reload

This is not the way to fix but stops local reload, data will not sync from localhost to server as CORS will not allow it.
parent bd10cd79
Pipeline #167 failed with stages
in 1 minute and 12 seconds
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>nn2</title><link href=/css/about.ff293c24.css rel=prefetch><link href=/css/home.a45d8d52.css rel=prefetch><link href=/js/about.f2f86df9.js rel=prefetch><link href=/js/home.1bcb97da.js rel=prefetch><link href=/css/app.074079a2.css rel=preload as=style><link href=/js/app.94ae5a46.js rel=preload as=script><link href=/js/chunk-vendors.c055d76a.js rel=preload as=script><link href=/css/app.074079a2.css rel=stylesheet></head><body><noscript><strong>We're sorry but nn2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div></body></html><script src=/js/chunk-vendors.c055d76a.js></script><script src=/js/app.94ae5a46.js></script>
\ No newline at end of file
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/favicon.ico><title>nn2</title><link href=/css/about.ff293c24.css rel=prefetch><link href=/css/home.a45d8d52.css rel=prefetch><link href=/js/about.f2f86df9.js rel=prefetch><link href=/js/home.e8d80d2c.js rel=prefetch><link href=/css/app.074079a2.css rel=preload as=style><link href=/js/app.86f0a9fd.js rel=preload as=script><link href=/js/chunk-vendors.c055d76a.js rel=preload as=script><link href=/css/app.074079a2.css rel=stylesheet></head><body><noscript><strong>We're sorry but nn2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div></body></html><script src=/js/chunk-vendors.c055d76a.js></script><script src=/js/app.86f0a9fd.js></script>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<template>
<div id="knowledgeobject">
<ul>
<!-- <li>id = {{object.id}}</li>
......
......@@ -3,6 +3,7 @@
<logo></logo>
<instance :instancename="instancename">
</instance>
</section>
</template>
......@@ -10,13 +11,14 @@
import pouchdb from 'pouchdb'
var localdb = new pouchdb('knowledge');
// server admin has to create DB first and CORS allows specific domains.
//server admin has to create DB first and CORS allows specific domains.
var db = new pouchdb('https://nn.adamprocter.co.uk/knowledge');
// @ is an alias to /src
import instance from "@/components/current-instance.vue";
import logo from "@/components/instance-logo.vue";
import { mapActions } from 'vuex';
var n = 0
export default {
name: 'home',
......@@ -33,9 +35,9 @@ export default {
instancename: String
},
created() {
if (db) localdb.sync(db)
localdb.allDocs({
if (db) localdb.sync(db)
if (n == 0){
localdb.allDocs({
include_docs: true,
attachments: true
}).then(result => {
......@@ -43,6 +45,8 @@ export default {
this.$store.dispatch('addKnowledgeObject', element)
})
})
n++
}
}
}
......
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