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:
@@ -1 +1 @@
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(t){"use strict";async function n(t,n={},e){return window.__TAURI_INTERNALS__.invoke(t,n,e)}return"function"==typeof SuppressedError&&SuppressedError,t.ask=async function(t,e){const o="string"==typeof e?{title:e}:e;return n("plugin:dialog|ask",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,okButtonLabel:o?.okLabel?.toString()??"Yes",cancelButtonLabel:o?.cancelLabel?.toString()??"No"})},t.confirm=async function(t,e){const o="string"==typeof e?{title:e}:e;return n("plugin:dialog|confirm",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,okButtonLabel:o?.okLabel?.toString()??"Ok",cancelButtonLabel:o?.cancelLabel?.toString()??"Cancel"})},t.message=async function(t,e){const o="string"==typeof e?{title:e}:e;return n("plugin:dialog|message",{message:t.toString(),title:o?.title?.toString(),kind:o?.kind,okButtonLabel:o?.okLabel?.toString()})},t.open=async function(t={}){return"object"==typeof t&&Object.freeze(t),n("plugin:dialog|open",{options:t})},t.save=async function(t={}){return"object"==typeof t&&Object.freeze(t),n("plugin:dialog|save",{options:t})},t}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})}
|
||||
if("__TAURI__"in window){var __TAURI_PLUGIN_DIALOG__=function(t){"use strict";async function n(t,n={},e){return window.__TAURI_INTERNALS__.invoke(t,n,e)}return"function"==typeof SuppressedError&&SuppressedError,t.ask=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|ask",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()??"Yes",cancelButtonLabel:i?.cancelLabel?.toString()??"No"})},t.confirm=async function(t,e){const i="string"==typeof e?{title:e}:e;return await n("plugin:dialog|confirm",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()??"Ok",cancelButtonLabel:i?.cancelLabel?.toString()??"Cancel"})},t.message=async function(t,e){const i="string"==typeof e?{title:e}:e;await n("plugin:dialog|message",{message:t.toString(),title:i?.title?.toString(),kind:i?.kind,okButtonLabel:i?.okLabel?.toString()})},t.open=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|open",{options:t})},t.save=async function(t={}){return"object"==typeof t&&Object.freeze(t),await n("plugin:dialog|save",{options:t})},t}({});Object.defineProperty(window.__TAURI__,"dialog",{value:__TAURI_PLUGIN_DIALOG__})}
|
||||
|
||||
@@ -163,13 +163,14 @@ type OpenDialogReturn<T extends OpenDialogOptions> = T["directory"] extends true
|
||||
* @since 2.0.0
|
||||
*/
|
||||
async function open<T extends OpenDialogOptions>(
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
options: T = {} as T,
|
||||
): Promise<OpenDialogReturn<T>> {
|
||||
if (typeof options === "object") {
|
||||
Object.freeze(options);
|
||||
}
|
||||
|
||||
return invoke("plugin:dialog|open", { options });
|
||||
return await invoke("plugin:dialog|open", { options });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,7 +202,7 @@ async function save(options: SaveDialogOptions = {}): Promise<string | null> {
|
||||
Object.freeze(options);
|
||||
}
|
||||
|
||||
return invoke("plugin:dialog|save", { options });
|
||||
return await invoke("plugin:dialog|save", { options });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,7 +227,7 @@ async function message(
|
||||
options?: string | MessageDialogOptions,
|
||||
): Promise<void> {
|
||||
const opts = typeof options === "string" ? { title: options } : options;
|
||||
return invoke("plugin:dialog|message", {
|
||||
await invoke("plugin:dialog|message", {
|
||||
message: message.toString(),
|
||||
title: opts?.title?.toString(),
|
||||
kind: opts?.kind,
|
||||
@@ -255,7 +256,7 @@ async function ask(
|
||||
options?: string | ConfirmDialogOptions,
|
||||
): Promise<boolean> {
|
||||
const opts = typeof options === "string" ? { title: options } : options;
|
||||
return invoke("plugin:dialog|ask", {
|
||||
return await invoke("plugin:dialog|ask", {
|
||||
message: message.toString(),
|
||||
title: opts?.title?.toString(),
|
||||
kind: opts?.kind,
|
||||
@@ -285,7 +286,7 @@ async function confirm(
|
||||
options?: string | ConfirmDialogOptions,
|
||||
): Promise<boolean> {
|
||||
const opts = typeof options === "string" ? { title: options } : options;
|
||||
return invoke("plugin:dialog|confirm", {
|
||||
return await invoke("plugin:dialog|confirm", {
|
||||
message: message.toString(),
|
||||
title: opts?.title?.toString(),
|
||||
kind: opts?.kind,
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
window.alert = function (message: string) {
|
||||
invoke("plugin:dialog|message", {
|
||||
void invoke("plugin:dialog|message", {
|
||||
message: message.toString(),
|
||||
});
|
||||
};
|
||||
|
||||
// @ts-expect-error tauri does not have sync IPC :(
|
||||
window.confirm = function (message: string) {
|
||||
return invoke("plugin:dialog|confirm", {
|
||||
window.confirm = async function (message: string) {
|
||||
return await invoke("plugin:dialog|confirm", {
|
||||
message: message.toString(),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
!function(){"use strict";async function n(n,i={},o){return window.__TAURI_INTERNALS__.invoke(n,i,o)}"function"==typeof SuppressedError&&SuppressedError,window.alert=function(i){n("plugin:dialog|message",{message:i.toString()})},window.confirm=function(i){return n("plugin:dialog|confirm",{message:i.toString()})}}();
|
||||
!function(){"use strict";async function n(n,i={},o){return window.__TAURI_INTERNALS__.invoke(n,i,o)}"function"==typeof SuppressedError&&SuppressedError,window.alert=function(i){n("plugin:dialog|message",{message:i.toString()})},window.confirm=async function(i){return await n("plugin:dialog|confirm",{message:i.toString()})}}();
|
||||
|
||||
Reference in New Issue
Block a user