Skip to content

Commit ee6dd1f

Browse files
committed
Show a 🔒 next to connections which use auth
1 parent 9345454 commit ee6dd1f

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/connect/connection.jade

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
li.list-group-item
22
.close-icon(data-hook='close')
33
i.fa.fa-close
4-
a(data-hook='name')
4+
a()
5+
span(data-hook='name')
6+
span(style='padding-left: 4px;',
7+
data-hook='has-auth',
8+
title='This connection has authentication enabled.')
9+
i.fa.fa-lock

src/connect/sidebar.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ var SidebarItemView = View.extend({
2828
hover: {
2929
type: 'toggle',
3030
hook: 'close'
31+
},
32+
has_auth: {
33+
type: 'booleanClass',
34+
hook: 'has-auth',
35+
yes: 'visible',
36+
no: 'hidden'
37+
}
38+
},
39+
derived: {
40+
has_auth: {
41+
deps: ['model.auth_mechanism'],
42+
fn: function() {
43+
return this.model.auth_mechanism !== null;
44+
}
3145
}
3246
},
3347
template: require('./connection.jade'),

0 commit comments

Comments
 (0)