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
218 changes: 206 additions & 12 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,17 @@ async-compat = "0.2.5"
futures = "0.3.32"
reqwest = "0.13.2"
windows-sys = { version = "0.61.2", features = ["Win32_Foundation", "Win32_System_Diagnostics_Debug", "Win32_System_Kernel"] }
windows = { version = "0.62.2", features = ["Win32_Foundation", "Win32_System_Com", "Win32_System_Ole", "Win32_System_Variant", "Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] }
webbrowser = "1.1.0"
url = "2.5.7"
urlencoding = "2.1.3"
ignore = "0.4.25"
arboard = "3.6.1"
notify = "8.2.0"

[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.26.0"
objc = "0.2.7"

[profile.release]
strip = true # Automatically strip symbols from the binary.
Expand Down
3 changes: 3 additions & 0 deletions assets/icons/circle-x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/refresh.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pub enum AcquireError {

pub enum IpcEvent {
Show,
ToggleFilePreview,
}

pub struct SingleInstance {
Expand Down
1 change: 1 addition & 0 deletions src/model/sticker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub enum StickerType {
Timer,
Command,
Paint,
File,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down
8 changes: 8 additions & 0 deletions src/native/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ pub enum IconName {
Check,
Paint,
Eraser,
Refresh,
Folder,
CircleX,
Pin,
}

impl IconNamed for IconName {
Expand All @@ -77,6 +81,10 @@ impl IconNamed for IconName {
IconName::Check => "icons/check.svg".into(),
IconName::Paint => "icons/paint.svg".into(),
IconName::Eraser => "icons/eraser.svg".into(),
IconName::Refresh => "icons/refresh.svg".into(),
IconName::Folder => "icons/folder.svg".into(),
IconName::CircleX => "icons/circle-x.svg".into(),
IconName::Pin => "icons/pin.svg".into(),
}
}
}
16 changes: 13 additions & 3 deletions src/native/components/stickers/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,15 @@ impl CommandSticker {
this.process = None;
this.stopping = false;
this.result_html_entity = match &this.result {
CommandResult::Html(Some(x)) => {
Some(cx.new(|cx| SimpleWebView::new(x.as_str(), window, cx)))
}
CommandResult::Html(Some(x)) => Some(cx.new(|cx| {
let mut view = SimpleWebView::new(x.as_str(), window, cx);
let color = Rgba {
a: 0.85,
..this.color.bg()
};
view.set_bg(color, cx);
view
})),
_ => None,
};
this.save_config(cx);
Expand Down Expand Up @@ -878,6 +884,10 @@ impl CommandSticker {
}

impl super::Sticker for CommandSticker {
fn id(&self) -> i64 {
self.id
}

fn save_on_close(&mut self, cx: &mut Context<Self>) -> bool {
self.save_config(cx)
}
Expand Down
Loading