Skip to content

Commit

Permalink
preview
Browse files Browse the repository at this point in the history
  • Loading branch information
polterguy committed Jan 14, 2024
1 parent e46acc3 commit ba5c56e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@
class="show-on-hover"
*ngIf="showRenameBox === null">

<button
mat-icon-button
color="primary"
*ngIf="file.node.path.endsWith('.html') && file.node.path.startsWith('/etc/www/')"
(click)="previewHtmlFile(file.node)">
<mat-icon>remove_red_eye</mat-icon>
</button>

<button
mat-icon-button
color="primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,11 @@ export class IdeTreeComponent implements OnInit {
}
}

previewHtmlFile(el: any) {

window.open(this.backendService.active.url + el.path.substring(8), '_blank');
}

/*
* Private helper methods.
*/
Expand Down

0 comments on commit ba5c56e

Please sign in to comment.