Skip to content

Commit

Permalink
v 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
FaiezWaseem committed Feb 15, 2023
1 parent e852f19 commit 80cdab8
Show file tree
Hide file tree
Showing 5 changed files with 577 additions and 9 deletions.
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<body oncontextmenu="return false;">
<div class="container">

<div class="iframe">
<div>
<span>Terminal<span>
<button class="btn close-modal" id="close-shell">&times;</button>
</div>
<iframe src="./src/php/shell.php" frameborder="0" id='terminal'></iframe>
</div>
<div class="save"><img src="./src/images/Actions-document-save-as-icon.png" alt=""></div>
<div class="alert">Message</div>
<div class="loader"><img src="./src/images/loading_simple.gif" alt=""></div>
Expand Down
23 changes: 17 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ Simply put it in the public Directory and enjoy.
- [x] Delete Files
- [x] create new file
- [x] create new folder
- [] rename file
- [] unzip files
- [] add mobile fileupload
- [x] In-built Shell
- [ ] rename file
- [ ] unzip files
- [ ] add mobile fileupload

### Attribution
<a href="https://www.flaticon.com/free-icons/file" title="file icons">File icons created by Dimitry Miroliubov - Flaticon</a>
<a href="https://www.flaticon.com/free-icons/folder" title="folder icons">Folder icons created by kumakamu - Flaticon</a>
<a href="https://github.com/lovefc/fcup" title="File Upload">Large File Upload by fcup on github by lovefc </a>
<a href="https://www.flaticon.com/free-icons/file" title="file icons">File icons created by Dimitry Miroliubov - Flaticon</a><br>
<a href="https://www.flaticon.com/free-icons/folder" title="folder icons">Folder icons created by kumakamu - Flaticon</a><br>
<a href="https://github.com/lovefc/fcup" title="File Upload">Large File Upload - fcup on by lovefc </a><br>
<a href="https://github.com/flozz/p0wny-shell" title="File Upload">Terminal - p0wny-shell by flozz</a><br>





## logs

-- added Terminal (Feb 15 2023)

20 changes: 19 additions & 1 deletion src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,22 @@
overflow: hidden;
display: none;
}

.iframe{
padding: 5px;
position: absolute;
bottom: 0%;
right: 0%;
z-index: 9999;
background: #222;
width: 79%;
border-radius : 12px 0px;
}
.iframe iframe{
width: 100%;
}
.iframe div span{
color : white;
}
.container .save{
position: absolute;
bottom: 5%;
Expand Down Expand Up @@ -171,4 +186,7 @@
.modal {
width: 250px;
}
.iframe {
width: 99%;
}
}
20 changes: 18 additions & 2 deletions src/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import db from "./tinylib.js"
const codeEditor = {
// To add a custom path edit currentDir key EX : "/var/user/home/"
// leave null to auto detect server root path
currentDir: null,
currentDir: "C:/xampp/htdocs/php/CodeEditor",
rootPath: null,
selectedFile: null,
fileIcon: (ext, name = null) => {
Expand Down Expand Up @@ -280,7 +280,23 @@ const codeEditor = {
document.body.style.border = "0px solid green"
let files = event.dataTransfer.files;
this.upload(files)
})
});


let isClosed = false;
document.getElementById("close-shell").onclick = () => {
if(!isClosed){
document.querySelector('#terminal').style.display = "none";
document.querySelector('#close-shell').innerHTML = "&#8648;";
isClosed = true;
}else{
document.querySelector('#close-shell').innerHTML = "&times;";
document.querySelector('#terminal').style.display = "block";
isClosed = false;
}
}



},
previousDir: function () {
Expand Down
Loading

0 comments on commit 80cdab8

Please sign in to comment.