mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 00:20:07 +00:00
Share manage optimized (#2723)
This commit is contained in:
23
frontend/src/models/shared-folder-info.js
Normal file
23
frontend/src/models/shared-folder-info.js
Normal file
@@ -0,0 +1,23 @@
|
||||
class SharedFolderInfo {
|
||||
|
||||
constructor(object) {
|
||||
this.path = object.path;
|
||||
this.folder_name = object.folder_name;
|
||||
this.repo_id = object.repo_id;
|
||||
this.repo_name = object.repo_name;
|
||||
this.share_type = object.share_type;
|
||||
this.share_permission = object.share_permission;
|
||||
if (object.share_type === 'group') {
|
||||
this.group_id = object.group_id;
|
||||
this.group_name = object.group_name;
|
||||
} else {
|
||||
this.share_type = 'user'; // change personal to user;
|
||||
this.user_name = object.user_name;
|
||||
this.user_email = object.user_email;
|
||||
this.contact_email = object.contact_email;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default SharedFolderInfo;
|
21
frontend/src/models/shared-link-info.js
Normal file
21
frontend/src/models/shared-link-info.js
Normal file
@@ -0,0 +1,21 @@
|
||||
class SharedLinkInfo {
|
||||
|
||||
constructor(object) {
|
||||
this.repo_id = object.repo_id;
|
||||
this.repo_name = object.repo_name;
|
||||
this.path = object.path;
|
||||
this.obj_name = object.obj_name;
|
||||
this.is_dir = object.is_dir;
|
||||
this.permissions = object.permissions;
|
||||
this.username = object.username;
|
||||
this.is_expired = object.is_expired;
|
||||
this.expire_date = object.expire_date;
|
||||
this.token = object.token;
|
||||
this.link = object.link;
|
||||
this.view_cnt = object.view_cnt;
|
||||
this.ctime = object.ctime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default SharedLinkInfo;
|
26
frontend/src/models/shared-repo-info.js
Normal file
26
frontend/src/models/shared-repo-info.js
Normal file
@@ -0,0 +1,26 @@
|
||||
class SharedRepoInfo {
|
||||
|
||||
constructor(object) {
|
||||
this.repo_id = object.repo_id;
|
||||
this.repo_name = object.repo_name;
|
||||
this.share_type = object.share_type;
|
||||
this.share_permission = object.share_permission;
|
||||
this.modifier_name = object.modifier_name;
|
||||
this.modifier_email = object.modifier_email;
|
||||
this.modifier_contact_email = object.modifier_contact_email;
|
||||
this.encrypted = object.encrypted;
|
||||
if (this.share_type === 'personal') {
|
||||
this.is_admin = object.is_admin;
|
||||
this.user_name = object.user_name;
|
||||
this.user_email = object.user_email;
|
||||
this.contact_email = this.contact_email;
|
||||
} else if(this.share_type === 'group') {
|
||||
this.is_admin = object.is_admin;
|
||||
this.group_id = object.group_id;
|
||||
this.group_name = object.group_name;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default SharedRepoInfo;
|
18
frontend/src/models/shared-upload-info.js
Normal file
18
frontend/src/models/shared-upload-info.js
Normal file
@@ -0,0 +1,18 @@
|
||||
class SharedUploadInfo {
|
||||
|
||||
constructor(object) {
|
||||
this.repo_id = object.repo_id;
|
||||
this.repo_name = object.repo_name;
|
||||
this.path = object.path;
|
||||
this.link = object.link;
|
||||
this.obj_name = object.obj_name;
|
||||
this.username = object.username;
|
||||
this.ctime = object.ctime;
|
||||
this.token = object.token;
|
||||
this.view_cnt = object.view_cnt;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
export default SharedUploadInfo;
|
Reference in New Issue
Block a user