minor cleanup

auto-build-api-doc-with-code
Moe 2021-04-17 10:04:08 -07:00
parent 4f985bd52e
commit 25c4b9d085
6 changed files with 7 additions and 37 deletions

View File

@ -360,6 +360,7 @@
"SFTP (SSH File Transfer)": "SFTP (SSH File Transfer)",
"SFTP Error": "SFTP Error",
"SFTP": "SFTP",
"accountSettingsError": "Account Settings Error",
"Could not create Bucket.": "Could not create Bucket.",
"Amazon S3": "Amazon S3",
"Wasabi Hot Cloud Storage": "Wasabi Hot Cloud Storage",

View File

@ -19,7 +19,7 @@ module.exports = function(s,config,lang){
}
var loadWasabiHotCloudStorageForUser = function(e){
// e = user
var userDetails = JSON.parse(e.details)
var userDetails = s.parseJSON(e.details)
if(userDetails.whcs_use_global === '1' && config.cloudUploaders && config.cloudUploaders.WasabiHotCloudStorage){
// {
// whcs_accessKeyId: "",
@ -106,7 +106,7 @@ module.exports = function(s,config,lang){
})
var bucketName = s.group[e.ke].init.whcs_bucket
var saveLocation = s.group[e.ke].init.whcs_dir+e.ke+'/'+e.mid+'/'+k.filename
// gcp does not support multipart. Set queueSize to 1 and a big enough partSize
// gcp does not support multipart. Set queueSize to 1 and a big enough partSize
var options = s.group[e.ke].whcs.endpoint.href.includes("https://storage.googleapis.com") ? {
queueSize: 1,
partSize: 300 * 1024 * 1024

View File

@ -280,7 +280,7 @@ module.exports = function(s,config,lang){
}
///unchangeable from client side, so reset them in case they did.
var form = d.form
var formDetails = JSON.parse(form.details)
var formDetails = s.parseJSON(form.details,{})
if(!dontRunExtensions){
s.beforeAccountSaveExtensions.forEach(function(extender){
extender({

View File

@ -480,7 +480,6 @@ $.ccio.init=function(x,d,user,k){
$.each(user,function(n,v){$.sM.e.find('[name="'+n+'"]').val(v).change()})
$.each(k.d,function(n,v){$.sM.e.find('[detail="'+n+'"]').val(v).change()})
$.gR.drawList();
$.ccio.pm('link-set',k.d.links,null,user)
break;
case'jsontoblock'://draw json as block
if(d instanceof Object){

View File

@ -738,38 +738,6 @@ $user.ws.on('connect',function (d){
}else{
$.ccio.cx({f:'init',ke:$user.ke,auth:$user.auth_token,uid:$user.uid})
}
if($user.details&&$user.details.links){
$.each($user.details.links,function(n,v){
if(v.secure==='0'){
v.protocol='http'
}else{
v.protocol='https'
}
if(v.host.indexOf('://')>-1){
v.URL=v.protocol+'://'+v.host.split('://')[1]
}else{
v.URL=v.protocol+'://'+v.host
}
$.get(v.URL+'/'+v.api+'/userInfo/'+v.ke,function(e){
if(e.ok===true){
e.user.auth_token=v.api
$.users[v.api]=e.user
$.users[v.api].info=v
$.users[v.api].ws=io(v.host)
$.users[v.api].ws.on('ping', function(d){
$.users[v.api].ws.emit('pong',{beat:1});
});
$.users[v.api].ws.on('connect',function (d){
console.log(v.host,'connected')
$.ccio.cx({f:'init',ke:e.user.ke,auth:v.api,uid:e.user.uid},$.users[v.api])
})
$.users[v.api].ws.on('f',function (d){
$.ccio.globalWebsocket(d,$.users[v.api])
})
}
})
})
}
})
})
PNotify.prototype.options.styling = "fontawesome";

View File

@ -179,7 +179,9 @@
<% include blocks/schedules.ejs %>
<% include blocks/confirm.ejs %>
<% include blocks/shinobiHub.ejs %>
<% include blocks/subAccountManager.ejs %>
<% if(!details.sub){ %>
<% include blocks/subAccountManager.ejs %>
<% } %>
<% customAutoLoad.PageBlocks.forEach(function(block){ %>
<%- include(block) %>
<% }) %>