mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-29 12:06:01 +02:00
chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0 (#1228)
* chore(deps): replace dependency eslint-config-standard-with-typescript with eslint-config-love 43.1.0 * actually apply the rules lol * rebuild --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: FabianLars <fabianlars@fabianlars.de>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { WindowLabel, getCurrent } from "@tauri-apps/api/window";
|
||||
import { type WindowLabel, getCurrent } from "@tauri-apps/api/window";
|
||||
|
||||
export enum StateFlags {
|
||||
SIZE = 1 << 0,
|
||||
@@ -19,7 +19,7 @@ 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 });
|
||||
await invoke("plugin:window-state|save_window_state", { flags });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,20 +29,20 @@ async function restoreState(
|
||||
label: WindowLabel,
|
||||
flags: StateFlags,
|
||||
): Promise<void> {
|
||||
return invoke("plugin:window-state|restore_state", { label, flags });
|
||||
await invoke("plugin:window-state|restore_state", { label, flags });
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the state for the current window from disk.
|
||||
*/
|
||||
async function restoreStateCurrent(flags: StateFlags): Promise<void> {
|
||||
return restoreState(getCurrent().label, flags);
|
||||
await restoreState(getCurrent().label, flags);
|
||||
}
|
||||
/**
|
||||
* Get the name of the file used to store window state.
|
||||
*/
|
||||
async function filename(): Promise<string> {
|
||||
return invoke("plugin:window-state|filename");
|
||||
return await invoke("plugin:window-state|filename");
|
||||
}
|
||||
|
||||
export { restoreState, restoreStateCurrent, saveWindowState, filename };
|
||||
|
||||
Reference in New Issue
Block a user