From 1edc5fa4f7c33f437ea563a0d7c345c611e12760 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 4 Oct 2022 10:09:22 +0200 Subject: [PATCH] Rename CheckboxMaterialDesignComponent to CheckboxComponent --- dev/App/Abstract.js | 9 ++++----- dev/Component/{MaterialDesign => }/Checkbox.js | 2 +- .../{CheckboxMaterialDesign.html => Checkbox.html} | 0 3 files changed, 5 insertions(+), 6 deletions(-) rename dev/Component/{MaterialDesign => }/Checkbox.js (90%) rename snappymail/v/0.0.0/app/templates/Views/Components/{CheckboxMaterialDesign.html => Checkbox.html} (100%) diff --git a/dev/App/Abstract.js b/dev/App/Abstract.js index 24d1cf9c90..39153d7f4a 100644 --- a/dev/App/Abstract.js +++ b/dev/App/Abstract.js @@ -7,7 +7,7 @@ import { LanguageStore } from 'Stores/Language'; import { ThemeStore } from 'Stores/Theme'; import { SelectComponent } from 'Component/Select'; -import { CheckboxMaterialDesignComponent } from 'Component/MaterialDesign/Checkbox'; +import { CheckboxComponent } from 'Component/Checkbox'; export class AbstractApp { /** @@ -28,8 +28,8 @@ export class AbstractApp { } bootstart() { - const register = (key, ClassObject, templateID) => ko.components.register(key, { - template: { element: templateID || (key + 'Component') }, + const register = (key, ClassObject) => ko.components.register(key, { + template: { element: key + 'Component' }, viewModel: { createViewModel: (params, componentInfo) => { params = params || {}; @@ -41,9 +41,8 @@ export class AbstractApp { } } }); - register('Select', SelectComponent); - register('Checkbox', CheckboxMaterialDesignComponent, 'CheckboxMaterialDesignComponent'); + register('Checkbox', CheckboxComponent); initOnStartOrLangChange(); diff --git a/dev/Component/MaterialDesign/Checkbox.js b/dev/Component/Checkbox.js similarity index 90% rename from dev/Component/MaterialDesign/Checkbox.js rename to dev/Component/Checkbox.js index a15351256c..b069559dc4 100644 --- a/dev/Component/MaterialDesign/Checkbox.js +++ b/dev/Component/Checkbox.js @@ -1,4 +1,4 @@ -export class CheckboxMaterialDesignComponent { +export class CheckboxComponent { constructor(params = {}) { this.value = ko.isObservable(params.value) ? params.value : ko.observable(!!params.value); diff --git a/snappymail/v/0.0.0/app/templates/Views/Components/CheckboxMaterialDesign.html b/snappymail/v/0.0.0/app/templates/Views/Components/Checkbox.html similarity index 100% rename from snappymail/v/0.0.0/app/templates/Views/Components/CheckboxMaterialDesign.html rename to snappymail/v/0.0.0/app/templates/Views/Components/Checkbox.html