diff --git a/src/app/components/chain-add/chain-add.ts b/src/app/components/chain-add/chain-add.ts index 370befb..fc857bf 100644 --- a/src/app/components/chain-add/chain-add.ts +++ b/src/app/components/chain-add/chain-add.ts @@ -5,7 +5,7 @@ import { ActionBtn } from '../action-btn/action-btn'; import { TranslatePipe } from '@ngx-translate/core'; import { UpperfirstPipe } from '../../pipes/upperfirst-pipe'; import { ChainSettings } from '../../services/chain-settings'; -import { SettingsBaseAdd } from '../settings-base-add/settings-base-add'; +import { SettingsBaseAddEdit } from '../settings-base-add-edit/settings-base-add-edit'; @Component({ selector: 'app-chain-add', @@ -14,15 +14,17 @@ import { SettingsBaseAdd } from '../settings-base-add/settings-base-add'; TranslatePipe, UpperfirstPipe, ], - templateUrl: './../settings-base-add/settings-base-add.html', - styleUrl: './../settings-base-add/settings-base-add.scss', + templateUrl: './../settings-base-add-edit/settings-base-add-edit.html', + styleUrl: './../settings-base-add-edit/settings-base-add-edit.scss', }) -export class ChainAdd extends SettingsBaseAdd { +export class ChainAdd extends SettingsBaseAddEdit { private readonly chainSettings = inject(ChainSettings); + readonly form = new ChainFormGroup(); + btnText = 'common.save'; title = 'settings.chain.new_chain'; - async save() { + async submit() { const name = this.form.controls.name.value; const img = this.form.controls.image.value; //TODO: the sqlite bridge can't handle null as param diff --git a/src/app/components/settings-base-add-edit/settings-base-add-edit.html b/src/app/components/settings-base-add-edit/settings-base-add-edit.html new file mode 100644 index 0000000..f262ca1 --- /dev/null +++ b/src/app/components/settings-base-add-edit/settings-base-add-edit.html @@ -0,0 +1,9 @@ +