Display sync status in favicon and title. #221
Merged
Conversation
Signed-off-by: Aviral Dasgupta <me@aviraldg.com>
@@ -907,6 +907,11 @@ module.exports = React.createClass({ | |||
console.warn("Failed to set badge count: "+e.message); | |||
} | |||
document.title = "Vector"+(notifCount > 0 ? " ["+notifCount+"]" : ""); | |||
|
|||
if(state === "ERROR") { | |||
this.favicon.badge("×"); |
ara4n
Mar 16, 2016
Member
I think this has to be in a try block, as per the previous this.favicon.badge()
?
I think this has to be in a try block, as per the previous this.favicon.badge()
?
|
||
if(state === "ERROR") { | ||
this.favicon.badge("×"); | ||
document.title = "Vector [ERROR]"; |
ara4n
Mar 16, 2016
Member
I suggest [offline] rather than the scarier looking [ERROR] :)
I suggest [offline] rather than the scarier looking [ERROR] :)
other than comments inline, this LGTM, thanks! In future, if we get around to updating the badge count locally rather than basing it purely off the |
@ara4n This should be ready to go; doesn't hide the badge count anymore, instead uses colour to indicate status. |
thanks! - just merging now. i'd prefer we stick with red badges for the count, but will switch to bright #f00 for the error state and #d00 for normal badge count. |
ara4n
added a commit
that referenced
this pull request
Mar 16, 2016
Display sync status in favicon and title.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.