Skip to content

Commit 2a604bb

Browse files
committed
tweaks
1 parent b5a7162 commit 2a604bb

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

public/index.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,15 @@
3030
</main>
3131
</body>
3232
<script>
33-
var public_key = '9c79f14df986a1ec693c'
34-
var api_root = null // 'http://localhost:8000'
33+
var public_key = '9c79f14df986a1ec693c' // '61e9d8d03109e44d7c67'
34+
var api_root = null // 'https://socket-beta.tutorcruncher.com' 'http://localhost:8000'
3535
var socket1 = socket(public_key, {
3636
element: '#socket1',
3737
router_mode: 'history',
3838
api_root: api_root,
3939
mode: 'grid',
40-
// contractor_filter: {
41-
// labels: ['foo', 'bar'],
42-
// label_exclude: ['whatever']
43-
// },
40+
labels_include: [],
41+
labels_exclude: [],
4442
event_callback: function (name, v) {
4543
console.log(name, v)
4644
}

src/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,15 @@ window.socket = function (public_key, config) {
9797
config.element = '#socket'
9898
}
9999

100-
config.contractor_filter = config.contractor_filter || {}
100+
config.contractor_filter = {}
101+
if (config.labels_include) {
102+
config.contractor_filter.label = config.labels_include
103+
delete config.labels_include
104+
}
105+
if (config.labels_exclude) {
106+
config.contractor_filter.label_exclude = config.labels_exclude
107+
delete config.labels_exclude
108+
}
101109

102110
if (config.subject_filter === undefined) {
103111
config.subject_filter = true

0 commit comments

Comments
 (0)