Merge pull request #8702 from Atlante45/console

Restore "Are you sure?" pop-up. Default to "No"
This commit is contained in:
Chris Collins 2016-10-03 11:12:18 -07:00 committed by GitHub
commit 4c247aecb3
2 changed files with 23 additions and 7 deletions

View file

@ -124,6 +124,7 @@ a:hover {
overflow: hidden; overflow: hidden;
float: left; float: left;
position: relative; position: relative;
word-wrap: break-word;
} }
.col2 { .col2 {

View file

@ -574,15 +574,30 @@ function checkNewContent() {
dialog.showMessageBox({ dialog.showMessageBox({
type: 'question', type: 'question',
buttons: ['Yes', 'No'], buttons: ['Yes', 'No'],
defaultId: 1,
cancelId: 1,
title: 'New home content', title: 'New home content',
message: 'A newer version of the home content set is available.\nDo you wish to update?' message: 'A newer version of the home content set is available.\nDo you wish to update?',
noLink: true,
}, function(idx) { }, function(idx) {
if (idx === 0) { if (idx === 0) {
backupResourceDirectoriesAndRestart(); dialog.showMessageBox({
} else { type: 'warning',
// They don't want to update, mark content set as current buttons: ['Yes', 'No'],
userConfig.set('homeContentLastModified', new Date()); defaultId: 1,
} cancelId: 1,
title: 'Are you sure?',
message: 'Updating with the new content will remove all your current content and settings and place them in a backup folder.\nAre you sure?',
noLink: true,
}, function(idx) {
if (idx === 0) {
backupResourceDirectoriesAndRestart();
}
});
} else {
// They don't want to update, mark content set as current
userConfig.set('homeContentLastModified', new Date());
}
}); });
} }
} }