Skip to content

Commit

Permalink
open in browser download link of new version of trec app
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorszun committed Feb 1, 2018
1 parent 52e93cd commit 3ed68a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div>
PUBLISHED: {{version.published_at | date:"dd-MM-yyyy"}}
<p [innerHTML]="version.body | nl2br"></p>
<a class="new" *ngIf="isNew" href="{{version.html_url}}">Download new version</a>
<a class="new" *ngIf="isNew" (click)="openInBrowser(version.html_url)">Download new version</a>
</div>
</div>
<div class="edit-account__form" *ngIf="editingAccount?.name.length > 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { RemoteAccount } from 'app/models/RemoteAccount';
import { AccountService } from '../../../services/account.service'
import { ToasterService } from '../../../services/toaster.service'
import { versions } from '../../../../environments/versions'
import { shell } from 'electron';


@Component({
Expand Down Expand Up @@ -64,6 +65,10 @@ export class EditAccountComponent implements OnInit {
)
}

public async openInBrowser(url : string){
shell.openExternal(url);
}

editNameOrUrl(account) {
this.databaseService.editAccount(account).then(data => {
this.toasterService.showToaster('Account updated!', "success")
Expand Down

0 comments on commit 3ed68a5

Please sign in to comment.