mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-18 14:04:17 +08:00
fixed start page icons
This commit is contained in:
parent
269971ab60
commit
3c27e8105e
@ -1,14 +1,14 @@
|
||||
div
|
||||
.terminus-logo
|
||||
h1.terminus-title Terminus
|
||||
sup α
|
||||
sup α
|
||||
|
||||
.list-group
|
||||
a.list-group-item.list-group-item-action.d-flex(
|
||||
*ngFor='let button of getButtons()',
|
||||
(click)='button.click()',
|
||||
)
|
||||
.d-flex.align-self-center([innerHTML]='button.icon')
|
||||
.d-flex.align-self-center([innerHTML]='sanitizeIcon(button.icon)')
|
||||
span {{button.title}}
|
||||
|
||||
footer.d-flex.align-items-center
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { Component, Inject } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { ConfigService } from '../services/config.service'
|
||||
import { HomeBaseService } from '../services/homeBase.service'
|
||||
import { ToolbarButton, ToolbarButtonProvider } from '../api'
|
||||
@ -14,6 +15,7 @@ export class StartPageComponent {
|
||||
|
||||
constructor (
|
||||
private config: ConfigService,
|
||||
private domSanitizer: DomSanitizer,
|
||||
public homeBase: HomeBaseService,
|
||||
@Inject(ToolbarButtonProvider) private toolbarButtonProviders: ToolbarButtonProvider[],
|
||||
) {
|
||||
@ -26,4 +28,8 @@ export class StartPageComponent {
|
||||
.filter(x => !!x.click)
|
||||
.sort((a: ToolbarButton, b: ToolbarButton) => (a.weight || 0) - (b.weight || 0))
|
||||
}
|
||||
|
||||
sanitizeIcon (icon: string): any {
|
||||
return this.domSanitizer.bypassSecurityTrustHtml(icon || '')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user