Skip to content

Commit

Permalink
add label
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Mar 3, 2020
1 parent f16d4f3 commit 71822b1
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/plugins/drive.fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ module.exports = ({datetime , extname , pathNormalize}) => {
return fs.createWriteStream(realpath(fullpath) , options)
}

return { name , version , drive:{ protocols , folder , file , cache:false , createReadStream , createWriteStream } }
return { name , label:'本地文件',version , drive:{ protocols , folder , file , cache:false , createReadStream , createWriteStream } }
}
2 changes: 1 addition & 1 deletion app/plugins/drive.lb.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ module.exports = ({getConfig, setIgnorePaths , getDrives , getRuntime}) => {
}
}

return { name , version , drive:{ protocols , folder , file : folder, cache:false} }
return { name , label:'负载均衡', version , drive:{ protocols , folder , file : folder, cache:false} }
}
1 change: 1 addition & 0 deletions app/services/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ const parseLnk = (content) => {
const getVendors = () => [...new Set(driveMountableMap.values())].map(id => {
return {
name : resources[id].name,
label: resources[id].label || resources[id].name,
protocol : resources[id].drive.protocols[0]
}
})
Expand Down
2 changes: 1 addition & 1 deletion app/views/default/manage.pug
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ block content
.col-sm-2
select.form-control(name='vendor', value=(i.path.match(/^.*(?=\:\/\/)/) || [''])[0],placeholder=__('type'),required)
each vendor in vendors
option(value=vendor.protocol, selected=i.path.indexOf(vendor.protocol+':')>=0 ? 'selected' : null) #{vendor.name}
option(value=vendor.protocol, selected=i.path.indexOf(vendor.protocol+':')>=0 ? 'selected' : null) #{vendor.label}
.col-sm-2
input.form-control(type='text', name='name', value=i.name,placeholder=__('name'),required)
.col-sm-7
Expand Down
6 changes: 2 additions & 4 deletions plugins/drive.189cloud.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ const urlFormat = require('url').format

const crypto = require('crypto')

const fileIdMap = {}

const parseXML = require('xml2js').parseString


Expand Down Expand Up @@ -295,7 +293,7 @@ module.exports = ({ request, cache, getConfig, querystring, base64, saveDrive, g
}
}
}

// 无credentials
if(!credentials){
// 挂载验证回调
Expand Down Expand Up @@ -503,5 +501,5 @@ module.exports = ({ request, cache, getConfig, querystring, base64, saveDrive, g
}
}

return { name, version, drive: { protocols, folder, file , createReadStream } }
return { name, label:'天翼云', version, drive: { protocols, folder, file , createReadStream } }
}
2 changes: 1 addition & 1 deletion plugins/drive.gd.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -780,5 +780,5 @@ module.exports = ({ request, cache, getConfig, querystring, base64, saveDrive, g
}

}
return { name, version, drive: { protocols, folder, file , createReadStream , createWriteStream } }
return { name, label:'GD API版', version, drive: { protocols, folder, file , createReadStream , createWriteStream } }
}
2 changes: 1 addition & 1 deletion plugins/drive.gd.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,5 +201,5 @@ module.exports = ({ request , getConfig , datetime , cache , wrapReadableStream
}
}

return { name , version, drive:{ protocols, folder , file , createReadStream } }
return { name ,label:'GD ID挂载版', version, drive:{ protocols, folder , file , createReadStream } }
}
2 changes: 1 addition & 1 deletion plugins/drive.lanzou.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,5 @@ module.exports = ({ request , getConfig , datetime , cache , retrieveSize }) =>
return data
}

return { name , version, drive:{ protocols, folder , file } }
return { name , label:'蓝奏云',version, drive:{ protocols, folder , file } }
}
2 changes: 1 addition & 1 deletion plugins/drive.od.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,5 +688,5 @@ module.exports = ({ request, cache, getConfig, querystring, base64 , saveDrive ,

}

return { name, version, drive: { protocols, folder, file , createReadStream , createWriteStream } }
return { name, label:'OD API版',version, drive: { protocols, folder, file , createReadStream , createWriteStream } }
}
2 changes: 1 addition & 1 deletion plugins/drive.od.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ module.exports = ({ request , cache , getConfig , querystring , datetime }) => {
return hit || ''
}

return { name, version, drive:{protocols, folder, file} }
return { name, label:'OD ID挂载版', version, drive:{protocols, folder, file} }
}
2 changes: 1 addition & 1 deletion plugins/drive.odb.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,5 @@ module.exports = ({ request, cache, getConfig , datetime }) => {
}
}

return { name, version, drive: { protocols, folder, file } }
return { name, label:'* OD Business 非API', version, drive: { protocols, folder, file } }
}
2 changes: 1 addition & 1 deletion plugins/drive.odc.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,5 +734,5 @@ module.exports = ({ request, cache, getConfig, querystring, base64 , saveDrive ,

}

return { name, version, drive: { protocols, folder, file , createReadStream , createWriteStream } }
return { name, label:'OD 世纪互联', version, drive: { protocols, folder, file , createReadStream , createWriteStream } }
}

0 comments on commit 71822b1

Please sign in to comment.