Hide Dropbox and Google Drive in Import/ Export when disabled

This commit is contained in:
Jannik Lorenz 2016-04-23 12:58:24 +02:00
parent fa50745a8d
commit d7648e9cea
No known key found for this signature in database
GPG key ID: 89A94DE844A6F488
5 changed files with 43 additions and 12 deletions

View file

@ -48,7 +48,7 @@ var response = {
showNote: showNote,
showPublishNote: showPublishNote,
showPublishSlide: showPublishSlide,
showIndex: showIndex,
showIndex: showIndex,
noteActions: noteActions,
publishNoteActions: publishNoteActions,
githubActions: githubActions
@ -72,7 +72,7 @@ function responseError(res, code, detail, msg) {
code: code,
detail: detail,
msg: msg,
useCDN: config.usecdn
useCDN: config.usecdn
});
res.write(content);
res.end();
@ -95,6 +95,7 @@ function showIndex(req, res, next) {
twitter: config.twitter,
github: config.github,
dropbox: config.dropbox,
googleDrive: config.googleDrive,
});
res.write(content);
res.end();
@ -125,6 +126,7 @@ function responseHackMD(res, note) {
twitter: config.twitter,
github: config.github,
dropbox: config.dropbox,
googleDrive: config.googleDrive,
});
var buf = html;
res.writeHead(200, {
@ -355,7 +357,7 @@ function publishNoteActions(req, res, next) {
res.redirect(config.serverurl + '/' + (note.alias ? note.alias : LZString.compressToBase64(note.id)));
break;
default:
res.redirect(config.serverurl + '/s/' + note.shortid);
res.redirect(config.serverurl + '/s/' + note.shortid);
break;
}
});
@ -370,7 +372,7 @@ function githubActions(req, res, next) {
githubActionGist(req, res, note);
break;
default:
res.redirect(config.serverurl + '/' + noteId);
res.redirect(config.serverurl + '/' + noteId);
break;
}
});
@ -470,4 +472,4 @@ var render = function (res, title, markdown) {
}));
};
module.exports = response;
module.exports = response;