bitwarden-estensione-browser/src/app/settings/domain-rules.component.html

67 lines
3.4 KiB
HTML
Raw Normal View History

2018-06-26 05:16:59 +02:00
<div class="page-header">
<h1>{{'domainRules' | i18n}}</h1>
</div>
<p>{{'domainRulesDesc' | i18n}}</p>
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" ngNativeValidate>
2018-06-26 17:50:23 +02:00
<h2>{{'customEqDomains' | i18n}}</h2>
<p *ngIf="loading">
<i class="fa fa-spinner fa-spin text-muted"></i>
</p>
<ng-container *ngIf="!loading">
<div class="form-group d-flex" *ngFor="let d of custom; let i = index; trackBy: indexTrackBy">
<div class="flex-fill">
<label for="customDomain_{{i}}" class="sr-only">{{'customDomainX' | i18n : (i + 1)}}</label>
<textarea class="form-control" name="CustomDomain[{{i}}]" id="customDomain_{{i}}" [(ngModel)]="custom[i]" placeholder="{{'ex' | i18n}} google.com, gmail.com"
required></textarea>
2018-06-26 17:50:23 +02:00
</div>
<button type="button" class="btn btn-link text-danger ml-2" (click)="remove(i)" title="{{'remove' | i18n}}">
<i class="fa fa-minus-circle fa-lg"></i>
</button>
</div>
<button type="button" appBlurClick (click)="add()" class="btn btn-outline-secondary btn-sm mb-2">
2018-07-08 06:27:37 +02:00
<i class="fa fa-plus fa-fw"></i> {{'newCustomDomain' | i18n}}
2018-06-26 17:50:23 +02:00
</button>
<small class="text-muted d-block mb-3">{{'newCustomDomainDesc' | i18n}}</small>
</ng-container>
<button appBlurClick type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
<i class="fa fa-spinner fa-spin"></i>
<span>{{'save' | i18n}}</span>
</button>
2018-06-29 04:27:32 +02:00
<h2 class="spaced-header">{{'globalEqDomains' | i18n}}</h2>
2018-06-26 17:50:23 +02:00
<p *ngIf="loading">
<i class="fa fa-spinner fa-spin text-muted"></i>
</p>
<table class="table table-hover table-list" *ngIf="!loading && global.length > 0">
<tbody>
<tr *ngFor="let d of global">
2018-07-06 21:45:35 +02:00
<td [ngClass]="{'table-list-strike': d.excluded}">{{d.domains}}</td>
2018-06-26 17:50:23 +02:00
<td class="table-list-options">
<div class="dropdown" appListDropdown>
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-cog fa-lg"></i>
</button>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="#" appStopClick (click)="toggleExcluded(d)" *ngIf="!d.excluded">
<i class="fa fa-fw fa-close"></i>
{{'exclude' | i18n}}
</a>
<a class="dropdown-item" href="#" appStopClick (click)="toggleExcluded(d)" *ngIf="d.excluded">
<i class="fa fa-fw fa-plus"></i>
{{'include' | i18n}}
</a>
<a class="dropdown-item" href="#" appStopClick (click)="customize(d)">
<i class="fa fa-fw fa-scissors"></i>
{{'customize' | i18n}}
</a>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<button appBlurClick type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
<i class="fa fa-spinner fa-spin"></i>
<span>{{'save' | i18n}}</span>
</button>
</form>