Ghost shows beside your name everywhere (ghost icon in your hue)
Browse files at this commit0b85691ac115eef0a6e2fc2c2ed2e77677ec9f8cParent: 3ba4696- feat
- ghost shows beside your name everywhere (ghost icon in your hue)
1 changed file +14 -2
crates/client/src/gui/sidebar.rsmodified+14 -2
| @@ -911,15 +911,27 @@ impl Yumush { | |||
| 911 | .gap(px(space::XS)) | 911 | .gap(px(space::XS)) |
| 912 | .child(self.account_trigger(entity, user, true, palette)) | 912 | .child(self.account_trigger(entity, user, true, palette)) |
| 913 | .children(self.is_builder().then(|| { | 913 | .children(self.is_builder().then(|| { |
| 914 | + let ghost = self.chat.ghost; | ||
| 914 | icon_button( | 915 | icon_button( |
| 915 | "builder_button".to_string(), | 916 | "builder_button".to_string(), |
| 916 | palette, | 917 | palette, |
| 917 | - IconName::Shield, | 918 | + if ghost { |
| 918 | - Role::Builder.label(), | 919 | + IconName::Ghost |
| 920 | + } else { | ||
| 921 | + IconName::Shield | ||
| 922 | + }, | ||
| 923 | + if ghost { | ||
| 924 | + "Ghost on" | ||
| 925 | + } else { | ||
| 926 | + Role::Builder.label() | ||
| 927 | + }, | ||
| 919 | entity_action(entity, |yumush, window, cx| { | 928 | entity_action(entity, |yumush, window, cx| { |
| 920 | yumush.show_view(View::Builder, window, cx) | 929 | yumush.show_view(View::Builder, window, cx) |
| 921 | }), | 930 | }), |
| 922 | ) | 931 | ) |
| 932 | + .when(ghost, |button| { | ||
| 933 | + button.text_color(palette.tokens.hue(super::style::my_hue())) | ||
| 934 | + }) | ||
| 923 | })), | 935 | })), |
| 924 | ) | 936 | ) |
| 925 | } | 937 | } |