feat: add support for encrypted attachment (#45)

Reviewed-on: #45
This commit was merged in pull request #45.
This commit is contained in:
2026-09-16 01:25:14 +00:00
parent 584ab34df6
commit 9e33da717b
16 changed files with 1506 additions and 123 deletions
+6 -4
View File
@@ -1,6 +1,6 @@
use std::str::FromStr;
use anyhow::{Context as AnyhowContext, Error};
use anyhow::Error;
use gpui::{
AnyElement, App, AppContext, ClipboardItem, Context, Entity, EventEmitter, FocusHandle,
Focusable, IntoElement, ParentElement, PathPromptOptions, Render, SharedString, Styled, Task,
@@ -167,13 +167,15 @@ impl ProfilePanel {
});
self.tasks.push(cx.spawn_in(window, async move |this, cx| {
// Selecting no file means the prompt was cancelled
let Some(path) = path.await??.and_then(|mut paths| paths.pop()) else {
return Ok(());
};
this.update(cx, |this, cx| {
this.set_uploading(true, cx);
})?;
let mut paths = path.await??.context("Not found")?;
let path = paths.pop().context("No path")?;
// Upload via blossom client
match upload(server, path, cx).await {
Ok(url) => {