mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
this.addObservables() to addObservablesTo()
This commit is contained in:
parent
839ebfb350
commit
7fac6ca9dd
30 changed files with 78 additions and 58 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { FileInfo } from 'Common/File';
|
||||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
import { addObservablesTo, addComputablesTo } from 'External/ko';
|
||||
|
||||
export class ComposeAttachmentModel extends AbstractModel {
|
||||
/**
|
||||
|
|
@ -22,7 +23,7 @@ export class ComposeAttachmentModel extends AbstractModel {
|
|||
this.contentLocation = contentLocation;
|
||||
this.fromMessage = false;
|
||||
|
||||
this.addObservables({
|
||||
addObservablesTo(this, {
|
||||
fileName: fileName,
|
||||
size: size,
|
||||
tempName: '',
|
||||
|
|
@ -35,7 +36,7 @@ export class ComposeAttachmentModel extends AbstractModel {
|
|||
complete: false
|
||||
});
|
||||
|
||||
this.addComputables({
|
||||
addComputablesTo(this, {
|
||||
progressText: () => {
|
||||
const p = this.progress();
|
||||
return 1 > p ? '' : (100 < p ? 100 : p) + '%';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue