mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
feat(window): add plugin (#352)
This commit is contained in:
committed by
GitHub
parent
a95fb473a2
commit
bb26f7d710
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user