Move restart button into global menu

// FREEBIE
This commit is contained in:
lilia 2016-03-18 16:21:55 -07:00
parent c16356084d
commit 647c2761e0
5 changed files with 13 additions and 17 deletions

View file

@ -234,5 +234,9 @@
"newMessages": { "newMessages": {
"message": "New Messages", "message": "New Messages",
"description": "Displayed in notifications for multiple messages" "description": "Displayed in notifications for multiple messages"
},
"restartSignal": {
"message": "Restart Signal",
"description": "Menu item for restarting the program."
} }
} }

View file

@ -12,6 +12,7 @@
<ul class='menu-list'> <ul class='menu-list'>
<li><a class='settings'>{{ settings }}</a></li> <li><a class='settings'>{{ settings }}</a></li>
<li><a class='show-debug-log'>{{ submitDebugLog }}</a></li> <li><a class='show-debug-log'>{{ submitDebugLog }}</a></li>
<li><a class='restart-signal'>{{ restartSignal }}</a></li>
</ul> </ul>
</div> </div>
<span class='socket-status' title='Restart Signal'></span> <span class='socket-status' title='Restart Signal'></span>

View file

@ -32,12 +32,6 @@
this.$el.attr('class', className); this.$el.attr('class', className);
this.$el.text(message); this.$el.text(message);
} }
},
events: {
'click': 'reloadBackgroundPage'
},
reloadBackgroundPage: function() {
chrome.runtime.reload();
} }
}); });
@ -107,6 +101,7 @@
searchForPeopleOrGroups: i18n('searchForPeopleOrGroups'), searchForPeopleOrGroups: i18n('searchForPeopleOrGroups'),
submitDebugLog: i18n('submitDebugLog'), submitDebugLog: i18n('submitDebugLog'),
settings: i18n('settings'), settings: i18n('settings'),
restartSignal: i18n('restartSignal')
}, },
events: { events: {
'click': 'closeMenu', 'click': 'closeMenu',
@ -114,7 +109,11 @@
'click .show-debug-log': 'showDebugLog', 'click .show-debug-log': 'showDebugLog',
'click .settings': 'showSettings', 'click .settings': 'showSettings',
'select .gutter .conversation-list-item': 'openConversation', 'select .gutter .conversation-list-item': 'openConversation',
'input input.search': 'filterContacts' 'input input.search': 'filterContacts',
'click .restart-signal': 'reloadBackgroundPage'
},
reloadBackgroundPage: function() {
chrome.runtime.reload();
}, },
showSettings: function() { showSettings: function() {
var view = new Whisper.SettingsView().render(); var view = new Whisper.SettingsView().render();

View file

@ -31,14 +31,9 @@
* { * {
display: inline; display: inline;
cursor: pointer;
padding-left: 20px; padding-left: 20px;
border-radius: $header-height; border-radius: 100%;
vertical-align: middle; vertical-align: middle;
&:hover {
background: url('/images/refresh.png') center;
}
} }
.connecting .icon { .connecting .icon {
background-color: $blue; background-color: $blue;

View file

@ -422,12 +422,9 @@ input[type=text]:active, input[type=text]:focus, input[type=search]:active, inpu
line-height: 36px; } line-height: 36px; }
.socket-status * { .socket-status * {
display: inline; display: inline;
cursor: pointer;
padding-left: 20px; padding-left: 20px;
border-radius: 36px; border-radius: 100%;
vertical-align: middle; } vertical-align: middle; }
.socket-status *:hover {
background: url("/images/refresh.png") center; }
.socket-status .connecting .icon { .socket-status .connecting .icon {
background-color: #2090ea; } background-color: #2090ea; }
.socket-status .closing { .socket-status .closing {