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