aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Message.ts2
-rw-r--r--src/server/ServerUtil.ts3
-rw-r--r--src/server/authentication/models/current_user_utils.ts3
3 files changed, 7 insertions, 1 deletions
diff --git a/src/server/Message.ts b/src/server/Message.ts
index a2d1ab829..05ae0f19a 100644
--- a/src/server/Message.ts
+++ b/src/server/Message.ts
@@ -45,7 +45,7 @@ export class GetFieldArgs {
}
export enum Types {
- Number, List, Key, Image, Web, Document, Text, RichText, DocumentReference, Html, Video, Audio, Ink, PDF, Tuple
+ Number, List, Key, Image, Web, Document, Text, RichText, DocumentReference, Html, Video, Audio, Ink, PDF, Tuple, HistogramOp
}
export class DocumentTransfer implements Transferable {
diff --git a/src/server/ServerUtil.ts b/src/server/ServerUtil.ts
index f10f82deb..f958df04b 100644
--- a/src/server/ServerUtil.ts
+++ b/src/server/ServerUtil.ts
@@ -17,6 +17,7 @@ import { VideoField } from '../fields/VideoField';
import { InkField } from '../fields/InkField';
import { PDFField } from '../fields/PDFField';
import { TupleField } from '../fields/TupleField';
+import { HistogramField } from '../fields/HistogramField';
@@ -50,6 +51,8 @@ export class ServerUtils {
return new Key(data, id, false)
case Types.Image:
return new ImageField(new URL(data), id, false)
+ case Types.HistogramOp:
+ return HistogramField.FromJson(id, data);
case Types.PDF:
return new PDFField(new URL(data), id, false)
case Types.List:
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts
index 055e4cc97..4b42e40b6 100644
--- a/src/server/authentication/models/current_user_utils.ts
+++ b/src/server/authentication/models/current_user_utils.ts
@@ -8,6 +8,7 @@ import { KeyStore } from "../../../fields/KeyStore";
import { ListField } from "../../../fields/ListField";
import { Documents } from "../../../client/documents/Documents";
import { Schema, Attribute, AttributeGroup } from "../../../client/northstar/model/idea/idea";
+import { observable, computed, action } from "mobx";
export class CurrentUserUtils {
private static curr_email: string;
@@ -16,6 +17,7 @@ export class CurrentUserUtils {
//TODO tfs: these should be temporary...
private static mainDocId: string | undefined;
private static activeSchema: Schema | undefined;
+ @observable public static ActiveSchemaName: string = "";
public static get email(): string {
return this.curr_email;
@@ -37,6 +39,7 @@ export class CurrentUserUtils {
this.mainDocId = id;
}
+
public static get ActiveSchema(): Schema | undefined {
return this.activeSchema;
}