This commit is contained in:
Eugene Pankov
2021-07-11 22:28:50 +02:00
parent da8a631a6d
commit 3704dcc483
9 changed files with 158 additions and 15 deletions

View File

@@ -31,7 +31,7 @@
.list-group.list-group-light
ng-container(*ngFor='let config of configService.configs')
button.list-group-item.list-group-item-action(
*ngIf='config !== configService.activeConfig',
*ngIf='config.id !== configService.activeConfig?.id',
(click)='selectConfig(config)'
)
fa-icon([icon]='_configIcon')

View File

@@ -46,4 +46,11 @@ export class ConfigModalComponent {
this.modalInstance.dismiss()
}
async deleteConfig () {
if (confirm('Delete this config? This cannot be undone.')) {
await this.configService.deleteConfig(this.configService.activeConfig)
}
this.configService.selectDefaultConfig()
this.modalInstance.dismiss()
}
}