mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-09-11 16:36:26 +00:00
feat(snippets): implement dynamic placeholders and modifiers
This commit implements a system for dynamic snippet placeholders, including support for date/time manipulation, clipboard history, and nested snippets. It also adds a flexible modifier system (`uppercase`, `trim`, `percent-encode`, `json-stringify`) that can be chained and applied to any placeholder.
This commit is contained in:
parent
e2316cf949
commit
2437ad7d61
8 changed files with 509 additions and 111 deletions
|
@ -6,13 +6,13 @@ pub mod clipboard_history;
|
|||
mod desktop;
|
||||
mod error;
|
||||
mod extensions;
|
||||
mod file_search;
|
||||
mod filesystem;
|
||||
mod frecency;
|
||||
mod oauth;
|
||||
mod quicklinks;
|
||||
mod snippets;
|
||||
mod system;
|
||||
mod file_search;
|
||||
|
||||
use crate::snippets::input_manager::{EvdevInputManager, InputManager};
|
||||
use crate::{app::App, cache::AppCache};
|
||||
|
@ -276,26 +276,27 @@ pub fn run() {
|
|||
|
||||
Ok(())
|
||||
})
|
||||
.build(tauri::generate_context!()).unwrap();
|
||||
.build(tauri::generate_context!())
|
||||
.unwrap();
|
||||
|
||||
app.run(|app, event| {
|
||||
if let tauri::RunEvent::WindowEvent { label, event, .. } = event {
|
||||
if label == "main" {
|
||||
match event {
|
||||
tauri::WindowEvent::CloseRequested { api, .. } => {
|
||||
api.prevent_close();
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.hide();
|
||||
}
|
||||
app.run(|app, event| {
|
||||
if let tauri::RunEvent::WindowEvent { label, event, .. } = event {
|
||||
if label == "main" {
|
||||
match event {
|
||||
tauri::WindowEvent::CloseRequested { api, .. } => {
|
||||
api.prevent_close();
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.hide();
|
||||
}
|
||||
tauri::WindowEvent::Focused(false) => {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.hide();
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
tauri::WindowEvent::Focused(false) => {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.hide();
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue