Skip to content

Commit

Permalink
fix command name references
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Sep 20, 2024
1 parent f59fafe commit 5fda173
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 61 deletions.
2 changes: 1 addition & 1 deletion crates/tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const PLUGINS: &[(&str, &[(&str, bool)])] = &[
("set_webview_zoom", false),
("print", false),
("reparent", false),
("clear_browsing_data", false),
("clear_all_browsing_data", false),
// internal
("internal_toggle_devtools", true),
],
Expand Down
60 changes: 4 additions & 56 deletions crates/tauri/permissions/webview/autogenerated/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,77 +19,25 @@ Default permissions for the plugin.
<tr>
<td>

`core:webview:allow-clear-browsing-data `
`core:webview:allow-clear-all-browsing-data`

</td>
<td>

Enables the clear_browsing_data command without any pre-configured scope.
Enables the clear_all_browsing_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:deny-clear-browsing-data `
`core:webview:deny-clear-all-browsing-data`

</td>
<td>

Denies the clear_browsing_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:allow-clear-browsing-data`

</td>
<td>

Enables the clear_browsing_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:deny-clear-browsing-data`

</td>
<td>

Denies the clear_browsing_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:allow-clear-webview-data`

</td>
<td>

Enables the clear_webview_data command without any pre-configured scope.

</td>
</tr>

<tr>
<td>

`core:webview:deny-clear-webview-data`

</td>
<td>

Denies the clear_webview_data command without any pre-configured scope.
Denies the clear_all_browsing_data command without any pre-configured scope.

</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion crates/tauri/scripts/bundle.global.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/tauri/src/webview/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ mod desktop_commands {
setter!(set_webview_position, set_position, Position);
setter!(set_webview_focus, set_focus);
setter!(set_webview_zoom, set_zoom, f64);
setter!(clear_all_webview_browsing_data, clear_all_browsing_data);
setter!(clear_all_browsing_data, clear_all_browsing_data);

#[command(root = "crate")]
pub async fn reparent<R: Runtime>(
Expand Down Expand Up @@ -263,7 +263,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
desktop_commands::set_webview_zoom,
desktop_commands::print,
desktop_commands::reparent,
desktop_commands::clear_all_webview_browsing_data,
desktop_commands::clear_all_browsing_data,
#[cfg(any(debug_assertions, feature = "devtools"))]
desktop_commands::internal_toggle_devtools,
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ class Webview {
* @returns A promise indicating the success or failure of the operation.
*/
async clearAllBrowsingData(): Promise<void> {
return invoke('plugin:webview|clear_all_webview_browsing_data')
return invoke('plugin:webview|clear_all_browsing_data')
}

// Listeners
Expand Down

0 comments on commit 5fda173

Please sign in to comment.