Remove the drive entry from the user menu if already in drive

pull/1/head
yflory 8 years ago
parent e865b89f43
commit 67d881b2cf

@ -415,14 +415,17 @@ define([
content: Messages.user_rename content: Messages.user_rename
}); });
} }
options.push({ var parsed = Cryptpad.parsePadUrl(window.location.href);
tag: 'a', if (parsed && parsed.type && parsed.type !== 'drive') {
attributes: { options.push({
'target': '_blank', tag: 'a',
'href': '/drive/' attributes: {
}, 'target': '_blank',
content: Messages.login_accessDrive 'href': '/drive/'
}); },
content: Messages.login_accessDrive
});
}
// Add login or logout button depending on the current status // Add login or logout button depending on the current status
if (account) { if (account) {
options.push({ options.push({

Loading…
Cancel
Save