mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
some ko.computed() to addComputables()/addComputablesTo()
This commit is contained in:
parent
099560ca6a
commit
023c8f603b
9 changed files with 110 additions and 107 deletions
|
|
@ -8,15 +8,17 @@ import Remote from 'Remote/User/Fetch';
|
|||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { TemplatePopupView } from 'View/Popup/Template';
|
||||
import { addComputablesTo } from 'Common/Utils';
|
||||
|
||||
export class TemplatesUserSettings {
|
||||
constructor() {
|
||||
this.templates = TemplateUserStore.templates;
|
||||
|
||||
this.processText = ko.computed(() =>
|
||||
TemplateUserStore.templates.loading() ? i18n('SETTINGS_TEMPLETS/LOADING_PROCESS') : ''
|
||||
);
|
||||
this.visibility = ko.computed(() => this.processText() ? 'visible' : 'hidden');
|
||||
addComputablesTo({
|
||||
processText: () => TemplateUserStore.templates.loading() ? i18n('SETTINGS_TEMPLETS/LOADING_PROCESS') : '',
|
||||
|
||||
visibility: () => this.processText() ? 'visible' : 'hidden'
|
||||
});
|
||||
|
||||
this.templateForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue