returnmodal('Rename File Failed',`A file or folder ${extractNameFromKey(newFolderPath)} already exists at this location. Please choose a different name.`,{
returnmodal('Rename File Failed',`A file or folder ${extractNameFromKey(newFolderPath)} already exists at this location. Please choose a different name.`,'Close',()=>{})
modal('Rename File Failed',`A file or folder ${extractNameFromKey(newPath)} already exists at this location. Please choose a different name.`,{
modal('Rename File Failed',`A file or folder ${extractNameFromKey(newPath)} already exists at this location. Please choose a different name.`,'Close',()=>{})
label:'Close',
fn:()=>{}
},null)
}else{
}else{
awaitfileManager.rename(oldPath,newPath)
awaitfileManager.rename(oldPath,newPath)
}
}
}catch(error){
}catch(error){
modal('Rename File Failed','Unexpected error while renaming: '+typeoferror==='string'?error:error.message,{
modal('Rename File Failed','Unexpected error while renaming: '+typeoferror==='string'?error:error.message,'Close',async()=>{})
modal('Create a public gist',`Are you sure you want to anonymously publish all your files in the ${name} workspace as a public gist on github.com?`,{
modal('Create a public gist',`Are you sure you want to anonymously publish all your files in the ${name} workspace as a public gist on github.com?`,'OK',toGist,'Cancel',()=>{})
label:'OK',
fn:toGist
},{
label:'Cancel',
fn:()=>{}
})
}
}
consttoGist=(id?:string)=>{
consttoGist=(id?:string)=>{
constfilesProvider=fileSystem.provider.provider
constfilesProvider=fileSystem.provider.provider
constproccedResult=function(error,data){
constproccedResult=function(error,data){
if(error){
if(error){
modal('Publish to gist Failed','Failed to manage gist: '+error,{
modal('Publish to gist Failed','Failed to manage gist: '+error,'Close',()=>{})
label:'Close',
fn:async()=>{}
},null)
}else{
}else{
if(data.html_url){
if(data.html_url){
modal('Gist is ready',`The gist is at ${data.html_url}. Would you like to open it in a new window?`,{
modal('Gist is ready',`The gist is at ${data.html_url}. Would you like to open it in a new window?`,'OK',()=>{
modal('Authorize Token','Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.',{
modal('Authorize Token','Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.','Close',()=>{})
label:'Close',
fn:async()=>{}
},null)
}else{
}else{
constdescription='Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version='+
constdescription='Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version='+