mirror of
https://github.com/bitwarden/browser
synced 2025-01-30 13:05:28 +01:00
react to model restructure on API
This commit is contained in:
parent
605bdd0ea0
commit
39559e203a
@ -15,25 +15,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (response.GlobalEquivalentDomains) {
|
if (response.GlobalEquivalentDomains) {
|
||||||
for (var globalDomain in response.GlobalEquivalentDomains) {
|
for (i = 0; i < response.GlobalEquivalentDomains.length; i++) {
|
||||||
if (response.GlobalEquivalentDomains.hasOwnProperty(globalDomain)) {
|
$scope.globalEquivalentDomains.push({
|
||||||
var domain = {
|
domains: response.GlobalEquivalentDomains[i].Domains.join(', '),
|
||||||
values: response.GlobalEquivalentDomains[globalDomain],
|
excluded: response.GlobalEquivalentDomains[i].Excluded,
|
||||||
excluded: false,
|
key: response.GlobalEquivalentDomains[i].Type
|
||||||
key: globalDomain
|
});
|
||||||
};
|
|
||||||
|
|
||||||
if (response.ExcludedGlobalEquivalentDomains) {
|
|
||||||
for (i = 0; i < response.ExcludedGlobalEquivalentDomains.length; i++) {
|
|
||||||
if (response.ExcludedGlobalEquivalentDomains[i] === globalDomain) {
|
|
||||||
domain.excluded = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.globalEquivalentDomains.push(domain);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -44,7 +31,7 @@
|
|||||||
|
|
||||||
$scope.customize = function (globalDomain) {
|
$scope.customize = function (globalDomain) {
|
||||||
globalDomain.excluded = true;
|
globalDomain.excluded = true;
|
||||||
$scope.equivalentDomains.push(globalDomain.values.join(', '));
|
$scope.equivalentDomains.push(globalDomain.domains);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.delete = function (i) {
|
$scope.delete = function (i) {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<i class="fa fa-lg fa-cut"></i>
|
<i class="fa fa-lg fa-cut"></i>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td ng-class="{strike: globalDomain.excluded}">{{globalDomain.values.join(', ')}}</td>
|
<td ng-class="{strike: globalDomain.excluded}">{{globalDomain.domains}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tbody ng-if="!globalEquivalentDomains.length">
|
<tbody ng-if="!globalEquivalentDomains.length">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user