Skip to content

Commit 9bd266f

Browse files
committed
Fixed checks
1 parent 9628ed4 commit 9bd266f

File tree

6 files changed

+22
-14
lines changed

6 files changed

+22
-14
lines changed

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.github
2+
.changeset
3+
.vscode
4+
.build
5+
pnpm-lock.yaml
6+
build
7+
node_modules
8+
schema.json
9+
target

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"import": "./dist-js/index.js",
1414
"require": "./dist-js/index.cjs"
1515
},
16-
"repository": {
16+
"repository": {
1717
"type": "git",
1818
"url": "git+https://github.com/Choochmeque/tauri-plugin-sharekit.git"
1919
},

src/desktop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ impl<R: Runtime> Share<R> {
2121
pub fn share_file(&self, _url: String, _options: ShareFileOptions) -> crate::Result<()> {
2222
Err(crate::Error::UnsupportedPlatform)
2323
}
24-
}
24+
}

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use desktop::Share;
2020
#[cfg(mobile)]
2121
use mobile::Share;
2222

23-
2423
/// Extensions to [`tauri::App`], [`tauri::AppHandle`], [`tauri::WebviewWindow`], [`tauri::Webview`] and [`tauri::Window`] to access the share APIs.
2524
pub trait ShareExt<R: Runtime> {
2625
fn share(&self) -> &Share<R>;

src/mobile.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn init<R: Runtime, C: DeserializeOwned>(
2020
let handle = api.register_android_plugin(PLUGIN_IDENTIFIER, "SharePlugin")?;
2121
#[cfg(target_os = "ios")]
2222
let handle = api.register_ios_plugin(init_plugin_share)?;
23-
23+
2424
Ok(Share(handle))
2525
}
2626

@@ -39,4 +39,4 @@ impl<R: Runtime> Share<R> {
3939
.run_mobile_plugin("shareFile", ShareFilePayload { url, options })
4040
.map_err(Into::into)
4141
}
42-
}
42+
}

src/models.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@ use serde::Serialize;
33
#[derive(Debug, Default, Serialize)]
44
#[serde(rename_all = "camelCase")]
55
pub struct ShareTextOptions {
6-
pub mime_type: Option<String>,
6+
pub mime_type: Option<String>,
77
}
88

99
#[derive(Serialize)]
1010
pub struct ShareTextPayload {
11-
pub text: String,
12-
#[serde(flatten)]
13-
pub options: ShareTextOptions,
11+
pub text: String,
12+
#[serde(flatten)]
13+
pub options: ShareTextOptions,
1414
}
1515

1616
#[derive(Debug, Default, Serialize)]
1717
#[serde(rename_all = "camelCase")]
1818
pub struct ShareFileOptions {
19-
pub mime_type: Option<String>,
20-
pub title: Option<String>,
19+
pub mime_type: Option<String>,
20+
pub title: Option<String>,
2121
}
2222

2323
#[derive(Serialize)]
2424
pub struct ShareFilePayload {
25-
pub url: String,
26-
#[serde(flatten)]
27-
pub options: ShareFileOptions,
25+
pub url: String,
26+
#[serde(flatten)]
27+
pub options: ShareFileOptions,
2828
}

0 commit comments

Comments
 (0)