returnmodal('Rename File Failed',`A file or folder ${extractNameFromKey(newFolderPath)} already exists at this location. Please choose a different name.`,'Close',()=>{})
returnglobal.modal('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.`,'Close',()=>{})
global.modal('Rename File Failed',`A file or folder ${extractNameFromKey(newPath)} already exists at this location. Please choose a different name.`,'Close',()=>{})
}else{
awaitfileManager.rename(oldPath,newPath)
}
}catch(error){
modal('Rename File Failed','Unexpected error while renaming: '+typeoferror==='string'?error:error.message,'Close',async()=>{})
global.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?`,'OK',()=>toGist(path,type),'Cancel',()=>{})
global.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(path,type),'Cancel',()=>{})
modal('Create a public gist','Are you sure you want to push changes to remote gist file on github.com?','OK',()=>toGist(path,type),'Cancel',()=>{})
global.modal('Create a public gist','Are you sure you want to push changes to remote gist file on github.com?','OK',()=>toGist(path,type),'Cancel',()=>{})
modal('Create a public gist',`Are you sure you want to anonymously publish all your files in the ${path} folder as a public gist on github.com?`,'OK',()=>toGist(path,type),'Cancel',()=>{})
global.modal('Create a public gist',`Are you sure you want to anonymously publish all your files in the ${path} folder as a public gist on github.com?`,'OK',()=>toGist(path,type),'Cancel',()=>{})
modal('Create a public gist',`Are you sure you want to anonymously publish ${path} file as a public gist on github.com?`,'OK',()=>toGist(path,type),'Cancel',()=>{})
global.modal('Create a public gist',`Are you sure you want to anonymously publish ${path} file as a public gist on github.com?`,'OK',()=>toGist(path,type),'Cancel',()=>{})
}
consttoGist=(path?:string,type?:string)=>{
constfilesProvider=fileSystem.provider.provider
constproccedResult=function(error,data){
if(error){
modal('Publish to gist Failed','Failed to manage gist: '+error,'Close',()=>{})
global.modal('Publish to gist Failed','Failed to manage gist: '+error,'Close',()=>{})
}else{
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?`,'OK',()=>{
global.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.','Close',()=>{})
global.modal('Authorize Token','Remix requires an access token (which includes gists creation permission). Please go to the settings tab to create one.','Close',()=>{})
}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='+