forge
Explore
Log in

Don't you dare go Hollow

Builder user dropdown always shows the friends button

Browse files at this commit

a01a53fc9301dedf5e308ec025d923a297ada822Ahmet Kaan GümüşParent: e4872e2
  • style
    • builder user dropdown always shows the friends button
    • empty list says No friends
Show full message
💄 style: builder user dropdown always shows the friends button; empty list says No friends
crates/client/lang/en/builder_users.txtmodified+1 -0
@@ -42,6 +42,7 @@ group_danger = Danger
42 group_sessions = Sessions42 group_sessions = Sessions
43 group_friends = Friends43 group_friends = Friends
44 tag_builder = Builder44 tag_builder = Builder
45+no_friends = No friends
45 friends_count = {count} friends46 friends_count = {count} friends
46 group_clients = Clients47 group_clients = Clients
47 no_clients = No clients48 no_clients = No clients
crates/client/lang/tr/builder_users.txtmodified+1 -0
@@ -42,6 +42,7 @@ group_danger = Tehlike
42 group_sessions = Oturumlar42 group_sessions = Oturumlar
43 group_friends = Arkadaşlar43 group_friends = Arkadaşlar
44 tag_builder = Kurucu44 tag_builder = Kurucu
45+no_friends = Arkadaş yok
45 friends_count = {count} arkadaş46 friends_count = {count} arkadaş
46 group_clients = İstemciler47 group_clients = İstemciler
47 no_clients = İstemci yok48 no_clients = İstemci yok
crates/client/src/gui/builder/users.rsmodified+8 -3
@@ -579,9 +579,6 @@ impl Yumush {
579 579
580 fn builder_friend_list(&self, palette: Palette) -> Vec<AnyElement> {580 fn builder_friend_list(&self, palette: Palette) -> Vec<AnyElement> {
581 let friends = self.chat.builder_friends.clone();581 let friends = self.chat.builder_friends.clone();
582- if friends.is_empty() {
583- return Vec::new();
584- }
585 let search = self.chat.builder_friend_search.clone();582 let search = self.chat.builder_friend_search.clone();
586 let avatars = self.chat.avatars.clone();583 let avatars = self.chat.avatars.clone();
587 let label = w().builder_users.friends_count(friends.len());584 let label = w().builder_users.friends_count(friends.len());
@@ -618,6 +615,14 @@ impl Yumush {
618 .overflow_y_scroll()615 .overflow_y_scroll()
619 .flex()616 .flex()
620 .flex_col()617 .flex_col()
618+ .when(friends.is_empty(), |list| {
619+ list.child(
620+ div()
621+ .text_size(text(text::CAPTION))
622+ .text_color(palette.muted)
623+ .child(w().builder_users.no_friends),
624+ )
625+ })
621 .children(626 .children(
622 friends627 friends
623 .iter()628 .iter()