This repository was archived by the owner on Aug 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
stefan.genov
committed
Mar 18, 2020
1 parent
a9f62ab
commit d9bce38
Showing
10 changed files
with
70 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
8.11.2 | ||
- Updated the README | ||
- Moved some controllers around | ||
|
||
8.11.1 | ||
- Changed some text | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
const { Server } = require( 'event_request' ); | ||
const app = Server(); | ||
const PathHelper = require( '../../main/path' ); | ||
const BrowseInput = require( '../input/browse_input' ); | ||
|
||
/** | ||
* @brief Adds a '/browse/getFiles' route with method GET | ||
* | ||
* @details Required Parameters: NONE | ||
* Optional Parameters: dir, position | ||
* | ||
* @return void | ||
*/ | ||
app.get( '/browse/getFiles', ( event )=>{ | ||
const input = new BrowseInput( event ); | ||
|
||
if ( ! input.isValid() ) | ||
throw new Error( 'Invalid params' ); | ||
|
||
const dir = input.getDir(); | ||
|
||
PathHelper.getItems( event, dir, input.getPosition() ).then(( data ) => { | ||
const { items, position, hasMore } = data; | ||
|
||
event.send( { items, position, dir, hasMore } ) | ||
}).catch( event.next ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const { Server } = require( 'event_request' ); | ||
|
||
const app = Server(); | ||
|
||
app.get( '/terminal', ( event )=>{ | ||
event.render( 'terminal', {} ) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<%- include("components/partial/stylesheets") %> | ||
<link rel="stylesheet" href="/node_modules/xterm/css/xterm.css" /> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Server Emulator</title> | ||
</head> | ||
<body> | ||
<%- include("components/modal", { active: "terminal" }) %> | ||
<%- include("components/sidebar", { active: "terminal" }) %> | ||
|
||
<div class="container pt-5" style="color: gray"> | ||
|
||
</div> | ||
</body> | ||
<%- include("components/partial/js-libs") %> | ||
<script src="node_modules/xterm/lib/xterm.js"></script> | ||
<script> | ||
const term = new Terminal(); | ||
term.open( document.getElementById( 'terminal' ) ); | ||
term.write( 'Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ' ); | ||
</script> | ||
</html> |