Skip to content

Commit d19619d

Browse files
committed
Make auto update preference accessible in the UI
1 parent e2c9ff0 commit d19619d

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

src/app/network-optin/index.jade

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
input(type='checkbox', name='trackUsageStatistics', data-hook='usage-stats-checkbox')
2525
span Enable Usage Statistics
2626
p.option-description Allow Compass to send anonymous usage statistics.
27-
27+
li
28+
label
29+
input(type='checkbox', name='autoUpdates', data-hook='auto-updates-checkbox')
30+
span Enable Auto Updates
31+
p.option-description Allow Compass to periodically check for new updates
32+
2833
p With any of these options, none of your personal information or stored data will be submitted.
2934

3035
.modal-footer

src/app/network-optin/index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ var NetworkOptInView = View.extend({
4141
hook: 'product-feedback-checkbox',
4242
name: 'checked'
4343
},
44+
autoUpdates: {
45+
type: 'booleanAttribute',
46+
hook: 'auto-updates-checkbox',
47+
name: 'checked'
48+
},
4449
trackUsageStatistics: {
4550
type: 'booleanAttribute',
4651
hook: 'usage-stats-checkbox',
@@ -59,13 +64,14 @@ var NetworkOptInView = View.extend({
5964
this.trackErrors = true;
6065
this.enableFeedbackPanel = true;
6166
this.trackUsageStatistics = true;
62-
// this.autoUpdates = true;
67+
this.autoUpdates = true;
6368
} else {
6469
debug('seen this dialog before, show the real settings');
6570
this.buttonTitle = 'Close';
6671
this.trackErrors = app.preferences.trackErrors;
6772
this.enableFeedbackPanel = app.preferences.enableFeedbackPanel;
6873
this.trackUsageStatistics = app.preferences.trackUsageStatistics;
74+
this.autoUpdates = app.preferences.autoUpdates;
6975
}
7076
},
7177
checkboxChanged: function(evt) {
@@ -76,7 +82,9 @@ var NetworkOptInView = View.extend({
7682
buttonClicked: function() {
7783
var features = [
7884
'enableFeedbackPanel',
79-
'trackUsageStatistics'
85+
'trackUsageStatistics',
86+
'trackErrors',
87+
'autoUpdates'
8088
];
8189

8290
this.preferences.set('showedNetworkOptIn', true);
@@ -94,7 +102,8 @@ var NetworkOptInView = View.extend({
94102
var metadata = {
95103
'track usage stats': settings.trackUsageStatistics,
96104
'product feedback': settings.enableFeedbackPanel,
97-
'track errors': settings.trackErrors
105+
'track errors': settings.trackErrors,
106+
'auto updates': settings.autoUpdates
98107
};
99108
metrics.track('Network Opt-in', 'used', metadata);
100109
},

src/auto-update/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ var NotificationUpdateAvailable = View.extend({
2626
'click a[data-hook=install-update]': 'installUpdate'
2727
},
2828
initialize: function() {
29-
if (!app.isFeatureEnabled('autoUpdates')) {
30-
return debug('autoUpdates feature flag off');
31-
}
3229
ipc.on('app:checking-for-update', function() {
3330
debug('checking for update');
3431
metrics.track('Auto Update', 'checking-for-update');

0 commit comments

Comments
 (0)