Add frontend support for expiring releases
When a release expires, it gets a persistent banner notification to upgrade, and an ephemeral toast warning when trying to send a message. // FREEBIE
This commit is contained in:
parent
c442a02cb6
commit
9aa429e18a
9 changed files with 104 additions and 8 deletions
|
@ -94,14 +94,20 @@
|
|||
extension.windows.onClosed(function() {
|
||||
this.inboxListView.stopListening();
|
||||
}.bind(this));
|
||||
|
||||
if (extension.expired()) {
|
||||
var banner = new Whisper.ExpiredAlertBanner().render();
|
||||
banner.$el.prependTo(this.$el);
|
||||
this.$el.addClass('expired');
|
||||
}
|
||||
},
|
||||
render_attributes: {
|
||||
welcomeToSignal: i18n('welcomeToSignal'),
|
||||
selectAContact: i18n('selectAContact'),
|
||||
searchForPeopleOrGroups: i18n('searchForPeopleOrGroups'),
|
||||
submitDebugLog: i18n('submitDebugLog'),
|
||||
settings: i18n('settings'),
|
||||
restartSignal: i18n('restartSignal')
|
||||
welcomeToSignal : i18n('welcomeToSignal'),
|
||||
selectAContact : i18n('selectAContact'),
|
||||
searchForPeopleOrGroups : i18n('searchForPeopleOrGroups'),
|
||||
submitDebugLog : i18n('submitDebugLog'),
|
||||
settings : i18n('settings'),
|
||||
restartSignal : i18n('restartSignal'),
|
||||
},
|
||||
events: {
|
||||
'click': 'closeMenu',
|
||||
|
@ -166,4 +172,15 @@
|
|||
}
|
||||
});
|
||||
|
||||
Whisper.ExpiredAlertBanner = Whisper.View.extend({
|
||||
templateName: 'expired_alert',
|
||||
className: 'expiredAlert clearfix',
|
||||
render_attributes: function() {
|
||||
return {
|
||||
expiredWarning: i18n('expiredWarning'),
|
||||
upgrade: i18n('upgrade'),
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue