mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 08:28:11 +00:00
Prop type check repair (#2919)
* repair intent check wraning * change doublequote to singlequote, add semicolon * optimized code * modify type-check wraning
This commit is contained in:
@@ -6,29 +6,29 @@ class URLDecorator {
|
||||
let url = '';
|
||||
let params = '';
|
||||
switch (options.type) {
|
||||
case 'download_historic_file':
|
||||
params = 'p=' + options.filePath;
|
||||
url = siteRoot + 'repo/' + historyRepoID + '/' + options.objID + '/download?' + params;
|
||||
break;
|
||||
case 'download_dir_zip_url':
|
||||
url = fileServerRoot + 'zip/' + options.token;
|
||||
break;
|
||||
case 'download_file_url':
|
||||
url = siteRoot + 'lib/' + options.repoID + '/file' + Utils.encodePath(options.filePath) + '?dl=1';
|
||||
break;
|
||||
case 'file_revisions':
|
||||
params = 'p=' + Utils.encodePath(options.filePath) + '&referer=' + Utils.encodePath(options.referer);
|
||||
url = siteRoot + 'repo/file_revisions/' + options.repoID + '/?' + params;
|
||||
break;
|
||||
case 'open_via_client':
|
||||
url = 'seafile://openfile?repo_id=' + options.repoID + '&path=' + Utils.encodePath(options.filePath);
|
||||
break;
|
||||
case 'draft_view':
|
||||
url = siteRoot + 'lib/' + options.repoID + '/file' + options.filePath + '?mode=edit&draft_id=' + options.draftId;
|
||||
break;
|
||||
default:
|
||||
url = '';
|
||||
break;
|
||||
case 'download_historic_file':
|
||||
params = 'p=' + options.filePath;
|
||||
url = siteRoot + 'repo/' + historyRepoID + '/' + options.objID + '/download?' + params;
|
||||
break;
|
||||
case 'download_dir_zip_url':
|
||||
url = fileServerRoot + 'zip/' + options.token;
|
||||
break;
|
||||
case 'download_file_url':
|
||||
url = siteRoot + 'lib/' + options.repoID + '/file' + Utils.encodePath(options.filePath) + '?dl=1';
|
||||
break;
|
||||
case 'file_revisions':
|
||||
params = 'p=' + Utils.encodePath(options.filePath) + '&referer=' + Utils.encodePath(options.referer);
|
||||
url = siteRoot + 'repo/file_revisions/' + options.repoID + '/?' + params;
|
||||
break;
|
||||
case 'open_via_client':
|
||||
url = 'seafile://openfile?repo_id=' + options.repoID + '&path=' + Utils.encodePath(options.filePath);
|
||||
break;
|
||||
case 'draft_view':
|
||||
url = siteRoot + 'lib/' + options.repoID + '/file' + options.filePath + '?mode=edit&draft_id=' + options.draftId;
|
||||
break;
|
||||
default:
|
||||
url = '';
|
||||
break;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
Reference in New Issue
Block a user