mirror of
https://github.com/tauri-apps/tauri-plugin-single-instance.git
synced 2026-02-04 02:41:18 +01:00
chore: prepare to move to tauri-apps org
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"gitSiteUrl": "https://www.github.com/your-org/tauri-plugin-single-instance/",
|
||||
"gitSiteUrl": "https://www.github.com/tauri-apps/tauri-plugin-single-instance/",
|
||||
"pkgManagers": {
|
||||
"rust": {
|
||||
"version": true,
|
||||
@@ -10,7 +10,7 @@
|
||||
"dryRunCommand": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"# Cargo Publish\"",
|
||||
"command": "echo '<details>\n<summary><em><h4>Cargo Publish</h4></em></summary>\n\n```'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
},
|
||||
@@ -25,7 +25,7 @@
|
||||
"pipe": true
|
||||
},
|
||||
{
|
||||
"command": "echo \"\\`\\`\\`\"",
|
||||
"command": "echo '```\n\n</details>\n'",
|
||||
"dryRunCommand": true,
|
||||
"pipe": true
|
||||
}
|
||||
@@ -38,4 +38,4 @@
|
||||
"manager": "rust"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"tauri-plugin-single-instance": "minor"
|
||||
---
|
||||
|
||||
Initial release.
|
||||
@@ -6,9 +6,7 @@ mod platform_impl;
|
||||
#[cfg(target_os = "linux")]
|
||||
#[path = "platform_impl/linux.rs"]
|
||||
mod platform_impl;
|
||||
#[cfg(target_os = "macos")]
|
||||
#[path = "platform_impl/macos.rs"]
|
||||
mod platform_impl;
|
||||
|
||||
|
||||
pub(crate) type SingleInstanceCallback<R> =
|
||||
dyn FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static;
|
||||
@@ -16,5 +14,6 @@ pub(crate) type SingleInstanceCallback<R> =
|
||||
pub fn init<R: Runtime, F: FnMut(&AppHandle<R>, Vec<String>, String) + Send + Sync + 'static>(
|
||||
f: F,
|
||||
) -> TauriPlugin<R> {
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
platform_impl::init(Box::new(f))
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#![cfg(target_os = "macos")]
|
||||
|
||||
use crate::SingleInstanceCallback;
|
||||
use tauri::{
|
||||
plugin::{self, TauriPlugin},
|
||||
Runtime,
|
||||
};
|
||||
pub fn init<R: Runtime>(f: Box<SingleInstanceCallback<R>>) -> TauriPlugin<R> {
|
||||
plugin::Builder::new("single-instance").build()
|
||||
}
|
||||
Reference in New Issue
Block a user