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;
float: left;
position: relative;
word-wrap: break-word;
}
.col2 {

View file

@ -574,15 +574,30 @@ function checkNewContent() {
dialog.showMessageBox({
type: 'question',
buttons: ['Yes', 'No'],
defaultId: 1,
cancelId: 1,
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) {
if (idx === 0) {
backupResourceDirectoriesAndRestart();
} else {
// They don't want to update, mark content set as current
userConfig.set('homeContentLastModified', new Date());
}
if (idx === 0) {
dialog.showMessageBox({
type: 'warning',
buttons: ['Yes', 'No'],
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());
}
});
}
}