Compare commits
No commits in common. "senpai" and "0.1.0" have entirely different histories.
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -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",
|
||||
|
@ -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"
|
||||
|
10
src/lib.rs
10
src/lib.rs
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user