chore: Merge branch v1 into v2 (#702)

This commit is contained in:
Fabian-Lars
2023-11-14 01:50:13 +01:00
committed by GitHub
parent d4d1633c4d
commit 251852ccbc
42 changed files with 1663 additions and 5522 deletions
+7 -9
View File
@@ -3,7 +3,7 @@
// SPDX-License-Identifier: MIT
import { invoke } from "@tauri-apps/api/primitives";
import { getCurrent } from "@tauri-apps/api/window";
import { WindowLabel, getCurrent } from "@tauri-apps/api/window";
export enum StateFlags {
SIZE = 1 << 0,
@@ -19,19 +19,17 @@ export enum StateFlags {
* Save the state of all open windows to disk.
*/
async function saveWindowState(flags: StateFlags): Promise<void> {
return invoke("plugin:window-state|save_window_state", {
flags,
});
return invoke("plugin:window-state|save_window_state", { flags });
}
/**
* Restore the state for the specified window from disk.
*/
async function restoreState(label: string, flags: StateFlags): Promise<void> {
return invoke("plugin:window-state|restore_state", {
label,
flags,
});
async function restoreState(
label: WindowLabel,
flags: StateFlags,
): Promise<void> {
return invoke("plugin:window-state|restore_state", { label, flags });
}
/**
+1 -1
View File
@@ -25,7 +25,7 @@
"LICENSE"
],
"devDependencies": {
"tslib": "2.6.0"
"tslib": "2.6.2"
},
"dependencies": {
"@tauri-apps/api": "2.0.0-alpha.11"