Compare commits

..

No commits in common. "senpai" and "0.1.0" have entirely different histories.

3 changed files with 3 additions and 11 deletions

2
Cargo.lock generated
View File

@ -127,7 +127,7 @@ checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f"
[[package]]
name = "wasm-terminal"
version = "0.1.1"
version = "0.1.0"
dependencies = [
"console_error_panic_hook",
"wasm-bindgen",

View File

@ -1,6 +1,6 @@
[package]
name = "wasm-terminal"
version = "0.1.1"
version = "0.1.0"
edition = "2021"
authors = ["Daniel Kluge <daniel-git@c0ntroller.de>"]
description = "Console application with commands in WASM for my website"

View File

@ -185,8 +185,7 @@ impl Console {
#[wasm_bindgen]
impl Console {
pub fn new() -> Console {
#[cfg(not(debug_assertions))]
// TODO remove in release
console_error_panic_hook::set_once();
let root = Rc::new(RefCell::new(Directory::new("".to_string(), "".to_string())));
@ -206,13 +205,6 @@ impl Console {
self.output.clone()
}
pub fn get_pwd(&self) -> String {
match self.pwd.borrow().last() {
Some(dir) => dir.borrow().get_path(),
None => "/".to_string(),
}
}
pub fn get_last_commands(&self) -> Vec<String> {
self.last_commands.clone()
}