mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
WebCommitView: Add a state display
This adds a div in the webview to display the current commit state. It allows us to notify the user of new commits by showing something in the webview, rather than a modal dialog.
This commit is contained in:
@@ -12,9 +12,23 @@ var showNewFile = function(file)
|
||||
diff.style.display = '';
|
||||
}
|
||||
|
||||
var hideState = function() {
|
||||
$("state").style.display = "none";
|
||||
}
|
||||
|
||||
var setState = function(state) {
|
||||
$("state").style.display = "";
|
||||
$("diff").style.display = "none";
|
||||
$("state").innerHTML = state.escapeHTML();
|
||||
}
|
||||
|
||||
var showFileChanges = function(file, cached) {
|
||||
if (!file)
|
||||
return;
|
||||
|
||||
$("diff").style.display = 'none';
|
||||
hideNotification();
|
||||
hideState();
|
||||
|
||||
if (file.status == 0) // New file?
|
||||
return showNewFile(file);
|
||||
|
||||
Reference in New Issue
Block a user