This commit is contained in:
Tony
2024-05-07 17:22:36 +08:00
committed by GitHub
parent 5ce0737e9a
commit 5529c5ab69
9 changed files with 32 additions and 32 deletions

View File

@@ -10,8 +10,8 @@
## Reporting a Vulnerability ## Reporting a Vulnerability
If you have found a potential security threat, vulnerability or exploit in Tauri If you have found a potential security threat, vulnerability or exploit in Tauri
or one of its upstream dependencies, please DONT create a pull-request, DONT or one of its upstream dependencies, please DON'T create a pull-request, DON'T
file an issue on GitHub, DONT mention it on Discord and DONT create a forum thread. file an issue on GitHub, DON'T mention it on Discord and DON'T create a forum thread.
Please submit your report via the GitHub Private Vulnerability Disclosure functionality. Please submit your report via the GitHub Private Vulnerability Disclosure functionality.

View File

@@ -228,7 +228,7 @@ pub enum RunEvent<T: UserEvent> {
Ready, Ready,
/// Sent if the event loop is being resumed. /// Sent if the event loop is being resumed.
Resumed, Resumed,
/// Emitted when all of the event loops input events have been processed and redraw processing is about to begin. /// Emitted when all of the event loop's input events have been processed and redraw processing is about to begin.
/// ///
/// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop. /// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop.
MainEventsCleared, MainEventsCleared,
@@ -539,10 +539,10 @@ pub trait WindowDispatch<T: UserEvent>: Debug + Clone + Send + Sync + Sized + 's
/// Gets the window's current focus state. /// Gets the window's current focus state.
fn is_focused(&self) -> Result<bool>; fn is_focused(&self) -> Result<bool>;
/// Gets the windows current decoration state. /// Gets the window's current decoration state.
fn is_decorated(&self) -> Result<bool>; fn is_decorated(&self) -> Result<bool>;
/// Gets the windows current resizable state. /// Gets the window's current resizable state.
fn is_resizable(&self) -> Result<bool>; fn is_resizable(&self) -> Result<bool>;
/// Gets the window's native maximize button state. /// Gets the window's native maximize button state.
@@ -710,10 +710,10 @@ pub trait WindowDispatch<T: UserEvent>: Debug + Clone + Send + Sync + Sized + 's
/// Resizes the window. /// Resizes the window.
fn set_size(&self, size: Size) -> Result<()>; fn set_size(&self, size: Size) -> Result<()>;
/// Updates the window min size. /// Updates the window min inner size.
fn set_min_size(&self, size: Option<Size>) -> Result<()>; fn set_min_size(&self, size: Option<Size>) -> Result<()>;
/// Updates the window max size. /// Updates the window max inner size.
fn set_max_size(&self, size: Option<Size>) -> Result<()>; fn set_max_size(&self, size: Option<Size>) -> Result<()>;
/// Updates the window position. /// Updates the window position.

View File

@@ -220,7 +220,7 @@ pub enum RunEvent {
Ready, Ready,
/// Sent if the event loop is being resumed. /// Sent if the event loop is being resumed.
Resumed, Resumed,
/// Emitted when all of the event loops input events have been processed and redraw processing is about to begin. /// Emitted when all of the event loop's input events have been processed and redraw processing is about to begin.
/// ///
/// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop. /// This event is useful as a place to put your code that should be run after all state-changing events have been handled and you want to do stuff (updating state, performing calculations, etc) that happens as the “main body” of your event loop.
MainEventsCleared, MainEventsCleared,

View File

@@ -448,13 +448,13 @@ pub enum NativeIcon {
Slideshow, Slideshow,
/// A badge for a `smart` item. /// A badge for a `smart` item.
SmartBadge, SmartBadge,
/// Small green indicator, similar to iChats available image. /// Small green indicator, similar to iChat's available image.
StatusAvailable, StatusAvailable,
/// Small clear indicator. /// Small clear indicator.
StatusNone, StatusNone,
/// Small yellow indicator, similar to iChats idle image. /// Small yellow indicator, similar to iChat's idle image.
StatusPartiallyAvailable, StatusPartiallyAvailable,
/// Small red indicator, similar to iChats unavailable image. /// Small red indicator, similar to iChat's unavailable image.
StatusUnavailable, StatusUnavailable,
/// A stop progress template image. /// A stop progress template image.
StopProgressFreestanding, StopProgressFreestanding,

View File

@@ -1099,17 +1099,17 @@ impl<R: Runtime> WebviewWindow<R> {
self.webview.window().is_focused() self.webview.window().is_focused()
} }
/// Gets the windows current decoration state. /// Gets the window's current decoration state.
pub fn is_decorated(&self) -> crate::Result<bool> { pub fn is_decorated(&self) -> crate::Result<bool> {
self.webview.window().is_decorated() self.webview.window().is_decorated()
} }
/// Gets the windows current resizable state. /// Gets the window's current resizable state.
pub fn is_resizable(&self) -> crate::Result<bool> { pub fn is_resizable(&self) -> crate::Result<bool> {
self.webview.window().is_resizable() self.webview.window().is_resizable()
} }
/// Gets the windows native maximize button state /// Gets the window's native maximize button state
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///
@@ -1118,7 +1118,7 @@ impl<R: Runtime> WebviewWindow<R> {
self.webview.window().is_maximizable() self.webview.window().is_maximizable()
} }
/// Gets the windows native minimize button state /// Gets the window's native minimize button state
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///
@@ -1127,7 +1127,7 @@ impl<R: Runtime> WebviewWindow<R> {
self.webview.window().is_minimizable() self.webview.window().is_minimizable()
} }
/// Gets the windows native close button state /// Gets the window's native close button state
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///
@@ -1431,12 +1431,12 @@ impl<R: Runtime> WebviewWindow<R> {
self.webview.window().set_size(size.into()) self.webview.window().set_size(size.into())
} }
/// Sets this window's minimum size. /// Sets this window's minimum inner size.
pub fn set_min_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> { pub fn set_min_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> {
self.webview.window().set_min_size(size.map(|s| s.into())) self.webview.window().set_min_size(size.map(|s| s.into()))
} }
/// Sets this window's maximum size. /// Sets this window's maximum inner size.
pub fn set_max_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> { pub fn set_max_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> {
self.webview.window().set_max_size(size.map(|s| s.into())) self.webview.window().set_max_size(size.map(|s| s.into()))
} }

View File

@@ -1378,17 +1378,17 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_focused().map_err(Into::into) self.window.dispatcher.is_focused().map_err(Into::into)
} }
/// Gets the windows current decoration state. /// Gets the window's current decoration state.
pub fn is_decorated(&self) -> crate::Result<bool> { pub fn is_decorated(&self) -> crate::Result<bool> {
self.window.dispatcher.is_decorated().map_err(Into::into) self.window.dispatcher.is_decorated().map_err(Into::into)
} }
/// Gets the windows current resizable state. /// Gets the window's current resizable state.
pub fn is_resizable(&self) -> crate::Result<bool> { pub fn is_resizable(&self) -> crate::Result<bool> {
self.window.dispatcher.is_resizable().map_err(Into::into) self.window.dispatcher.is_resizable().map_err(Into::into)
} }
/// Gets the windows native maximize button state /// Gets the window's native maximize button state
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///
@@ -1397,7 +1397,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_maximizable().map_err(Into::into) self.window.dispatcher.is_maximizable().map_err(Into::into)
} }
/// Gets the windows native minimize button state /// Gets the window's native minimize button state
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///
@@ -1406,7 +1406,7 @@ impl<R: Runtime> Window<R> {
self.window.dispatcher.is_minimizable().map_err(Into::into) self.window.dispatcher.is_minimizable().map_err(Into::into)
} }
/// Gets the windows native close button state /// Gets the window's native close button state
/// ///
/// ## Platform-specific /// ## Platform-specific
/// ///
@@ -1821,7 +1821,7 @@ tauri::Builder::default()
.map_err(Into::into) .map_err(Into::into)
} }
/// Sets this window's minimum size. /// Sets this window's minimum inner size.
pub fn set_min_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> { pub fn set_min_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> {
self self
.window .window
@@ -1830,7 +1830,7 @@ tauri::Builder::default()
.map_err(Into::into) .map_err(Into::into)
} }
/// Sets this window's maximum size. /// Sets this window's maximum inner size.
pub fn set_max_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> { pub fn set_max_size<S: Into<Size>>(&self, size: Option<S>) -> crate::Result<()> {
self self
.window .window

View File

@@ -103,13 +103,13 @@ export enum NativeIcon {
Slideshow = 'Slideshow', Slideshow = 'Slideshow',
/** A badge for a `smart` item. */ /** A badge for a `smart` item. */
SmartBadge = 'SmartBadge', SmartBadge = 'SmartBadge',
/** Small green indicator, similar to iChats available image. */ /** Small green indicator, similar to iChat's available image. */
StatusAvailable = 'StatusAvailable', StatusAvailable = 'StatusAvailable',
/** Small clear indicator. */ /** Small clear indicator. */
StatusNone = 'StatusNone', StatusNone = 'StatusNone',
/** Small yellow indicator, similar to iChats idle image. */ /** Small yellow indicator, similar to iChat's idle image. */
StatusPartiallyAvailable = 'StatusPartiallyAvailable', StatusPartiallyAvailable = 'StatusPartiallyAvailable',
/** Small red indicator, similar to iChats unavailable image. */ /** Small red indicator, similar to iChat's unavailable image. */
StatusUnavailable = 'StatusUnavailable', StatusUnavailable = 'StatusUnavailable',
/** A stop progress template image. */ /** A stop progress template image. */
StopProgressFreestanding = 'StopProgressFreestanding', StopProgressFreestanding = 'StopProgressFreestanding',

View File

@@ -673,7 +673,7 @@ class Window {
} }
/** /**
* Gets the windows native maximize button state. * Gets the window's native maximize button state.
* *
* #### Platform-specific * #### Platform-specific
* *
@@ -694,7 +694,7 @@ class Window {
} }
/** /**
* Gets the windows native minimize button state. * Gets the window's native minimize button state.
* *
* #### Platform-specific * #### Platform-specific
* *
@@ -715,7 +715,7 @@ class Window {
} }
/** /**
* Gets the windows native close button state. * Gets the window's native close button state.
* *
* #### Platform-specific * #### Platform-specific
* *

View File

@@ -358,7 +358,7 @@ else
| perl -pe "s/APPLICATION_CLAUSE/$APPLICATION_CLAUSE/g" \ | perl -pe "s/APPLICATION_CLAUSE/$APPLICATION_CLAUSE/g" \
| perl -pe "s/HIDING_CLAUSE/$HIDING_CLAUSE/" \ | perl -pe "s/HIDING_CLAUSE/$HIDING_CLAUSE/" \
> "$APPLESCRIPT_FILE" > "$APPLESCRIPT_FILE"
sleep 2 # pause to workaround occasional "Cant get disk" (-1728) issues sleep 2 # pause to workaround occasional "Can't get disk" (-1728) issues
echo "Running AppleScript to make Finder stuff pretty: /usr/bin/osascript \"${APPLESCRIPT_FILE}\" \"${VOLUME_NAME}\"" echo "Running AppleScript to make Finder stuff pretty: /usr/bin/osascript \"${APPLESCRIPT_FILE}\" \"${VOLUME_NAME}\""
if /usr/bin/osascript "${APPLESCRIPT_FILE}" "${VOLUME_NAME}"; then if /usr/bin/osascript "${APPLESCRIPT_FILE}" "${VOLUME_NAME}"; then
# Okay, we're cool # Okay, we're cool