mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Added Tinycon (Unread message tab's icon)
This commit is contained in:
parent
f1b3271b4d
commit
47bb848905
15 changed files with 426 additions and 17 deletions
|
|
@ -172,7 +172,7 @@
|
|||
/**
|
||||
* @param {string} sTitle
|
||||
*/
|
||||
AbstractApp.prototype.setTitle = function (sTitle)
|
||||
AbstractApp.prototype.setWindowTitle = function (sTitle)
|
||||
{
|
||||
sTitle = ((Utils.isNormal(sTitle) && 0 < sTitle.length) ? sTitle + ' - ' : '') +
|
||||
Settings.settingsGet('Title') || '';
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
$ = require('$'),
|
||||
moment = require('moment'),
|
||||
SimplePace = require('SimplePace'),
|
||||
Tinycon = require('Tinycon'),
|
||||
|
||||
Enums = require('Common/Enums'),
|
||||
Globals = require('Common/Globals'),
|
||||
|
|
@ -1342,7 +1343,7 @@
|
|||
{
|
||||
Globals.$html.addClass('rl-user-auth');
|
||||
|
||||
this.setTitle(Translator.i18n('TITLES/LOADING'));
|
||||
this.setWindowTitle(Translator.i18n('TITLES/LOADING'));
|
||||
|
||||
//require.ensure([], function() { // require code splitting
|
||||
|
||||
|
|
@ -1479,6 +1480,17 @@
|
|||
_.defer(function () {
|
||||
self.initVerticalLayoutResizer(Enums.ClientSideKeyName.FolderListSize);
|
||||
});
|
||||
|
||||
if (Tinycon)
|
||||
{
|
||||
Tinycon.setOptions({
|
||||
fallback: false
|
||||
});
|
||||
|
||||
Events.sub('mailbox.inbox-unread-count', function (iCount) {
|
||||
Tinycon.setBubble(0 < iCount ? (99 < iCount ? 99 : iCount) : 0);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
LoginAdminScreen.prototype.onShow = function ()
|
||||
{
|
||||
require('App/Admin').setTitle('');
|
||||
require('App/Admin').setWindowTitle('');
|
||||
};
|
||||
|
||||
module.exports = LoginAdminScreen;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
SettingsAdminScreen.prototype.onShow = function ()
|
||||
{
|
||||
require('App/Admin').setTitle('');
|
||||
require('App/Admin').setWindowTitle('');
|
||||
};
|
||||
|
||||
module.exports = SettingsAdminScreen;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
AboutUserScreen.prototype.onShow = function ()
|
||||
{
|
||||
require('App/User').setTitle('RainLoop');
|
||||
require('App/User').setWindowTitle('RainLoop');
|
||||
};
|
||||
|
||||
module.exports = AboutUserScreen;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
LoginUserScreen.prototype.onShow = function ()
|
||||
{
|
||||
require('App/User').setTitle('');
|
||||
require('App/User').setWindowTitle('');
|
||||
};
|
||||
|
||||
module.exports = LoginUserScreen;
|
||||
|
|
|
|||
|
|
@ -45,21 +45,21 @@
|
|||
*/
|
||||
MailBoxUserScreen.prototype.oLastRoute = {};
|
||||
|
||||
MailBoxUserScreen.prototype.setNewTitle = function ()
|
||||
MailBoxUserScreen.prototype.updateWindowTitle = function ()
|
||||
{
|
||||
var
|
||||
sEmail = AccountStore.email(),
|
||||
nFoldersInboxUnreadCount = FolderStore.foldersInboxUnreadCount()
|
||||
;
|
||||
|
||||
require('App/User').setTitle(('' === sEmail ? '' :
|
||||
require('App/User').setWindowTitle(('' === sEmail ? '' : '' +
|
||||
(0 < nFoldersInboxUnreadCount ? '(' + nFoldersInboxUnreadCount + ') ' : ' ') +
|
||||
sEmail + ' - ') + Translator.i18n('TITLES/MAILBOX'));
|
||||
};
|
||||
|
||||
MailBoxUserScreen.prototype.onShow = function ()
|
||||
{
|
||||
this.setNewTitle();
|
||||
this.updateWindowTitle();
|
||||
Globals.keyScope(Enums.KeyState.MessageList);
|
||||
};
|
||||
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
SettingsStore.layout.valueHasMutated();
|
||||
}, 50);
|
||||
|
||||
Events.sub('mailbox.inbox-unread-count', function (iCount) {
|
||||
Events.sub('mailbox.inbox-unread-count', _.bind(function (iCount) {
|
||||
|
||||
FolderStore.foldersInboxUnreadCount(iCount);
|
||||
|
||||
|
|
@ -124,12 +124,10 @@
|
|||
oItem.count(iCount);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
FolderStore.foldersInboxUnreadCount.subscribe(function () {
|
||||
this.setNewTitle();
|
||||
}, this);
|
||||
this.updateWindowTitle();
|
||||
|
||||
}, this));
|
||||
};
|
||||
|
||||
MailBoxUserScreen.prototype.onBuild = function ()
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
SettingsUserScreen.prototype.setSettingsTitle = function ()
|
||||
{
|
||||
require('App/User').setTitle(this.sSettingsTitle);
|
||||
require('App/User').setWindowTitle(this.sSettingsTitle);
|
||||
};
|
||||
|
||||
module.exports = SettingsUserScreen;
|
||||
|
|
|
|||
5
dev/bootstrap.js
vendored
5
dev/bootstrap.js
vendored
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
window['__APP_BOOT'] = function (fCall) {
|
||||
|
||||
$(function () {
|
||||
$(_.delay(function () {
|
||||
|
||||
if (!$('#rl-content').is(':visible'))
|
||||
{
|
||||
|
|
@ -82,7 +82,8 @@
|
|||
}
|
||||
|
||||
window['__APP_BOOT'] = null;
|
||||
});
|
||||
|
||||
}, 10));
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue