Initial commit
This commit is contained in:
commit
96033b4b9f
15 changed files with 6300 additions and 0 deletions
30
src/main.js
Normal file
30
src/main.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
const { invoke } = window.__TAURI__.core;
|
||||
|
||||
let cntMsgEl;
|
||||
|
||||
// async function greet() {
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
// greetMsgEl.textContent = await invoke("greet", { name: greetInputEl.value });
|
||||
//}
|
||||
|
||||
async function aldi() {
|
||||
await invoke("swap", { store: "aldi" });
|
||||
cntMsgEl.textContent = await invoke("count", {});
|
||||
}
|
||||
|
||||
async function rewe() {
|
||||
invoke("swap", { store: "rewe" });
|
||||
cntMsgEl.textContent = await invoke("count", {});
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
cntMsgEl = document.querySelector("#cnt-msg");
|
||||
document.querySelector("#aldi-form").addEventListener("submit", (e) => {
|
||||
e.preventDefault();
|
||||
aldi();
|
||||
});
|
||||
document.querySelector("#rewe-form").addEventListener("submit", (e) => {
|
||||
e.preventDefault();
|
||||
rewe();
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue