aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-22 17:14:35 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-22 17:14:35 +0200
commit7be562965057dddd0719646c5bb7fb48574bb3a2 (patch)
tree60d42bb5a788952f870ead237e5ecc80a4c89727
parent3098602245cd31fbc184a6559b5f5ca95aaaa741 (diff)
downloadFlightCore-7be562965057dddd0719646c5bb7fb48574bb3a2.tar.gz
FlightCore-7be562965057dddd0719646c5bb7fb48574bb3a2.zip
Remove left-over functions from original template
-rw-r--r--src-tauri/src/main.rs17
-rw-r--r--src-ui/src/main.ts18
2 files changed, 1 insertions, 34 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index 945d6528..536acbe5 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -15,7 +15,7 @@ use app::{
get_host_os, get_log_list, get_northstar_version_number, install_northstar, launch_northstar,
GameInstall,
};
-use tauri::{Manager, State};
+use tauri::Manager;
use tokio::time::sleep;
use tauri_plugin_store::PluginBuilder;
@@ -67,8 +67,6 @@ fn main() {
})
.manage(Counter(Default::default()))
.invoke_handler(tauri::generate_handler![
- hello_world,
- add_count,
force_panic,
find_game_install_location_caller,
get_version_number,
@@ -99,19 +97,6 @@ fn find_game_install_location_caller() -> Result<GameInstall, String> {
}
#[tauri::command]
-fn hello_world() -> String {
- "Hello World!!!".to_string()
-}
-
-#[tauri::command]
-fn add_count(num: i32, counter: State<'_, Counter>) -> String {
- let mut val = counter.0.lock().unwrap();
- *val += num;
-
- format!("{val}")
-}
-
-#[tauri::command]
/// This function's only use is to force a `panic!()`
fn force_panic() {
panic!("Force panicked!");
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index 00c89af7..3b47e6f4 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -90,9 +90,6 @@ async function manually_find_titanfall2_install(omniButtonEl: HTMLElement) {
document.addEventListener("DOMContentLoaded", async function () {
// get the elements
- // const helloEl = $("div.hello")! as HTMLElement;
- // let counterButtonEl = $("counter-button") as HTMLElement;
- // let counterResultEl = $("counter-result") as HTMLElement;
let pingEl = $("backend-ping")! as HTMLElement;
let panicButtonEl = $("panic-button") as HTMLElement;
let installLocationHolderEl = document.getElementById("install-location-holder") as HTMLInputElement;
@@ -230,21 +227,6 @@ document.addEventListener("DOMContentLoaded", async function () {
}
});
- // // counter button click
- // counterButtonEl.addEventListener("pointerup", async function () {
- // const result = await invoke("add_count", { num: 1 }) as string;
- // counterResultEl.textContent = result;
- // });
-
- // // hello click
- // helloEl.addEventListener("pointerup", async function () {
- // const result = await invoke("hello_world") as string;
- // helloEl.textContent = result;
- // setTimeout(function () {
- // helloEl.textContent = "Click again";
- // }, 1000);
- // })
-
// panic button click
panicButtonEl.addEventListener("pointerup", async function () {
await invoke("force_panic");