1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-21 18:32:37 +00:00
seahub/frontend/src/models/repo.js
llj 29b5aa0184 [multi storage backends] offer 'storage backend' options in 'repo (#3960)
create' dialog

* fixup for 'my libraries - create repo'
2019-08-08 13:08:13 +08:00

29 lines
924 B
JavaScript

import { Utils } from '../utils/utils';
class Repo {
constructor(object) {
this.repo_id = object.repo_id;
this.repo_name = object.repo_name;
this.permission = object.permission;
this.size_original = object.size;
this.size = Utils.bytesToSize(object.size);
this.owner_name = object.owner_name;
this.owner_email = object.owner_email;
this.owner_contact_email = object.owner_contact_email;
this.encrypted = object.encrypted;
this.last_modified = object.last_modified;
this.modifier_contact_email = object.modifier_contact_email;
this.modifier_email = object.modifier_email;
this.modifier_name = object.modifier_name;
this.type = object.type;
this.starred = object.starred;
this.status = object.status;
this.storage_name = object.storage_name;
if (object.is_admin != undefined) {
this.is_admin = object.is_admin;
}
}
}
export default Repo;