Skip to content

Commit

Permalink
Added indication for deleted rules in request list
Browse files Browse the repository at this point in the history
  • Loading branch information
dutzi committed Oct 19, 2014
1 parent b7aaf1e commit 499b7cd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion chrome-extension/app/panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@
</div>
<div id="requestsContainer" class="vbox">

<div ng-repeat="request in requests | filter:requestFilter" class="request-item" ng-class="{'request-item-error': request.error}">
<div class="request-item"
ng-repeat="request in requests | filter:requestFilter"
ng-class="{'request-item-error': request.error, 'request-item-removed': request.isRemoved}">
<span ng-show="request.isModified" class="request-item-modified-badge">Modified</span>
<a class="request-item-link"
href="#"
Expand Down
1 change: 1 addition & 0 deletions chrome-extension/app/scripts/controllers/PanelCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ module.controller('PanelCtrl', ['$scope', '$filter', '$window', 'ProxyService',
$scope.onDiscardChangesClick = function(request, e) {
var url = request.url;

request.isRemoved = true;
for (var i = 0; i < $scope.proxyRules.length; i++) {
if ($scope.proxyRules[i].url === url) {
$scope.proxyRules.splice(i, 1);
Expand Down
9 changes: 8 additions & 1 deletion chrome-extension/app/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,17 @@ body {
font-weight: normal;
}

.request-item-modified.request-item-removed .request-item-discard-changes {
.request-item.request-item-removed .request-item-discard-changes {
visibility: hidden;
}

.request-item.request-item-removed .request-item-modified-badge {
background: none;
border: 1px solid #ccc;
box-shadow: none;
color: #aaa;
}

.log-item {
flex: none;
padding: 4px 0px 3px 4px;
Expand Down

0 comments on commit 499b7cd

Please sign in to comment.