Commit 3168d152 authored by Anders B. Clausen's avatar Anders B. Clausen
Browse files

Site now loads values from backend on startup. Backend default also changed to current default.

parent 6348a8c2
......@@ -6,8 +6,8 @@ hostName = '0.0.0.0'
serverPort = 1337
db = {
'katrine-marie' : '{"left":[],"right":[{"height":400,"blocks":[{"type":"Calendar","width":100}]}]}',
'isaac' : '{"left":[],"right":[{"height":400,"blocks":[{"type":"Feed","width":100}]}]}'
'katrine-marie' : '[{"height":400,"blocks":[{"type":"Calendar","width":75},{"type":"ActiveCourses","width":25}]},{"height":250,"blocks":[{"type":"Deadlines","width":100}]},{"height":300,"blocks":[{"type":"Feed","width":50},{"type":"Mail","width":25},{"type":"Mail","width":25}]}]',
'isaac' : '[{"height":400,"blocks":[{"type":"Calendar","width":75},{"type":"ActiveCourses","width":25}]},{"height":250,"blocks":[{"type":"Deadlines","width":100}]},{"height":300,"blocks":[{"type":"Feed","width":50},{"type":"Mail","width":25},{"type":"Mail","width":25}]}]'
}
class MyServer(BaseHTTPRequestHandler):
......
......@@ -57,6 +57,10 @@ export default {
deleting: false,
resizing: false,
created() {
this.loadLayout("isaac");
},
data() {
return {
layout: [
......@@ -467,6 +471,7 @@ export default {
const request = sendServerRequest(type, payload);
request.onload = () => {
const response = request.response;
this.layout = [];
Object.assign(this.layout, JSON.parse(response));
}
},
......
Supports Markdown
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