mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Improved additional account management
This commit is contained in:
parent
b057c4083e
commit
6b8020b8f5
15 changed files with 161 additions and 161 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { change } from 'Common/Links';
|
||||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
|
||||
export class AccountModel extends AbstractModel {
|
||||
|
|
@ -8,23 +6,16 @@ export class AccountModel extends AbstractModel {
|
|||
* @param {boolean=} canBeDelete = true
|
||||
* @param {number=} count = 0
|
||||
*/
|
||||
constructor(email, canBeDelete = true, count = 0) {
|
||||
constructor(email, count = 0, isAdditional = true) {
|
||||
super();
|
||||
|
||||
this.email = email;
|
||||
|
||||
this.addObservables({
|
||||
count: count,
|
||||
count: count || 0,
|
||||
deleteAccess: false,
|
||||
canBeDeleted: !!canBeDelete
|
||||
isAdditional: isAdditional
|
||||
});
|
||||
this.canBeEdit = this.canBeDeleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
changeAccountLink() {
|
||||
return change(this.email);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue