Skip to content

Commit

Permalink
tauri tray menu title
Browse files Browse the repository at this point in the history
  • Loading branch information
rming committed Aug 18, 2022
1 parent 0204176 commit cd1261a
Show file tree
Hide file tree
Showing 24 changed files with 3,941 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# tauri-tray-icon-animation

minimal example of tauri tray icon animation.

## run

```bash
cd src-tauri
cargo tauri dev
```
29 changes: 29 additions & 0 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Home Page</title>
</head>
<body>
<center>
<select id="locale_select">
<option value="en" selected>en</option>
<option value="zh">zh</option>
<option value="zhtw">zhtw</option>
<option value="ja">ja</option>
</select>
<button id="update_locale">Update locale</button>
</center>
<script type="text/javascript">
window.onload = function() {
document.getElementById("update_locale")
.addEventListener("click", ()=>{
const locale = document.getElementById("locale_select").value
window.__TAURI__.tauri.invoke("update_locale", {locale})
});
};

</script>
</body>
</html>
4 changes: 4 additions & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
/target/
WixTools
Loading

0 comments on commit cd1261a

Please sign in to comment.