mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 02:48:51 +00:00
metadata copy and paste cell (#6472)
This commit is contained in:
@@ -3,6 +3,7 @@ import { UserService, LocalStorage, PRIVATE_COLUMN_KEYS, EDITABLE_DATA_PRIVATE_C
|
||||
EDITABLE_PRIVATE_COLUMN_KEYS, PREDEFINED_COLUMN_KEYS } from './_basic';
|
||||
import EventBus from '../../components/common/event-bus';
|
||||
import { username } from '../../utils/constants';
|
||||
import User from './model/user';
|
||||
|
||||
class Context {
|
||||
|
||||
@@ -14,6 +15,7 @@ class Context {
|
||||
this.eventBus = null;
|
||||
this.hasInit = false;
|
||||
this.permission = 'r';
|
||||
this.collaboratorsCache = {};
|
||||
}
|
||||
|
||||
async init({ otherSettings }) {
|
||||
@@ -128,9 +130,22 @@ class Context {
|
||||
return true;
|
||||
};
|
||||
|
||||
getCollaboratorsFromCache = () => {
|
||||
//
|
||||
};
|
||||
getCollaboratorFromCache(email) {
|
||||
return this.collaboratorsCache[email];
|
||||
}
|
||||
|
||||
getCollaboratorsFromCache() {
|
||||
const collaboratorsCache = this.collaboratorsCache;
|
||||
return Object.values(collaboratorsCache).filter(item => item.email !== 'anonymous');
|
||||
}
|
||||
|
||||
updateCollaboratorsCache(email, collaborator) {
|
||||
if (collaborator instanceof User) {
|
||||
this.collaboratorsCache[email] = collaborator;
|
||||
return;
|
||||
}
|
||||
this.collaboratorsCache[email] = new User(collaborator);
|
||||
}
|
||||
|
||||
restoreRows = () => {
|
||||
// todo
|
||||
|
Reference in New Issue
Block a user