mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Rename CheckboxMaterialDesignComponent to CheckboxComponent
This commit is contained in:
parent
74f830486e
commit
1edc5fa4f7
3 changed files with 5 additions and 6 deletions
|
|
@ -7,7 +7,7 @@ import { LanguageStore } from 'Stores/Language';
|
||||||
import { ThemeStore } from 'Stores/Theme';
|
import { ThemeStore } from 'Stores/Theme';
|
||||||
|
|
||||||
import { SelectComponent } from 'Component/Select';
|
import { SelectComponent } from 'Component/Select';
|
||||||
import { CheckboxMaterialDesignComponent } from 'Component/MaterialDesign/Checkbox';
|
import { CheckboxComponent } from 'Component/Checkbox';
|
||||||
|
|
||||||
export class AbstractApp {
|
export class AbstractApp {
|
||||||
/**
|
/**
|
||||||
|
|
@ -28,8 +28,8 @@ export class AbstractApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstart() {
|
bootstart() {
|
||||||
const register = (key, ClassObject, templateID) => ko.components.register(key, {
|
const register = (key, ClassObject) => ko.components.register(key, {
|
||||||
template: { element: templateID || (key + 'Component') },
|
template: { element: key + 'Component' },
|
||||||
viewModel: {
|
viewModel: {
|
||||||
createViewModel: (params, componentInfo) => {
|
createViewModel: (params, componentInfo) => {
|
||||||
params = params || {};
|
params = params || {};
|
||||||
|
|
@ -41,9 +41,8 @@ export class AbstractApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
register('Select', SelectComponent);
|
register('Select', SelectComponent);
|
||||||
register('Checkbox', CheckboxMaterialDesignComponent, 'CheckboxMaterialDesignComponent');
|
register('Checkbox', CheckboxComponent);
|
||||||
|
|
||||||
initOnStartOrLangChange();
|
initOnStartOrLangChange();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
export class CheckboxMaterialDesignComponent {
|
export class CheckboxComponent {
|
||||||
constructor(params = {}) {
|
constructor(params = {}) {
|
||||||
this.value = ko.isObservable(params.value) ? params.value
|
this.value = ko.isObservable(params.value) ? params.value
|
||||||
: ko.observable(!!params.value);
|
: ko.observable(!!params.value);
|
||||||
Loading…
Add table
Add a link
Reference in a new issue