Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/rust.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/windows.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target
.idea/
*.iml
*.iml
/node_modules/
package-lock.json
21 changes: 0 additions & 21 deletions Cargo.toml

This file was deleted.

6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ pipeline {
steps {
sh '''export PATH="$HOME/.cargo/bin:$PATH"

cargo build
cargo build --target x86_64-pc-windows-gnu'''
yarn install
yarn tauri build'''
}
post {
success {
archiveArtifacts artifacts: 'target/debug/klauncher, target/x86_64-pc-windows-gnu/debug/klauncher.exe', followSymlinks: false
archiveArtifacts artifacts: 'src-tauri/target/release/bundle/**/*', followSymlinks: false
}
}
}
Expand Down
39 changes: 39 additions & 0 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<body>
<div>
<button id="log">Call Log API</button>
<button id="request">Call Request (async) API</button>
<button id="event">Send event to Rust</button>
<div id="response"></div>
</div>
<script>
document.getElementById("log").addEventListener("click", function () {
console.log("log");
window.__TAURI__.tauri.invoke({
cmd: "logOperation",
event: "tauri-click",
payload: "this payload is optional because we used Option in Rust",
});
});

document.getElementById("request").addEventListener("click", function () {
window.__TAURI__.tauri
.invoke({
cmd: "performRequest",
endpoint: "dummy endpoint arg",
body: {
id: 5,
name: "test",
},
})
.then(registerResponse)
.catch(registerResponse);
});

document.getElementById("event").addEventListener("click", function () {
window.__TAURI__.event.emit("js-event", "this is the payload string");
});
</script>
</body>
</html>
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "klauncher",
"version": "1.0.0",
"description": "The launcher for Kakara.",
"index": "tauri",
"scripts": {
"tauri": "tauri",
"dev": "tauri dev"
},
"author": "Kakara",
"license": "MIT",
"dependencies": {
"bootstrap": "4.6.0",
"tauri": "^0.14.1"
}
}
10 changes: 10 additions & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Generated by Cargo
# will have compiled files and executables
/target/
WixTools

# These are backup files generated by rustfmt
**/*.rs.bk

config.json
bundle.json
Loading