2
0

added history

This commit is contained in:
2018-08-07 13:21:22 +02:00
parent 0628190223
commit a799e8e9e8
4 changed files with 82 additions and 49 deletions

View File

@@ -32,15 +32,22 @@ export class HistoryService {
this.history.push({
date: new Date(),
graphs: graphs,
config: config
config: config,
hash: this.hash(graphs)
});
}
console.log(config);
public hash(graphs) {
return btoa(JSON.stringify([graphs]));
}
public list() {
return this.history;
}
public restore(graphs: Graph[]) {
console.log(graphs);
}
}