wip: release candidate #34

Draft
reya wants to merge 12 commits from feat/rc into master
4 changed files with 84 additions and 79 deletions
Showing only changes of commit 2d3d90774c - Show all commits

View File

@@ -620,13 +620,19 @@ impl ChatPanel {
})
.is_err()
{
window.push_notification(
Notification::error("Failed to change subject").autohide(false),
cx,
);
window.push_notification(Notification::error("Failed to change subject"), cx);
}
}
Command::ChangeSigner(kind) => {
let is_nip4e_enabled = AppSettings::get_encryption_key(cx);
if !is_nip4e_enabled
&& (*kind == SignerKind::Encryption || *kind == SignerKind::Auto)
{
window.push_notification("Decoupling Encryption Key is not enabled", cx);
return;
}
if self
.room
.update(cx, |this, cx| {
@@ -634,10 +640,7 @@ impl ChatPanel {
})
.is_err()
{
window.push_notification(
Notification::error("Failed to change signer").autohide(false),
cx,
);
window.push_notification(Notification::error("Failed to change signer"), cx);
}
}
Command::ToggleBackup => {
@@ -648,10 +651,7 @@ impl ChatPanel {
})
.is_err()
{
window.push_notification(
Notification::error("Failed to toggle backup").autohide(false),
cx,
);
window.push_notification(Notification::error("Failed to toggle backup"), cx);
}
}
Command::Copy(public_key) => {

View File

@@ -67,8 +67,8 @@ impl Display for AuthMode {
/// Signer kind
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub enum SignerKind {
#[default]
Auto,
#[default]
User,
Encryption,
}

View File

@@ -18,7 +18,7 @@ pub(crate) fn input_style(disabled: bool, cx: &App) -> (Hsla, Hsla) {
if disabled {
(cx.theme().surface_background, cx.theme().text_muted)
} else {
(cx.theme().surface_background, cx.theme().text)
(cx.theme().elevated_surface_background, cx.theme().text)
}
}

View File

@@ -641,6 +641,7 @@ impl Workspace {
let chat = ChatRegistry::global(cx);
let initializing = chat.read(cx).initializing;
let trash_messages = chat.read(cx).count_trash_messages(cx);
let is_nip4e_enabled = AppSettings::get_encryption_key(cx);
let device = DeviceRegistry::global(cx);
let device_initializing = device.read(cx).initializing;
@@ -691,7 +692,8 @@ impl Workspace {
}),
)
})
.child(
.when(is_nip4e_enabled, |this| {
this.child(
Button::new("key")
.icon(IconName::UserKey)
.tooltip("Decoupled encryption key")
@@ -721,7 +723,8 @@ impl Workspace {
)
.child(name.clone())
}))
.item(PopupMenuItem::element(move |_window, cx| {
.item(
PopupMenuItem::element(move |_window, cx| {
h_flex()
.gap_1()
.text_sm()
@@ -731,7 +734,8 @@ impl Workspace {
.text_color(cx.theme().icon_muted),
)
.child(SharedString::from(pkey.clone()))
}))
}),
)
})
.separator()
.menu_with_icon(
@@ -757,6 +761,7 @@ impl Workspace {
)
}),
)
})
.child(
Button::new("inbox")
.icon(IconName::Inbox)