1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/settings/database/database.settings.component.ts

43 lines
1.5 KiB
TypeScript
Raw Normal View History

2018-05-04 07:17:08 +08:00
import {Component, OnInit} from '@angular/core';
2018-03-31 03:30:30 +08:00
import {AuthenticationService} from '../../model/network/authentication.service';
import {DataBaseConfig, DatabaseType} from '../../../../common/config/private/IPrivateConfig';
import {Utils} from '../../../../common/Utils';
import {NotificationService} from '../../model/notification.service';
import {NavigationService} from '../../model/navigation.service';
import {SettingsComponent} from '../_abstract/abstract.settings.component';
import {DatabaseSettingsService} from './database.settings.service';
import {I18n} from '@ngx-translate/i18n-polyfill';
2017-07-08 18:43:42 +08:00
@Component({
2018-05-04 07:17:08 +08:00
selector: 'app-settings-database',
2017-07-08 18:43:42 +08:00
templateUrl: './database.settings.component.html',
2017-07-15 18:47:11 +08:00
styleUrls: ['./database.settings.component.css',
'./../_abstract/abstract.settings.component.css'],
2017-07-08 18:43:42 +08:00
providers: [DatabaseSettingsService],
})
2018-05-04 07:17:08 +08:00
export class DatabaseSettingsComponent extends SettingsComponent<DataBaseConfig> implements OnInit {
2017-07-15 20:27:12 +08:00
2017-07-08 18:43:42 +08:00
public types: Array<any> = [];
public DatabaseType: any;
2017-07-14 05:39:09 +08:00
constructor(_authService: AuthenticationService,
_navigation: NavigationService,
2017-07-15 20:27:12 +08:00
_settingsService: DatabaseSettingsService,
2018-03-30 08:30:23 +08:00
notification: NotificationService,
i18n: I18n) {
2018-03-31 03:30:30 +08:00
super(i18n('Database'), _authService, _navigation, _settingsService, notification, i18n, s => s.Server.database);
2017-07-08 18:43:42 +08:00
}
ngOnInit() {
2017-07-14 05:39:09 +08:00
super.ngOnInit();
2017-07-08 18:43:42 +08:00
this.types = Utils
.enumToArray(DatabaseType);
this.DatabaseType = DatabaseType;
}
}