mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
rewrite repo-list-view
This commit is contained in:
14
frontend/src/models/group.js
Normal file
14
frontend/src/models/group.js
Normal file
@@ -0,0 +1,14 @@
|
||||
class Group {
|
||||
constructor(object) {
|
||||
this.id= object.id;
|
||||
this.name = object.name;
|
||||
this.owner = object.owner;
|
||||
this.admins = object.admins;
|
||||
this.avatar_url = object.avatar_url;
|
||||
this.created_at = object.created_at;
|
||||
this.parent_group_id = object.parent_group_id;
|
||||
this.wiki_enabled = object.wiki_enabled;
|
||||
}
|
||||
}
|
||||
|
||||
export default Group;
|
24
frontend/src/models/repoInfo.js
Normal file
24
frontend/src/models/repoInfo.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Utils } from '../utils/utils';
|
||||
|
||||
class RepoInfo {
|
||||
constructor(object) {
|
||||
this.repo_id = object.repo_id;
|
||||
this.repo_name = object.repo_name;
|
||||
this.permission = object.permission;
|
||||
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_name;
|
||||
this.is_admin = object.is_admin;
|
||||
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.mtime = object.mtime;
|
||||
}
|
||||
}
|
||||
|
||||
export default RepoInfo;
|
||||
|
||||
//todo rename to repo, and rename repo to repoInfo
|
Reference in New Issue
Block a user