code-server-liek
This commit is contained in:
@@ -296,7 +296,11 @@ function createNewFolder(event) {
|
||||
function saveFile(event) {
|
||||
event.stopPropagation();
|
||||
const content = editor.getValue();
|
||||
fetch(`/vsc-like/save-file`, { method: 'POST', body: JSON.stringify({ path: item.path+'/'+item.name, content: content }) , headers: { 'Content-Type': 'application/json' } })
|
||||
console.log(selectItem)
|
||||
if (selectedItem.path==undefined){
|
||||
selectedItem.path='.';
|
||||
}
|
||||
fetch(`/vsc-like/save-file`, { method: 'POST', body: JSON.stringify({ path: selectedItem.path+'/'+selectedItem.name, content: content }) , headers: { 'Content-Type': 'application/json' } })
|
||||
.then(() => loadFileTree());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user