Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A modern, efficient text cleaning tool built with Tauri and React. CleanType hel

## Installation

Download the latest installer from our [releases page](https://yourusername.github.io/cleantype/downloads).
Download the latest installer from our [releases page](https://github.com/StarKnightt/CleanType/releases).

**Note**: When running the installer, you may see a Windows SmartScreen warning. This occurs because the application is new and hasn't built up enough reputation yet. You can safely proceed by clicking "More info" and then "Run anyway".

Expand All @@ -34,7 +34,7 @@ Download the latest installer from our [releases page](https://yourusername.gith

2. Clone the repository:
```bash
git clone https://github.com/yourusername/cleantype.git
git clone https://github.com/StarKnightt/CleanType.git
cd cleantype
```

Expand Down Expand Up @@ -69,4 +69,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file

## Support

If you encounter any issues or have questions, please [open an issue](https://github.com/yourusername/cleantype/issues) on GitHub.
If you encounter any issues or have questions, please [open an issue](https://github.com/StarKnightt/CleanType/issues) on GitHub.
17 changes: 8 additions & 9 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,24 @@ fn greet(name: String) -> String {

#[tauri::command]
async fn read_file_content(path: String) -> Result<String, String> {
fs::read_to_string(path)
.map_err(|e| e.to_string())
fs::read_to_string(path).map_err(|e| e.to_string())
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.setup(|app| {
let main_window = app.get_window("main").expect("main window not found");

// Apply shadow only on Windows and macOS
#[cfg(any(windows, target_os = "macos"))]
{
set_shadow(&main_window, true).expect("Failed to set window shadow");
set_shadow(&main_window, true).expect("Failed to set window shadow");
}

main_window.show().expect("failed to show window");

let handle = app.handle();

// Handle file opening
app.listen_global("tauri://file-drop", move |event| {
if let Some(payload) = event.payload() {
Expand All @@ -36,10 +35,10 @@ pub fn run() {
}
}
});

Ok(())
})
.invoke_handler(tauri::generate_handler![greet, read_file_content])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
}
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"bundle": {
"active": true,
"targets": ["msi", "nsis"],
"targets": ["msi", "nsis", "deb", "appimage"],
"identifier": "com.cleantype.app",
"icon": [
"icons/32x32.png",
Expand Down
Loading