aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/composition.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/shell/composition.rs')
-rw-r--r--src/client/shell/composition.rs25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/client/shell/composition.rs b/src/client/shell/composition.rs
index 6432f3e1..04ca995c 100644
--- a/src/client/shell/composition.rs
+++ b/src/client/shell/composition.rs
@@ -269,7 +269,10 @@ impl ClientShellState {
restore_mode_bar(&mut frame, mode_bar, mode_bar_cells.as_deref());
self.hits.notification_toast = Rect::default();
let has_config_diagnostic = self.config_diagnostic.is_some();
- if has_config_diagnostic || self.visible_notification.is_some() {
+ if has_config_diagnostic
+ || self.visible_endpoint_notice.is_some()
+ || self.visible_notification.is_some()
+ {
let cursor = frame.cursor.clone();
let mut composed = frame.to_ratatui_buffer()?;
if let Some(diagnostic) = self.config_diagnostic.as_deref() {
@@ -285,7 +288,25 @@ impl ClientShellState {
&self.config.palette,
);
}
- if let Some(notification) = self.visible_notification.as_ref() {
+ if let Some(notice) = self.visible_endpoint_notice.as_ref() {
+ self.hits.notification_toast = if layout.mobile_header.is_empty() {
+ notifications::render_endpoint_notice(
+ &mut composed,
+ Rect::new(0, 0, cols, rows),
+ notice,
+ u16::from(has_config_diagnostic),
+ &self.config.palette,
+ )
+ } else {
+ notifications::render_mobile_endpoint_notice_banner(
+ &mut composed,
+ Rect::new(0, 0, cols, rows),
+ notice,
+ has_config_diagnostic,
+ &self.config.palette,
+ )
+ };
+ } else if let Some(notification) = self.visible_notification.as_ref() {
self.hits.notification_toast = if layout.mobile_header.is_empty() {
notifications::render_visible_notification(
&mut composed,