Skip to content

Commit

Permalink
Bump @tauri-apps/api from 2.0.0-beta.14 to 2.0.0-beta.15 in /client (#9)
Browse files Browse the repository at this point in the history
* Bump @tauri-apps/api from 2.0.0-beta.14 to 2.0.0-beta.15 in /client

Bumps [@tauri-apps/api](https://github.com/tauri-apps/tauri) from 2.0.0-beta.14 to 2.0.0-beta.15.
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/@tauri-apps/api-v2.0.0-beta.14...@tauri-apps/api-v2.0.0-beta.15)

---
updated-dependencies:
- dependency-name: "@tauri-apps/api"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update lockfile

* Update imports

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aidan Timson <aidan@timmo.dev>
  • Loading branch information
dependabot[bot] and timmo001 authored Jul 14, 2024
1 parent 8f1d1bd commit 0978ddc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Binary file modified client/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"license": "MIT",
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.14",
"@tauri-apps/api": "2.0.0-beta.15",
"@tauri-apps/plugin-shell": "2.0.0-beta.7",
"bits-ui": "^0.21.12",
"clsx": "^2.1.1",
Expand Down
8 changes: 4 additions & 4 deletions client/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { onMount } from "svelte";
import { invoke } from "@tauri-apps/api/core";
import { getCurrent, LogicalSize } from "@tauri-apps/api/window";
import { getCurrentWindow, LogicalSize } from "@tauri-apps/api/window";
import { v4 as uuidv4 } from "uuid";
import type { Notification } from "$lib/types/notification";
Expand Down Expand Up @@ -33,12 +33,12 @@
async function hideWindow(): Promise<void> {
console.log("Hiding window");
await getCurrent().hide();
await getCurrentWindow().hide();
}
async function showWindow(): Promise<void> {
console.log("Showing window");
await getCurrent().show();
await getCurrentWindow().show();
await invoke("set_window", {});
// Update the window size
Expand All @@ -60,7 +60,7 @@
console.log("Resizing window:", { width, height });
// Resize the window
await getCurrent().setSize(new LogicalSize(width, height));
await getCurrentWindow().setSize(new LogicalSize(width, height));
}
function updateWindowSize(): void {
Expand Down
10 changes: 5 additions & 5 deletions client/src/routes/settings/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from "svelte";
import { getCurrent } from "@tauri-apps/api/window";
import { getCurrentWindow } from "@tauri-apps/api/window";
import { invoke } from "@tauri-apps/api/core";
import { listen } from "@tauri-apps/api/event";
import LoaderCircle from "lucide-svelte/icons/loader-circle";
Expand All @@ -16,19 +16,19 @@
let settings: Settings = DEFAULT_SETTINGS;
async function getCurrentSettings(): Promise<void> {
async function getCurrentWindowSettings(): Promise<void> {
settings = (await invoke("get_settings")) as Settings;
console.log("Current settings", settings);
}
async function hideWindow(): Promise<void> {
console.log("Hiding window");
await getCurrent().hide();
await getCurrentWindow().hide();
}
async function showWindow(): Promise<void> {
console.log("Showing window");
await getCurrent().show();
await getCurrentWindow().show();
}
async function saveSettings(): Promise<void> {
Expand All @@ -50,7 +50,7 @@
onMount(() => {
// Handle the window being shown
listen("show", async () => {
await getCurrentSettings();
await getCurrentWindowSettings();
await showWindow();
});
});
Expand Down

0 comments on commit 0978ddc

Please sign in to comment.