Skip to content

Commit

Permalink
view normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorszun committed Jan 18, 2018
1 parent 876eee9 commit e7de976
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Trec",
"version": "0.8.0",
"version": "0.9.5",
"description": "T-rec time tracker is built for speed and live work item update in youtrack system.",
"homepage": "",
"author": {
Expand Down
12 changes: 6 additions & 6 deletions src/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ export class CustomMenu {
{
label: 'Accounts',
submenu: [
{
label: 'Add Account',
{
label: 'Switch',
click() {
mainWindow.webContents.executeJavaScript('window.location="#/add-account?firstAccount=false"')
mainWindow.webContents.executeJavaScript('window.location="#/accounts"')
}
},
{
label: 'Accounts',
{
label: 'Add new',
click() {
mainWindow.webContents.executeJavaScript('window.location="#/accounts"')
mainWindow.webContents.executeJavaScript('window.location="#/add-account?firstAccount=false"')
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<ul *ngIf="accounts?.length > 0 else noAccounts">
<div class="accounts__title">SET ACTIVE ACCOUNT</div>
<li *ngFor="let account of accounts" [ngClass]="account.current? 'active' : ''">
<button class="accounts__name" (click)="setAsCurrent(account)">{{ account.name || 'unnamed account' }} </button>
<!-- <button class="menu__edit-account" (click)="editAccount(account)">edit</button> -->
<button class="accounts__name" (click)="setAsCurrent(account)">{{ account.name || 'unnamed account' }} </button>
</li>
</ul>
<ng-template #noAccounts>
<div class="accounts__no-account">No accounts added</div>
</ng-template>
<button class="btn btn--red" type="submit" (click)="goToAddAccount(false)">ADD ACCOUNT</button>
<button *ngIf="isCurrentAccountExists" class="btn btn--transparent" type="submit" (click)="goBack()">CANCEL</button>
<div class="accounts__buttons">
<button [disabled]="!isCurrentAccountExists" class="btn btn--grey" type="submit" (click)="goBack()">CANCEL</button>
<button class="btn btn--red" (click)="goToAddAccount(false)" type="submit">ADD ACCOUNT</button>
</div>
</div>
</div>
10 changes: 10 additions & 0 deletions src/app/components/switch-account/switch-account.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
font-weight: 400;
text-align: center;
}
&__buttons {
cursor: default;
.btn {
display: inline-block;
width: calc(50% - 4px);
&:nth-child(2) {
float: right;
}
}
}
&__content {
.accounts__title {
font-family: 'Montserrat', sans-serif;
Expand Down

0 comments on commit e7de976

Please sign in to comment.