mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-14 18:10:40 +00:00
Change the user session SocketIO Logic
This commit is contained in:
@ -16,7 +16,7 @@ class CorpusDisplay extends RessourceDisplay {
|
||||
this.setNumTokens(corpus.num_tokens);
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {
|
||||
onPATCH(patch) {
|
||||
let filteredPatch;
|
||||
let operation;
|
||||
let re;
|
||||
|
@ -18,7 +18,7 @@ class JobDisplay extends RessourceDisplay {
|
||||
this.setTitle(job.title);
|
||||
}
|
||||
|
||||
usersPatchHandler(patch) {
|
||||
onPATCH(patch) {
|
||||
let filteredPatch;
|
||||
let operation;
|
||||
let re;
|
||||
|
@ -2,13 +2,13 @@ class RessourceDisplay {
|
||||
constructor(displayElement) {
|
||||
this.displayElement = displayElement;
|
||||
this.userId = this.displayElement.dataset.userId;
|
||||
app.addEventListener('users.patch', patch => this.usersPatchHandler(patch));
|
||||
app.getUserById(this.userId).then(user => this.init(user));
|
||||
app.socket.on('PATCH', (patch) => {this.onPATCH(patch);});
|
||||
app.subscribeUser(this.userId).then((user) => {this.init(user);});
|
||||
}
|
||||
|
||||
init(user) {throw 'Not implemented';}
|
||||
|
||||
usersPatchHandler(patch) {throw 'Not implemented';}
|
||||
onPATCH(patch) {throw 'Not implemented';}
|
||||
|
||||
setElement(element, value) {
|
||||
switch (element.tagName) {
|
||||
|
Reference in New Issue
Block a user