Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump @tauri-apps/api from 2.0.0-beta.14 to 2.0.0-beta.15 in /client #9

Merged
Merged
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
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
Loading