@ -90,11 +90,12 @@ export class LandingPage extends BaseApi {
}
render ( ) {
let load = function ( service , item , examples ) {
let load = function ( service , item , examples , info ) {
let compilerImport = new CompilerImport ( )
let fileProviders = globalRegistry . get ( 'fileproviders' ) . api
const msg = yo ` <div class="p-2"><span>Enter the ${ item } you would like to load.</span>
< div > e . g $ { examples . map ( ( url ) => { return yo ` <div><a> ${ url } </a></div> ` } ) } < / d i v > < / d i v > `
< div > $ { info } < / d i v >
< div > e . g $ { examples . map ( ( url ) => { return yo ` <div class="p-1"><a> ${ url } </a></div> ` } ) } < / d i v > < / d i v > `
modalDialogCustom . prompt ( ` Import from ${ service } ` , msg , null , ( target ) => {
if ( target !== '' ) {
@ -216,9 +217,11 @@ export class LandingPage extends BaseApi {
< p class = "mb-1" > Import From : < / p >
< div class = "btn-group" >
< button class = "btn btn-sm btn-secondary" onclick = $ { ( ) => { importFromGist ( ) } } > Gist < / b u t t o n >
< button class = "btn btn-sm btn-secondary" onclick = $ { ( ) => { load ( 'Github' , 'G ithub URL' , [ 'https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/crowdsale/Crowdsale.sol' , 'https://github.com/OpenZeppelin/openzeppelin-solidity/blob/67bca857eedf99bf44a4b6a0fc5b5ed553135316/contracts/access/Roles.sol' , 'github:OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol#v2.1.2' ] ) } } > Github < / b u t t o n >
< button class = "btn btn-sm btn-secondary" onclick = $ { ( ) => { load ( 'Github' , 'g ithub URL' , [ 'https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/crowdsale/Crowdsale.sol' , 'https://github.com/OpenZeppelin/openzeppelin-solidity/blob/67bca857eedf99bf44a4b6a0fc5b5ed553135316/contracts/access/Roles.sol' , 'github:OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol#v2.1.2' ] ) } } > Github < / b u t t o n >
< button class = "btn btn-sm btn-secondary" onclick = $ { ( ) => { load ( 'Swarm' , 'bzz-raw URL' , [ 'bzz-raw://<swarm-hash>' ] ) } } > Swarm < / b u t t o n >
< button class = "btn btn-sm btn-secondary" onclick = $ { ( ) => { load ( 'Ipfs' , 'ipfs URL' , [ 'ipfs://<ipfs-hash>' ] ) } } > Ipfs < / b u t t o n >
< button class = "btn btn-sm btn-secondary" onclick = $ { ( ) => { load ( 'Https' , 'http/https raw content' , [ 'https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/master/contracts/crowdsale/validation/IndividuallyCappedCrowdsale.sol' ] ) } } > https < / b u t t o n >
< button class = "btn btn-sm btn-secondary" onclick = $ { ( ) => { load ( '@resolver-engine' , 'resolver-engine URL' , [ 'github:OpenZeppelin/openzeppelin-solidity/contracts/ownership/Ownable.sol#v2.1.2' ] , yo ` <span>please checkout <a class='text-primary' href="https://github.com/Crypto-Punkers/resolver-engine" target='_blank'>https://github.com/Crypto-Punkers/resolver-engine</a> for more information</span> ` ) } } > Resolver - engine < / b u t t o n >
< / d i v > < ! - - e n d o f b t n - g r o u p - - >
< / d i v > < ! - - e n d o f d i v . f i l e - - >
< / d i v > < ! - - e n d o f # c o l 1 - - >