Skip to content

Commit

Permalink
Added relevantCards to remaining notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
ericman314 committed Jan 2, 2019
1 parent 6c0c408 commit 95def31
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 23 deletions.
31 changes: 23 additions & 8 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion client/src/components/client/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import TrainingPlayer from "helpers/trainingPlayer";
import { subscribe } from "../../helpers/pubsub";
import { Mutation } from "react-apollo";
import gql from "graphql-tag";
import { subscribe } from "../../helpers/pubsub";

const Blackout = () => {
return (
Expand Down
23 changes: 17 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion server/src/events/internalComm.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ App.on("internalCommCallIncoming", ({ id, incoming }) => {
station: s.name,
title: `New Internal Call`,
body: incoming,
color: "info"
color: "info",
relevantCards: [ "CommInternal" ]
});
});
});
Expand Down
9 changes: 6 additions & 3 deletions server/src/events/lrComm.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ App.on(
station: s.name,
title: `New Long Range Message Queued`,
body: `Message composed by ${sender}`,
color: "info"
color: "info",
relevantCards: [ cardName ]
});
}
});
Expand All @@ -63,7 +64,8 @@ App.on(
station: s.name,
title: `New Long Range Message`,
body: `From ${sender}`,
color: "info"
color: "info",
relevantCards: [ "CommDecoding" ]
});
}
});
Expand Down Expand Up @@ -133,7 +135,8 @@ App.on("approveLongRangeMessage", ({ id, message }) => {
station: s.name,
title: `New Long Range Message Queued`,
body: `Message composed by ${messageObj.sender}`,
color: "info"
color: "info",
relevantCards: [ "LongRangeComm" ]
});
});
});
Expand Down
3 changes: 2 additions & 1 deletion server/src/events/probes.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ App.on("probeProcessedData", ({ id, simulatorId, data = "", flash }) => {
station: s.name,
title: `New Processed Data`,
body: data,
color: "info"
color: "info",
relevantCards: [ "ProbeNetwork" ]
});
});
pubsub.publish("probesUpdate", App.systems.filter(s => s.type === "Probes"));
Expand Down
3 changes: 2 additions & 1 deletion server/src/events/sickbay.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ App.on("completeDeconProgram", ({ id }) => {
station: s,
title: `Decon Program Complete`,
body: `${sys.deconProgram}: ${sys.deconLocation}`,
color: "success"
color: "success",
relevantCards: [ "Decontamination" ]
});
});
sys.endDeconProgram();
Expand Down
6 changes: 4 additions & 2 deletions server/src/events/systems.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ App.on("setDamageStepValidation", ({ id, validation }) => {
station: s,
title: `Damage report step validation rejected`,
body: sys.name,
color: "danger"
color: "danger",
relevantCards: [ "DamageControl" ]
})
);
} else {
Expand Down Expand Up @@ -388,7 +389,8 @@ App.on("validateDamageStep", ({ id }) => {
station: s,
title: `Damage report step validation accepted`,
body: sys.name,
color: "success"
color: "success",
relevantCards: [ "DamageControl" ]
})
);
sendUpdate(sys);
Expand Down

0 comments on commit 95def31

Please sign in to comment.