Skip to content

Commit 7cd3ae1

Browse files
committed
add sensing_online
1 parent f368f1b commit 7cd3ae1

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/make-toolbox-xml.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ const sensing = function (isInitialSetup, isStage, targetId, colors) {
521521
<block id="current" type="sensing_current"/>
522522
<block type="sensing_dayssince2000"/>
523523
${blockSeparator}
524+
<block id="online" type="sensing_online"/>
524525
<block type="sensing_username"/>
525526
${categorySeparator}
526527
</category>

src/lib/opcode-labels.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,13 @@ const messages = defineMessages({
130130
},
131131
sensing_dayssince2000: {
132132
defaultMessage: 'days since 2000',
133-
description: 'Label for the days since 2000 monitor when show on the stage',
133+
description: 'Label for the days since 2000 monitor when shown on the stage',
134134
id: 'tw.opcode.2000'
135+
},
136+
sensing_online: {
137+
defaultMessage: 'online?',
138+
description: 'Name of "online?" block',
139+
id: 'tw.opcode.online'
135140
}
136141
});
137142

@@ -178,7 +183,8 @@ class OpcodeLabels {
178183
sensing_username: {category: 'sensing'},
179184
sensing_current: {category: 'sensing'},
180185
sensing_timer: {category: 'sensing'},
181-
sensing_dayssince2000: {category: 'sensing'}
186+
sensing_dayssince2000: {category: 'sensing'},
187+
sensing_online: {category: 'sensing'}
182188
};
183189

184190
// Initialize opcodeMap with default strings
@@ -256,6 +262,7 @@ class OpcodeLabels {
256262
};
257263
this._opcodeMap.sensing_timer.labelFn = () => this._translator(messages.sensing_timer);
258264
this._opcodeMap.sensing_dayssince2000.labelFn = () => this._translator(messages.sensing_dayssince2000);
265+
this._opcodeMap.sensing_online.labelFn = () => this._translator(messages.sensing_online);
259266
}
260267

261268
/**

0 commit comments

Comments
 (0)