From cbceb7d6cf7c9ee8c093e81d8569285ef3ca5fe3 Mon Sep 17 00:00:00 2001 From: yutotnh <57719497+yutotnh@users.noreply.github.com> Date: Sun, 19 Jun 2022 22:23:35 +0900 Subject: [PATCH] fix: some typos (#4403) Co-authored-by: Lucas Nogueira --- .changes/fix-allowlist-error-check.md | 5 +++++ README.md | 8 ++++---- core/tauri-build/src/lib.rs | 2 +- core/tauri-runtime-wry/src/lib.rs | 2 +- core/tauri-runtime/src/lib.rs | 6 +++--- core/tauri/src/api/ipc.rs | 2 +- core/tauri/src/async_runtime.rs | 4 ++-- core/tauri/src/endpoints/window.rs | 2 +- core/tauri/src/updater/core.rs | 4 ++-- tooling/bundler/src/bundle/common.rs | 2 +- tooling/bundler/src/bundle/macos/app.rs | 2 +- tooling/bundler/src/bundle/windows/msi/wix.rs | 2 +- 12 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 .changes/fix-allowlist-error-check.md diff --git a/.changes/fix-allowlist-error-check.md b/.changes/fix-allowlist-error-check.md new file mode 100644 index 00000000000..74862de422a --- /dev/null +++ b/.changes/fix-allowlist-error-check.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Fixes the error message when using the `window.unminimize` API without enabling it in the allowlist. diff --git a/README.md b/README.md index 932808923ae..301444ace65 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ If you are interested in making a tauri app, please visit the [documentation web ### App Bundles - [x] App Icons -- [x] Build on MacOS (.app, .dmg) +- [x] Build on macOS (.app, .dmg) - [x] Build on Linux (.deb, AppImage) - [x] Build on Windows (.exe, .msi) - [x] Copy Buffer @@ -88,7 +88,7 @@ If you are interested in making a tauri app, please visit the [documentation web | Auto Updater | Yes | Yes1 | | Custom App Icon | Yes | Yes | | Windows Binary | Yes | Yes | -| MacOS Binary | Yes | Yes | +| macOS Binary | Yes | Yes | | Linux Binary | Yes | Yes | | iOS Binary | Soon | No | | Android Binary | Soon | No | @@ -108,7 +108,7 @@ Tauri is a system composed of a number of moving pieces: - GitHub actions for CI and CD - Discord for discussions - Netlify-hosted documentation website -- DigitalOcean meilisearch instance +- DigitalOcean Meilisearch instance ### Major Runtimes - Node.js for running the CLI (deno and pure rust are on the roadmap) @@ -116,7 +116,7 @@ Tauri is a system composed of a number of moving pieces: ### Major Languages - Rust for the CLI -- EcmaScript bindings to the Rust API, written in typescript +- ECMAScript bindings to the Rust API, written in typescript - Rust for bindings, rust side of the API, harnesses - Rust plugins to Tauri backend diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index e68cc466da9..1cbb4ebb139 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -118,7 +118,7 @@ impl WindowsAttributes { self } - /// Sets the sdk dir for windows. Currently only used on Windows. This must be a vaild UTF-8 + /// Sets the sdk dir for windows. Currently only used on Windows. This must be a valid UTF-8 /// path. Defaults to whatever the `winres` crate determines is best. #[must_use] pub fn sdk_dir>(mut self, sdk_dir: P) -> Self { diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 0f2126e6ea4..7d4dee78eb3 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -1297,7 +1297,7 @@ impl Dispatch for WryDispatcher { window_getter!(self, WindowMessage::Theme) } - /// Returns the `ApplicatonWindow` from gtk crate that is used by this window. + /// Returns the `ApplicationWindow` from gtk crate that is used by this window. #[cfg(any( target_os = "linux", target_os = "dragonfly", diff --git a/core/tauri-runtime/src/lib.rs b/core/tauri-runtime/src/lib.rs index 0d02eaab2cc..b7538915d06 100644 --- a/core/tauri-runtime/src/lib.rs +++ b/core/tauri-runtime/src/lib.rs @@ -357,7 +357,7 @@ pub trait Dispatch: Debug + Clone + Send + Sync + Sized + 'static /// The runtime this [`Dispatch`] runs under. type Runtime: Runtime; - /// The winoow builder type. + /// The window builder type. type WindowBuilder: WindowBuilder; /// Run a task on the main thread. @@ -414,7 +414,7 @@ pub trait Dispatch: Debug + Clone + Send + Sync + Sized + 'static /// Gets the window’s current resizable state. fn is_resizable(&self) -> Result; - /// Gets the window's current vibility state. + /// Gets the window's current visibility state. fn is_visible(&self) -> Result; /// Gets the window menu current visibility state. @@ -441,7 +441,7 @@ pub trait Dispatch: Debug + Clone + Send + Sync + Sized + 'static #[cfg(target_os = "macos")] fn ns_window(&self) -> Result<*mut std::ffi::c_void>; - /// Returns the `ApplicatonWindow` from gtk crate that is used by this window. + /// Returns the `ApplicationWindow` from gtk crate that is used by this window. #[cfg(any( target_os = "linux", target_os = "dragonfly", diff --git a/core/tauri/src/api/ipc.rs b/core/tauri/src/api/ipc.rs index d5e812b40af..16cb287fee6 100644 --- a/core/tauri/src/api/ipc.rs +++ b/core/tauri/src/api/ipc.rs @@ -279,7 +279,7 @@ mod test { assert_eq!(escape_single_quoted_json_test, result); } - // check abritrary strings in the format callback function + // check arbitrary strings in the format callback function #[quickcheck] fn qc_formating(f: CallbackFn, a: String) -> bool { // call format callback diff --git a/core/tauri/src/async_runtime.rs b/core/tauri/src/async_runtime.rs index 7608154d922..05219368233 100644 --- a/core/tauri/src/async_runtime.rs +++ b/core/tauri/src/async_runtime.rs @@ -7,7 +7,7 @@ //! Tauri uses [`tokio`] Runtime to initialize code, such as //! [`Plugin::initialize`](../plugin/trait.Plugin.html#method.initialize) and [`crate::Builder::setup`] hooks. //! This module also re-export some common items most developers need from [`tokio`]. If there's -//! one you need isn't here, you could use types in [`tokio`] dierectly. +//! one you need isn't here, you could use types in [`tokio`] directly. //! For custom command handlers, it's recommended to use a plain `async fn` command. use futures_lite::future::FutureExt; @@ -215,7 +215,7 @@ fn default_runtime() -> GlobalRuntime { } /// Sets the runtime to use to execute asynchronous tasks. -/// For convinience, this method takes a [`TokioHandle`]. +/// For convenience, this method takes a [`TokioHandle`]. /// Note that you cannot drop the underlying [`TokioRuntime`]. /// /// # Examples diff --git a/core/tauri/src/endpoints/window.rs b/core/tauri/src/endpoints/window.rs index 36677e44854..76641f2913a 100644 --- a/core/tauri/src/endpoints/window.rs +++ b/core/tauri/src/endpoints/window.rs @@ -154,7 +154,7 @@ pub fn into_allowlist_error(variant: &str) -> crate::Error { crate::Error::ApiNotAllowlisted("window > maximize and window > unmaximize".to_string()) } "minimize" => crate::Error::ApiNotAllowlisted("window > minimize".to_string()), - "nnminimize" => crate::Error::ApiNotAllowlisted("window > unminimize".to_string()), + "unminimize" => crate::Error::ApiNotAllowlisted("window > unminimize".to_string()), "show" => crate::Error::ApiNotAllowlisted("window > show".to_string()), "hide" => crate::Error::ApiNotAllowlisted("window > hide".to_string()), "close" => crate::Error::ApiNotAllowlisted("window > close".to_string()), diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index fc987a6ab82..f7fbd625a40 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -364,10 +364,10 @@ impl UpdateBuilder { // replace {{current_version}}, {{target}} and {{arch}} in the provided URL // this is usefull if we need to query example // https://releases.myapp.com/update/{{target}}/{{arch}}/{{current_version}} - // will be transleted into -> + // will be translated into -> // https://releases.myapp.com/update/darwin/aarch64/1.0.0 // The main objective is if the update URL is defined via the Cargo.toml - // the URL will be generated dynamicly + // the URL will be generated dynamically let fixed_link = url .replace("{{current_version}}", &self.current_version.to_string()) .replace("{{target}}", &target) diff --git a/tooling/bundler/src/bundle/common.rs b/tooling/bundler/src/bundle/common.rs index 38bdefeacb3..f7797a9c9d2 100644 --- a/tooling/bundler/src/bundle/common.rs +++ b/tooling/bundler/src/bundle/common.rs @@ -13,7 +13,7 @@ use std::{ sync::{Arc, Mutex}, }; -/// Returns true if the path has a filename indicating that it is a high-desity +/// Returns true if the path has a filename indicating that it is a high-density /// "retina" icon. Specifically, returns true the the file stem ends with /// "@2x" (a convention specified by the [Apple developer docs]( /// https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html)). diff --git a/tooling/bundler/src/bundle/macos/app.rs b/tooling/bundler/src/bundle/macos/app.rs index a89afca24e0..e0b701e187e 100644 --- a/tooling/bundler/src/bundle/macos/app.rs +++ b/tooling/bundler/src/bundle/macos/app.rs @@ -9,7 +9,7 @@ // Info.plist # An xml file containing the app's metadata // MacOS # A directory to hold executable binary files // foobar # The main binary executable of the app -// foobar_helper # A helper application, possibly provitidng a CLI +// foobar_helper # A helper application, possibly providing a CLI // Resources # Data files such as images, sounds, translations and nib files // en.lproj # Folder containing english translation strings/data // Frameworks # A directory containing private frameworks (shared libraries) diff --git a/tooling/bundler/src/bundle/windows/msi/wix.rs b/tooling/bundler/src/bundle/windows/msi/wix.rs index 99d5da71d46..05d3d681200 100644 --- a/tooling/bundler/src/bundle/windows/msi/wix.rs +++ b/tooling/bundler/src/bundle/windows/msi/wix.rs @@ -30,7 +30,7 @@ pub const WIX_URL: &str = "https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip"; pub const WIX_SHA256: &str = "2c1888d5d1dba377fc7fa14444cf556963747ff9a0a289a3599cf09da03b9e2e"; -// For Cross Platform Complilation. +// For Cross Platform Compilation. // const VC_REDIST_X86_URL: &str = // "https://download.visualstudio.microsoft.com/download/pr/c8edbb87-c7ec-4500-a461-71e8912d25e9/99ba493d660597490cbb8b3211d2cae4/vc_redist.x86.exe";