Shared folders UI

This commit is contained in:
yflory
2018-07-10 14:41:37 +02:00
parent bc7524c134
commit 4b86ed2dec
10 changed files with 142 additions and 37 deletions

View File

@@ -111,6 +111,17 @@ define([
cb(obj);
});
};
common.addSharedFolder = function (secret, cb) {
postMessage("ADD_SHARED_FOLDER", {
path: ['root'],
folderData: {
href: '/drive/#' + Hash.getEditHashFromKeys(secret),
roHref: '/drive/#' + Hash.getViewHashFromKeys(secret),
channel: secret.channel,
ctime: +new Date()
}
}, cb);
};
common.drive = {};
common.drive.onLog = Util.mkEvent();
common.drive.onChange = Util.mkEvent();