Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
72020cb
add image upload
alanpoon Jan 23, 2026
824b6cf
added progress bar widget
alanpoon Jan 24, 2026
ba038cc
file upload modal
alanpoon Jan 25, 2026
51e388c
added file_previewer
alanpoon Jan 26, 2026
172462b
code improvement
alanpoon Jan 26, 2026
13109ff
fix clippy
alanpoon Jan 26, 2026
bdb0b34
add FilePreviewer in App
alanpoon Jan 26, 2026
0ca00fb
image upload improvement
alanpoon Jan 30, 2026
2afea24
Merge branch 'main' into image_upload
alanpoon Jan 30, 2026
f922cf2
image_upload improvement
alanpoon Jan 31, 2026
59860ab
fix clippy
alanpoon Jan 31, 2026
cc335f7
Merge branch 'main' into image_upload
alanpoon Feb 5, 2026
36b2432
send attachment improvement
alanpoon Feb 7, 2026
e41250c
fix file upload modal white space issue
alanpoon Feb 7, 2026
46efd21
Merge branch 'main' into image_upload
alanpoon Feb 7, 2026
6f198d0
Merge branch 'main' into image_upload
alanpoon Feb 23, 2026
81f4718
image_upload fix after review
alanpoon Feb 24, 2026
916353c
fix hiding issue in UploadProgressView
alanpoon Feb 24, 2026
99b2df5
cleanup extra line
alanpoon Feb 24, 2026
b4fb87b
max width fix
alanpoon Feb 24, 2026
19630ea
format fix
alanpoon Feb 24, 2026
e9ca7ee
code improvement
alanpoon Feb 25, 2026
65acc69
Merge branch 'image_upload' of https://github.com/alanpoon/robrix int…
alanpoon Feb 25, 2026
3338a8b
Avoid string allocations
alanpoon Feb 26, 2026
98d230e
remove string allocation
alanpoon Feb 26, 2026
295ea3d
PopupItem Fix
alanpoon Feb 26, 2026
e1007c6
fix format
alanpoon Feb 26, 2026
c85e246
Add retry button
alanpoon Feb 26, 2026
b702d7e
Merge branch 'main' into image_upload
alanpoon Feb 26, 2026
b3bc48f
fix clippy
alanpoon Feb 26, 2026
c874b5a
fix formatting
alanpoon Feb 26, 2026
7f7f08b
Fix clippy
alanpoon Feb 26, 2026
f3b76f4
revert formatting for room_input_bar
alanpoon Mar 23, 2026
db65190
add UploadViewState enum
alanpoon Mar 23, 2026
56ade94
minor code improvement
alanpoon Mar 23, 2026
c13111d
code optimization
alanpoon Mar 23, 2026
7a86e85
change from set_visible to set_enable
alanpoon Mar 25, 2026
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
509 changes: 500 additions & 9 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ imbl = { version = "6.1.0", features = ["serde"] } # same as matrix-sdk
futures-util = "0.3"
htmlize = "1.0.5"
imghdr = "0.7.0"
image = { version = "0.25", default-features = false, features = ["jpeg", "png"] }
linkify = "0.10.0"
matrix-sdk-base = { git = "https://github.com/matrix-org/matrix-rust-sdk", branch = "main" }
matrix-sdk = { git = "https://github.com/matrix-org/matrix-rust-sdk", branch = "main", default-features = false, features = [ "e2e-encryption", "automatic-room-key-forwarding", "markdown", "sqlite", "rustls-tls", "bundled-sqlite", "sso-login" ] }
Expand All @@ -57,6 +58,8 @@ bytesize = "2.0"
bitflags = "2.6.0"
indexmap = "2.6.0"
blurhash = { version = "0.2.3", default-features = false }
mime_guess = "2.0.5"
rfd = { version = "0.15.3", features = ["ashpd", "urlencoding", "xdg-portal"] }

## Dependencies for TSP support.
## Commit "f0bc4625dcd729e07e4a36257df2f1d94c81cef4" is the most recent one without the invalid change to pin serde to 1.0.219.
Expand Down
17 changes: 17 additions & 0 deletions resources/icons/add_attachment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions resources/icons/file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 18 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::{
shared::{callout_tooltip::{
CalloutTooltipWidgetRefExt,
TooltipAction,
}, confirmation_modal::ConfirmationModalWidgetRefExt, image_viewer::{ImageViewerAction, LoadState}}, sliding_sync::current_user_id, utils::RoomNameId, verification::VerificationAction, verification_modal::{
}, confirmation_modal::ConfirmationModalWidgetRefExt, file_previewer::FilePreviewerAction, image_viewer::{ImageViewerAction, LoadState}}, sliding_sync::current_user_id, utils::RoomNameId, verification::VerificationAction, verification_modal::{
VerificationModalAction,
VerificationModalWidgetRefExt,
}
Expand All @@ -47,6 +47,7 @@ live_design! {
use crate::home::invite_modal::InviteModal;
use crate::shared::callout_tooltip::CalloutTooltip;
use crate::shared::image_viewer::ImageViewer;
use crate::shared::file_previewer::FilePreviewer;
use link::tsp_link::TspVerificationModal;


Expand Down Expand Up @@ -109,6 +110,11 @@ live_design! {
image_viewer_modal_inner = <ImageViewer> {}
}
}
file_upload_modal = <Modal> {
content: {
file_upload_modal_inner = <FilePreviewer> {}
}
}
Comment thread
kevinaboos marked this conversation as resolved.
<PopupList> {}

// Context menus should be shown in front of other UI elements,
Expand Down Expand Up @@ -479,6 +485,17 @@ impl MatchEvent for App {
}
_ => {}
}
match action.downcast_ref() {
Some(FilePreviewerAction::Show { .. }) => {
self.ui.modal(ids!(file_upload_modal)).open(cx);
continue;
}
Some(FilePreviewerAction::Hide) | Some(FilePreviewerAction::Upload(_))=> {
self.ui.modal(ids!(file_upload_modal)).close(cx);
continue;
}
_ => {}
}
// Handle actions to open/close the TSP verification modal.
#[cfg(feature = "tsp")] {
use std::ops::Deref;
Expand Down
Loading