feat(window): add plugin (#352)

This commit is contained in:
Lucas Fernandes Nogueira
2023-05-12 03:58:20 -07:00
committed by GitHub
parent a95fb473a2
commit bb26f7d710
27 changed files with 2865 additions and 169 deletions
+2 -3
View File
@@ -1,7 +1,7 @@
<script>
import { writable } from "svelte/store";
import { open } from "tauri-plugin-shell-api";
import { appWindow, getCurrent } from "@tauri-apps/api/window";
import { appWindow, getCurrent } from "tauri-plugin-window-api";
import * as os from "tauri-plugin-os-api";
import Welcome from "./views/Welcome.svelte";
@@ -20,7 +20,6 @@
import App from "./views/App.svelte";
import { onMount } from "svelte";
import { listen } from "@tauri-apps/api/event";
import { ask } from "tauri-plugin-dialog-api";
if (appWindow.label !== "main") {
@@ -124,7 +123,7 @@
onMount(async () => {
const window = getCurrent();
isWindowMaximized = await window.isMaximized();
listen("tauri://resize", async () => {
window.onResized(async () => {
isWindowMaximized = await window.isMaximized();
});
});