mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-10 09:59:48 +01:00
blue click and focus styling
This commit is contained in:
parent
84d1591fce
commit
3c76c88d4d
@ -12,6 +12,7 @@ import { ToasterModule } from 'angular2-toaster';
|
|||||||
|
|
||||||
import { AddEditComponent } from './vault/add-edit.component';
|
import { AddEditComponent } from './vault/add-edit.component';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
import { BlurClickDirective } from './directives/blur-click.directive';
|
||||||
import { CiphersComponent } from './vault/ciphers.component';
|
import { CiphersComponent } from './vault/ciphers.component';
|
||||||
import { FallbackSrcDirective } from './directives/fallback-src.directive';
|
import { FallbackSrcDirective } from './directives/fallback-src.directive';
|
||||||
import { GroupingsComponent } from './vault/groupings.component';
|
import { GroupingsComponent } from './vault/groupings.component';
|
||||||
@ -39,6 +40,7 @@ import { ViewComponent } from './vault/view.component';
|
|||||||
declarations: [
|
declarations: [
|
||||||
AddEditComponent,
|
AddEditComponent,
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
BlurClickDirective,
|
||||||
CiphersComponent,
|
CiphersComponent,
|
||||||
FallbackSrcDirective,
|
FallbackSrcDirective,
|
||||||
GroupingsComponent,
|
GroupingsComponent,
|
||||||
|
17
src/app/directives/blur-click.directive.ts
Normal file
17
src/app/directives/blur-click.directive.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import {
|
||||||
|
Directive,
|
||||||
|
ElementRef,
|
||||||
|
HostListener,
|
||||||
|
} from '@angular/core';
|
||||||
|
|
||||||
|
@Directive({
|
||||||
|
selector: '[appBlurClick]',
|
||||||
|
})
|
||||||
|
export class BlurClickDirective {
|
||||||
|
constructor(private el: ElementRef) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@HostListener('click') onClick() {
|
||||||
|
this.el.nativeElement.blur();
|
||||||
|
}
|
||||||
|
}
|
@ -231,13 +231,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<button (click)="save()" class="primary" title="{{'save' | i18n}}">
|
<button appBlurClick (click)="save()" class="primary" title="{{'save' | i18n}}">
|
||||||
<i class="fa fa-save fa-lg"></i> {{'save' | i18n}}
|
<i class="fa fa-save fa-lg"></i> {{'save' | i18n}}
|
||||||
</button>
|
</button>
|
||||||
<button (click)="cancel()" title="{{'cancel' | i18n}}">
|
<button appBlurClick (click)="cancel()" title="{{'cancel' | i18n}}">
|
||||||
{{'cancel' | i18n}}
|
{{'cancel' | i18n}}
|
||||||
</button>
|
</button>
|
||||||
<button (click)="delete()" class="danger right" title="{{'delete' | i18n}}" *ngIf="editMode">
|
<button appBlurClick (click)="delete()" class="danger right" title="{{'delete' | i18n}}" *ngIf="editMode">
|
||||||
<i class="fa fa-trash-o fa-lg"></i>
|
<i class="fa fa-trash-o fa-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<a href="" title="{{'addItem' | i18n}}" appStopClick (click)="addCipher()">
|
<a href="" title="{{'addItem' | i18n}}" appBlurClick appStopClick (click)="addCipher()">
|
||||||
<i class="fa fa-plus fa-lg"></i>
|
<i class="fa fa-plus fa-lg"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<button (click)="addCipher()" class="block primary" title="{{'addItem' | i18n}}">
|
<button appBlurClick (click)="addCipher()" class="block primary" title="{{'addItem' | i18n}}">
|
||||||
<i class="fa fa-plus fa-lg"></i>
|
<i class="fa fa-plus fa-lg"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -217,5 +217,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<button (click)="edit()" title="{{'editItem' | i18n}}">{{'edit' | i18n}}</button>
|
<button appBlurClick (click)="edit()" title="{{'editItem' | i18n}}">{{'edit' | i18n}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -191,4 +191,3 @@
|
|||||||
color: $text-muted;
|
color: $text-muted;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
border-bottom: 1px solid darken($brand-primary, 7%);
|
||||||
|
|
||||||
a, button {
|
a, button {
|
||||||
color: white !important;
|
color: white !important;
|
||||||
@ -231,9 +232,16 @@
|
|||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
color: $button-color;
|
color: $button-color;
|
||||||
|
|
||||||
&:hover {
|
&:hover, &:focus {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: darken($button-backgound-color, 1.5%);
|
background-color: darken($button-backgound-color, 1.5%);
|
||||||
|
border-color: darken($button-border-color, 17%);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
background-color: darken($button-backgound-color, 6%);
|
||||||
|
border-color: darken($button-border-color, 25%);
|
||||||
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.primary {
|
&.primary {
|
||||||
|
Loading…
Reference in New Issue
Block a user