1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 23:02:26 +00:00

feat: details (#6484)

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
杨国璇
2024-08-02 22:31:46 +08:00
committed by GitHub
parent 5c2f05ee8d
commit 6ed1fe58bc
33 changed files with 680 additions and 331 deletions

View File

@@ -10,6 +10,8 @@ class RepoInfo {
this.owner_name = object.owner_name;
this.owner_email = object.owner_email;
this.owner_contact_email = object.owner_contact_email;
this.owner_avatar = object.owner_avatar || '';
// is repo shared admin;
// is repo shared admin && is one of current ordinary group's admins;
// is one of current group owned group's admins;

View File

@@ -4,17 +4,26 @@ class Repo {
constructor(object) {
this.repo_id = object.repo_id;
this.repo_name = object.repo_name;
this.repo_type = object.repo_type;
this.permission = object.permission;
this.size_original = object.size;
this.size = Utils.bytesToSize(object.size);
// owner info
this.owner_name = object.owner_name;
this.owner_email = object.owner_email;
this.owner_contact_email = object.owner_contact_email;
this.owner_avatar = object.owner_avatar || '';
this.encrypted = object.encrypted;
// last_modified: last modified time
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.modifier_avatar = object.modifier_avatar;
this.type = object.type;
this.starred = object.starred;
this.monitored = object.monitored;
@@ -23,6 +32,11 @@ class Repo {
if (object.is_admin != undefined) {
this.is_admin = object.is_admin;
}
this.file_count = object.file_count || 0;
this.has_been_shared_out = object.has_been_shared_out;
this.is_virtual = object.is_virtual;
this.lib_need_decrypt = object.lib_need_decrypt;
this.no_quota = object.no_quota;
}
}