Skip to content

Commit

Permalink
Merge pull request #1 from jbolda/fix-tauri-api-interactions
Browse files Browse the repository at this point in the history
Improve TrayIcon and State Interactions
  • Loading branch information
jbolda authored Oct 3, 2024
2 parents 90a4532 + a9b2a0d commit e32192a
Show file tree
Hide file tree
Showing 25 changed files with 3,087 additions and 3,594 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
290 changes: 132 additions & 158 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
{
"name": "tray-app",
"name": "stream-todo",
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"tauri": "tauri"
"tauri": "tauri",
"postinstall": "patch-package"
},
"dependencies": {
"@adobe/react-spectrum": "^3.35.1",
"@tauri-apps/api": "^2.0.0-beta.14",
"@tauri-apps/plugin-global-shortcut": "^2.0.0-beta.6",
"@tauri-apps/plugin-notification": "^2.0.0-beta.6",
"@tauri-apps/plugin-store": "^2.0.0-beta.6",
"@tauri-apps/plugin-positioner": "^2.0.0-beta.7",
"@tauri-apps/api": "^2.0.1",
"@tauri-apps/plugin-global-shortcut": "^2.0.0",
"@tauri-apps/plugin-notification": "^2.0.0",
"@tauri-apps/plugin-store": "^2.0.0",
"@tauri-apps/plugin-positioner": "^2.0.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-stately": "^3.31.1"
},
"devDependencies": {
"@tauri-apps/cli": "^2.0.0-beta.21",
"@tauri-apps/cli": "^2.0.1",
"@types/react": "^17.0.80",
"@types/react-dom": "^17.0.25",
"@vitejs/plugin-react": "^4.3.1",
Expand Down
20 changes: 20 additions & 0 deletions patches/@tauri-apps+plugin-positioner+2.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/node_modules/@tauri-apps/plugin-positioner/dist-js/index.js b/node_modules/@tauri-apps/plugin-positioner/dist-js/index.js
index fe3c7b2..b68b31b 100644
--- a/node_modules/@tauri-apps/plugin-positioner/dist-js/index.js
+++ b/node_modules/@tauri-apps/plugin-positioner/dist-js/index.js
@@ -37,13 +37,11 @@ async function moveWindow(to) {
});
}
async function handleIconState(event) {
- const size = {};
- size[`${event.rect.size.type}`] = {
+ const size = {
width: event.rect.size.width,
height: event.rect.size.height
};
- const position = {};
- position[`${event.rect.position.type}`] = {
+ const position = {
x: event.rect.position.x,
y: event.rect.position.y
};
Loading

0 comments on commit e32192a

Please sign in to comment.