diff --git a/assets/themes/cave-dark.json b/assets/themes/cave-dark.json index 1eac826b5436f5888e0f1a658d795bbc86f6e6c6..68ea7ee996617bf316a7f7feeddf7f32a993fb6f 100644 --- a/assets/themes/cave-dark.json +++ b/assets/themes/cave-dark.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#e2dfe7", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#26232a", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#8b8792", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#576ddb", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#5852605c", + "text": { + "family": "Zed Sans", + "color": "#e2dfe7", + "size": 14 + } + }, + "hover": { + "background": "#5852603d" + } + }, + "border": { + "color": "#19171c", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#7e7887", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#19171c", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#7e7887", + "size": 14 + }, + "selection": { + "cursor": "#576ddb", + "selection": "#576ddb3d" + }, + "text": { + "family": "Zed Mono", + "color": "#e2dfe7", + "size": 14 + }, + "border": { + "color": "#26232a", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#0000003d", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#19171c", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#e2dfe7", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#7e7887", + "size": 14 + }, + "selection": { + "cursor": "#576ddb", + "selection": "#576ddb3d" + }, + "border": { + "color": "#26232a", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#e2dfe7", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#e2dfe7", + "size": 14, + "background": "#26232a", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#955ae77a", "tab_icon_spacing": 8, diff --git a/assets/themes/cave-light.json b/assets/themes/cave-light.json index 4fd9e0865d034ee68d248ace4f88faa1fac9260e..a7954938dcc3e4806d4305440a783b033b806ade 100644 --- a/assets/themes/cave-light.json +++ b/assets/themes/cave-light.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#26232a", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#e2dfe7", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#585260", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#576ddb", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#8b87922e", + "text": { + "family": "Zed Sans", + "color": "#26232a", + "size": 14 + } + }, + "hover": { + "background": "#8b87921f" + } + }, + "border": { + "color": "#efecf4", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#655f6d", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#efecf4", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#655f6d", + "size": 14 + }, + "selection": { + "cursor": "#576ddb", + "selection": "#576ddb3d" + }, + "text": { + "family": "Zed Mono", + "color": "#26232a", + "size": 14 + }, + "border": { + "color": "#e2dfe7", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#0000001f", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#efecf4", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#26232a", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#655f6d", + "size": 14 + }, + "selection": { + "cursor": "#576ddb", + "selection": "#576ddb3d" + }, + "border": { + "color": "#e2dfe7", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#26232a", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#26232a", + "size": 14, + "background": "#e2dfe7", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#955ae73d", "tab_icon_spacing": 8, diff --git a/assets/themes/dark.json b/assets/themes/dark.json index 50e2958b40c669b43f1d2c76e0f9d0695c8c20a6..d1070d6cadbcd2cb740b265d5684226e33ba73eb 100644 --- a/assets/themes/dark.json +++ b/assets/themes/dark.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#f1f1f1", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#1c1c1c", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#9c9c9c", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#4f8ff7", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#2b2b2b", + "text": { + "family": "Zed Sans", + "color": "#f1f1f1", + "size": 14 + } + }, + "hover": { + "background": "#232323" + } + }, + "border": { + "color": "#070707", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#474747", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#000000", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#474747", + "size": 14 + }, + "selection": { + "cursor": "#2472f2", + "selection": "#2472f23d" + }, + "text": { + "family": "Zed Mono", + "color": "#f1f1f1", + "size": 14 + }, + "border": { + "color": "#232323", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#00000052", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#000000", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#f1f1f1", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#474747", + "size": 14 + }, + "selection": { + "cursor": "#2472f2", + "selection": "#2472f23d" + }, + "border": { + "color": "#232323", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#f1f1f1", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#f1f1f1", + "size": 14, + "background": "#2b2b2b", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#3f15a380", "tab_icon_spacing": 8, diff --git a/assets/themes/light.json b/assets/themes/light.json index a929dab7aae978240db2022c84b45c328d828e36..d79bc79f386389746b8bb3674ec12dd969c5b4b3 100644 --- a/assets/themes/light.json +++ b/assets/themes/light.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#2b2b2b", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#f8f8f8", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#474747", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#484bed", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#e3e3e3", + "text": { + "family": "Zed Sans", + "color": "#2b2b2b", + "size": 14 + } + }, + "hover": { + "background": "#eaeaea" + } + }, + "border": { + "color": "#d5d5d5", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#808080", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#ffffff", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#808080", + "size": 14 + }, + "selection": { + "cursor": "#2472f2", + "selection": "#2472f23d" + }, + "text": { + "family": "Zed Mono", + "color": "#2b2b2b", + "size": 14 + }, + "border": { + "color": "#d5d5d5", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#0000001f", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#ffffff", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#2b2b2b", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#808080", + "size": 14 + }, + "selection": { + "cursor": "#2472f2", + "selection": "#2472f23d" + }, + "border": { + "color": "#d5d5d5", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#2b2b2b", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#2b2b2b", + "size": 14, + "background": "#eaeaea", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#fce9b7", "tab_icon_spacing": 8, diff --git a/assets/themes/solarized-dark.json b/assets/themes/solarized-dark.json index 3cfa8e701252d58970f362223007be96eb21d55d..01b217e8e5fc6c381f69f745d394e0f3a2ee8101 100644 --- a/assets/themes/solarized-dark.json +++ b/assets/themes/solarized-dark.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#eee8d5", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#073642", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#93a1a1", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#268bd2", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#586e755c", + "text": { + "family": "Zed Sans", + "color": "#eee8d5", + "size": 14 + } + }, + "hover": { + "background": "#586e753d" + } + }, + "border": { + "color": "#002b36", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#839496", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#002b36", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#839496", + "size": 14 + }, + "selection": { + "cursor": "#268bd2", + "selection": "#268bd23d" + }, + "text": { + "family": "Zed Mono", + "color": "#eee8d5", + "size": 14 + }, + "border": { + "color": "#073642", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#0000003d", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#002b36", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#eee8d5", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#839496", + "size": 14 + }, + "selection": { + "cursor": "#268bd2", + "selection": "#268bd23d" + }, + "border": { + "color": "#073642", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#eee8d5", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#eee8d5", + "size": 14, + "background": "#073642", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#6c71c47a", "tab_icon_spacing": 8, diff --git a/assets/themes/solarized-light.json b/assets/themes/solarized-light.json index 4aaa7567e89a28f361964d88af58f00cb8101b91..6d21fda5dbdd6778145cda0b92d3b5f3ec1aa7d1 100644 --- a/assets/themes/solarized-light.json +++ b/assets/themes/solarized-light.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#073642", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#eee8d5", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#586e75", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#268bd2", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#93a1a12e", + "text": { + "family": "Zed Sans", + "color": "#073642", + "size": 14 + } + }, + "hover": { + "background": "#93a1a11f" + } + }, + "border": { + "color": "#fdf6e3", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#657b83", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#fdf6e3", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#657b83", + "size": 14 + }, + "selection": { + "cursor": "#268bd2", + "selection": "#268bd23d" + }, + "text": { + "family": "Zed Mono", + "color": "#073642", + "size": 14 + }, + "border": { + "color": "#eee8d5", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#0000001f", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#fdf6e3", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#073642", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#657b83", + "size": 14 + }, + "selection": { + "cursor": "#268bd2", + "selection": "#268bd23d" + }, + "border": { + "color": "#eee8d5", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#073642", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#073642", + "size": 14, + "background": "#eee8d5", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#6c71c43d", "tab_icon_spacing": 8, diff --git a/assets/themes/sulphurpool-dark.json b/assets/themes/sulphurpool-dark.json index 8151dea442d41ad5876eabd3be8cd1893323d595..9711ff8f9f5c69ff272fc7351f3757bda7fbc597 100644 --- a/assets/themes/sulphurpool-dark.json +++ b/assets/themes/sulphurpool-dark.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#dfe2f1", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#293256", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#979db4", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#3d8fd1", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#5e66875c", + "text": { + "family": "Zed Sans", + "color": "#dfe2f1", + "size": 14 + } + }, + "hover": { + "background": "#5e66873d" + } + }, + "border": { + "color": "#202746", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#898ea4", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#202746", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#898ea4", + "size": 14 + }, + "selection": { + "cursor": "#3d8fd1", + "selection": "#3d8fd13d" + }, + "text": { + "family": "Zed Mono", + "color": "#dfe2f1", + "size": 14 + }, + "border": { + "color": "#293256", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#0000003d", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#202746", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#dfe2f1", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#898ea4", + "size": 14 + }, + "selection": { + "cursor": "#3d8fd1", + "selection": "#3d8fd13d" + }, + "border": { + "color": "#293256", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#dfe2f1", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#dfe2f1", + "size": 14, + "background": "#293256", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#6679cc7a", "tab_icon_spacing": 8, diff --git a/assets/themes/sulphurpool-light.json b/assets/themes/sulphurpool-light.json index b42f8b4b2e456183c125e01e7587e9bbbae809cb..17ec4fe62a5fac523a7169435d46c3696be3e745 100644 --- a/assets/themes/sulphurpool-light.json +++ b/assets/themes/sulphurpool-light.json @@ -1261,7 +1261,7 @@ "left": 8 } }, - "edit_contact": { + "contact_button": { "family": "Zed Mono", "color": "#293256", "size": 14, @@ -1378,6 +1378,149 @@ "corner_radius": 6 } }, + "contact_finder": { + "background": "#dfe2f1", + "corner_radius": 8, + "padding": 8, + "item": { + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 4 + }, + "corner_radius": 8, + "text": { + "family": "Zed Sans", + "color": "#5e6687", + "size": 14 + }, + "highlight_text": { + "family": "Zed Sans", + "color": "#3d8fd1", + "weight": "bold", + "size": 14 + }, + "active": { + "background": "#979db42e", + "text": { + "family": "Zed Sans", + "color": "#293256", + "size": 14 + } + }, + "hover": { + "background": "#979db41f" + } + }, + "border": { + "color": "#f5f7ff", + "width": 1 + }, + "empty": { + "text": { + "family": "Zed Sans", + "color": "#6b7394", + "size": 14 + }, + "padding": { + "bottom": 4, + "left": 12, + "right": 12, + "top": 8 + } + }, + "input_editor": { + "background": "#f5f7ff", + "corner_radius": 8, + "placeholder_text": { + "family": "Zed Sans", + "color": "#6b7394", + "size": 14 + }, + "selection": { + "cursor": "#3d8fd1", + "selection": "#3d8fd13d" + }, + "text": { + "family": "Zed Mono", + "color": "#293256", + "size": 14 + }, + "border": { + "color": "#dfe2f1", + "width": 1 + }, + "padding": { + "bottom": 7, + "left": 16, + "right": 16, + "top": 7 + } + }, + "shadow": { + "blur": 16, + "color": "#0000001f", + "offset": [ + 0, + 2 + ] + }, + "max_width": 540, + "max_height": 420, + "query_editor": { + "background": "#f5f7ff", + "corner_radius": 6, + "text": { + "family": "Zed Mono", + "color": "#293256", + "size": 14 + }, + "placeholder_text": { + "family": "Zed Mono", + "color": "#6b7394", + "size": 14 + }, + "selection": { + "cursor": "#3d8fd1", + "selection": "#3d8fd13d" + }, + "border": { + "color": "#dfe2f1", + "width": 1 + }, + "padding": { + "bottom": 4, + "left": 8, + "right": 8, + "top": 4 + } + }, + "row_height": 28, + "contact_avatar": { + "corner_radius": 10, + "width": 18 + }, + "contact_username": { + "family": "Zed Mono", + "color": "#293256", + "size": 14, + "padding": { + "left": 8 + } + }, + "contact_button": { + "family": "Zed Mono", + "color": "#293256", + "size": 14, + "background": "#dfe2f1", + "corner_radius": 12, + "padding": { + "left": 7, + "right": 7 + } + } + }, "search": { "match_background": "#6679cc3d", "tab_icon_spacing": 8, diff --git a/crates/contacts_panel/src/contact_finder.rs b/crates/contacts_panel/src/contact_finder.rs new file mode 100644 index 0000000000000000000000000000000000000000..ed5281380c9f9ab77b5d2e8c3d57a28bc9646a79 --- /dev/null +++ b/crates/contacts_panel/src/contact_finder.rs @@ -0,0 +1,175 @@ +use client::{ContactRequestStatus, User, UserStore}; +use editor::Editor; +use gpui::{ + color::Color, elements::*, platform::CursorStyle, Entity, LayoutContext, ModelHandle, + RenderContext, Task, View, ViewContext, ViewHandle, +}; +use settings::Settings; +use std::sync::Arc; +use util::TryFutureExt; + +use crate::{RemoveContact, RequestContact}; + +pub struct ContactFinder { + query_editor: ViewHandle, + list_state: UniformListState, + potential_contacts: Arc<[Arc]>, + user_store: ModelHandle, + contacts_search_task: Option>>, +} + +impl Entity for ContactFinder { + type Event = (); +} + +impl View for ContactFinder { + fn ui_name() -> &'static str { + "ContactFinder" + } + + fn render(&mut self, cx: &mut RenderContext) -> ElementBox { + let theme = cx.global::().theme.clone(); + let user_store = self.user_store.clone(); + let potential_contacts = self.potential_contacts.clone(); + Flex::column() + .with_child( + ChildView::new(self.query_editor.clone()) + .contained() + .with_style(theme.contact_finder.query_editor.container) + .boxed(), + ) + .with_child( + UniformList::new(self.list_state.clone(), self.potential_contacts.len(), { + let theme = theme.clone(); + move |range, items, cx| { + items.extend(range.map(|ix| { + Self::render_potential_contact( + &potential_contacts[ix], + &user_store, + &theme.contact_finder, + cx, + ) + })) + } + }) + .flex(1., false) + .boxed(), + ) + .contained() + .with_style(theme.contact_finder.container) + .constrained() + .with_max_width(theme.contact_finder.max_width) + .with_max_height(theme.contact_finder.max_height) + .boxed() + } +} + +impl ContactFinder { + pub fn new(user_store: ModelHandle, cx: &mut ViewContext) -> Self { + let query_editor = cx.add_view(|cx| { + Editor::single_line(Some(|theme| theme.contact_finder.query_editor.clone()), cx) + }); + + cx.subscribe(&query_editor, |this, _, event, cx| { + if let editor::Event::BufferEdited = event { + this.query_changed(cx) + } + }) + .detach(); + Self { + query_editor, + list_state: Default::default(), + potential_contacts: Arc::from([]), + user_store, + contacts_search_task: None, + } + } + + fn render_potential_contact( + contact: &User, + user_store: &ModelHandle, + theme: &theme::ContactFinder, + cx: &mut LayoutContext, + ) -> ElementBox { + enum RequestContactButton {} + + let contact_id = contact.id; + let request_status = user_store.read(cx).contact_request_status(&contact); + + Flex::row() + .with_children(contact.avatar.clone().map(|avatar| { + Image::new(avatar) + .with_style(theme.contact_avatar) + .aligned() + .left() + .boxed() + })) + .with_child( + Label::new( + contact.github_login.clone(), + theme.contact_username.text.clone(), + ) + .contained() + .with_style(theme.contact_username.container) + .aligned() + .left() + .boxed(), + ) + .with_child( + MouseEventHandler::new::( + contact.id as usize, + cx, + |_, _| { + let label = match request_status { + ContactRequestStatus::None | ContactRequestStatus::RequestReceived => { + "+" + } + ContactRequestStatus::RequestSent => "-", + ContactRequestStatus::Pending + | ContactRequestStatus::RequestAccepted => "…", + }; + + Label::new(label.to_string(), theme.contact_button.text.clone()) + .contained() + .with_style(theme.contact_button.container) + .aligned() + .flex_float() + .boxed() + }, + ) + .on_click(move |_, cx| match request_status { + ContactRequestStatus::None => { + cx.dispatch_action(RequestContact(contact_id)); + } + ContactRequestStatus::RequestSent => { + cx.dispatch_action(RemoveContact(contact_id)); + } + _ => {} + }) + .with_cursor_style(CursorStyle::PointingHand) + .boxed(), + ) + .constrained() + .with_height(theme.row_height) + .boxed() + } + + fn query_changed(&mut self, cx: &mut ViewContext) { + let query = self.query_editor.read(cx).text(cx); + let search_users = self + .user_store + .update(cx, |store, cx| store.fuzzy_search_users(query, cx)); + + self.contacts_search_task = Some(cx.spawn(|this, mut cx| { + async move { + let potential_contacts = search_users.await?; + this.update(&mut cx, |this, cx| { + this.potential_contacts = potential_contacts.into(); + cx.notify(); + }); + Ok(()) + } + .log_err() + })); + } +} diff --git a/crates/contacts_panel/src/contacts_panel.rs b/crates/contacts_panel/src/contacts_panel.rs index b75444785b0f23b6c13683455ce921c481eb1170..6ff2ea7aff8827e2e1dd0404131edcc5ee460989 100644 --- a/crates/contacts_panel/src/contacts_panel.rs +++ b/crates/contacts_panel/src/contacts_panel.rs @@ -1,20 +1,24 @@ +mod contact_finder; + use client::{Contact, ContactRequestStatus, User, UserStore}; +use contact_finder::ContactFinder; use editor::Editor; use fuzzy::{match_strings, StringMatchCandidate}; use gpui::{ + actions, elements::*, geometry::{rect::RectF, vector::vec2f}, impl_actions, platform::CursorStyle, Element, ElementBox, Entity, LayoutContext, ModelHandle, MutableAppContext, RenderContext, - Subscription, Task, View, ViewContext, ViewHandle, + Subscription, View, ViewContext, ViewHandle, }; use serde::Deserialize; use settings::Settings; use std::sync::Arc; -use util::TryFutureExt; -use workspace::{AppState, JoinProject}; +use workspace::{AppState, JoinProject, Workspace}; +actions!(contacts_panel, [FindNewContacts]); impl_actions!( contacts_panel, [RequestContact, RemoveContact, RespondToContactRequest] @@ -26,16 +30,13 @@ enum ContactEntry { IncomingRequest(Arc), OutgoingRequest(Arc), Contact(Arc), - PotentialContact(Arc), } pub struct ContactsPanel { entries: Vec, match_candidates: Vec, - potential_contacts: Vec>, list_state: ListState, user_store: ModelHandle, - contacts_search_task: Option>>, user_query_editor: ViewHandle, _maintain_contacts: Subscription, } @@ -56,6 +57,7 @@ pub fn init(cx: &mut MutableAppContext) { cx.add_action(ContactsPanel::request_contact); cx.add_action(ContactsPanel::remove_contact); cx.add_action(ContactsPanel::respond_to_contact_request); + cx.add_action(ContactsPanel::find_new_contacts); } impl ContactsPanel { @@ -69,7 +71,7 @@ impl ContactsPanel { cx.subscribe(&user_query_editor, |this, _, event, cx| { if let editor::Event::BufferEdited = event { - this.query_changed(cx) + this.update_entries(cx) } }) .detach(); @@ -120,22 +122,14 @@ impl ContactsPanel { theme, cx, ), - ContactEntry::PotentialContact(user) => Self::render_potential_contact( - user.clone(), - this.user_store.clone(), - theme, - cx, - ), } } }), entries: Default::default(), - potential_contacts: Default::default(), match_candidates: Default::default(), user_query_editor, _maintain_contacts: cx .observe(&app_state.user_store, |this, _, cx| this.update_entries(cx)), - contacts_search_task: None, user_store: app_state.user_store.clone(), }; this.update_entries(cx); @@ -347,9 +341,9 @@ impl ContactsPanel { if request_status == ContactRequestStatus::Pending { row.add_child( - Label::new("…".to_string(), theme.edit_contact.text.clone()) + Label::new("…".to_string(), theme.contact_button.text.clone()) .contained() - .with_style(theme.edit_contact.container) + .with_style(theme.contact_button.container) .aligned() .flex_float() .boxed(), @@ -357,9 +351,9 @@ impl ContactsPanel { } else { row.add_children([ MouseEventHandler::new::(user.id as usize, cx, |_, _| { - Label::new("Reject".to_string(), theme.edit_contact.text.clone()) + Label::new("Reject".to_string(), theme.contact_button.text.clone()) .contained() - .with_style(theme.edit_contact.container) + .with_style(theme.contact_button.container) .aligned() .flex_float() .boxed() @@ -374,9 +368,9 @@ impl ContactsPanel { .flex_float() .boxed(), MouseEventHandler::new::(user.id as usize, cx, |_, _| { - Label::new("Accept".to_string(), theme.edit_contact.text.clone()) + Label::new("Accept".to_string(), theme.contact_button.text.clone()) .contained() - .with_style(theme.edit_contact.container) + .with_style(theme.contact_button.container) .aligned() .boxed() }) @@ -427,9 +421,9 @@ impl ContactsPanel { if request_status == ContactRequestStatus::Pending { row.add_child( - Label::new("…".to_string(), theme.edit_contact.text.clone()) + Label::new("…".to_string(), theme.contact_button.text.clone()) .contained() - .with_style(theme.edit_contact.container) + .with_style(theme.contact_button.container) .aligned() .flex_float() .boxed(), @@ -437,9 +431,9 @@ impl ContactsPanel { } else { row.add_child( MouseEventHandler::new::(user.id as usize, cx, |_, _| { - Label::new("Cancel".to_string(), theme.edit_contact.text.clone()) + Label::new("Cancel".to_string(), theme.contact_button.text.clone()) .contained() - .with_style(theme.edit_contact.container) + .with_style(theme.contact_button.container) .aligned() .flex_float() .boxed() @@ -454,95 +448,6 @@ impl ContactsPanel { row.constrained().with_height(theme.row_height).boxed() } - fn render_potential_contact( - contact: Arc, - user_store: ModelHandle, - theme: &theme::ContactsPanel, - cx: &mut LayoutContext, - ) -> ElementBox { - enum RequestContactButton {} - - let request_status = user_store.read(cx).contact_request_status(&contact); - - Flex::row() - .with_children(contact.avatar.clone().map(|avatar| { - Image::new(avatar) - .with_style(theme.contact_avatar) - .aligned() - .left() - .boxed() - })) - .with_child( - Label::new( - contact.github_login.clone(), - theme.contact_username.text.clone(), - ) - .contained() - .with_style(theme.contact_username.container) - .aligned() - .left() - .boxed(), - ) - .with_child( - MouseEventHandler::new::( - contact.id as usize, - cx, - |_, _| { - let label = match request_status { - ContactRequestStatus::None | ContactRequestStatus::RequestReceived => { - "+" - } - ContactRequestStatus::RequestSent => "-", - ContactRequestStatus::Pending - | ContactRequestStatus::RequestAccepted => "…", - }; - - Label::new(label.to_string(), theme.edit_contact.text.clone()) - .contained() - .with_style(theme.edit_contact.container) - .aligned() - .flex_float() - .boxed() - }, - ) - .on_click(move |_, cx| match request_status { - ContactRequestStatus::None => { - cx.dispatch_action(RequestContact(contact.id)); - } - ContactRequestStatus::RequestSent => { - cx.dispatch_action(RemoveContact(contact.id)); - } - _ => {} - }) - .with_cursor_style(CursorStyle::PointingHand) - .boxed(), - ) - .constrained() - .with_height(theme.row_height) - .boxed() - } - - fn query_changed(&mut self, cx: &mut ViewContext) { - self.update_entries(cx); - - let query = self.user_query_editor.read(cx).text(cx); - let search_users = self - .user_store - .update(cx, |store, cx| store.fuzzy_search_users(query, cx)); - - self.contacts_search_task = Some(cx.spawn(|this, mut cx| { - async move { - let potential_contacts = search_users.await?; - this.update(&mut cx, |this, cx| { - this.potential_contacts = potential_contacts; - this.update_entries(cx); - }); - Ok(()) - } - .log_err() - })); - } - fn update_entries(&mut self, cx: &mut ViewContext) { let user_store = self.user_store.read(cx); let query = self.user_query_editor.read(cx).text(cx); @@ -656,15 +561,6 @@ impl ContactsPanel { } } - if !self.potential_contacts.is_empty() { - self.entries.push(ContactEntry::Header("Add Contacts")); - self.entries.extend( - self.potential_contacts - .iter() - .map(|user| ContactEntry::PotentialContact(user.clone())), - ); - } - self.list_state.reset(self.entries.len()); cx.notify(); } @@ -692,6 +588,16 @@ impl ContactsPanel { }) .detach(); } + + fn find_new_contacts( + workspace: &mut Workspace, + _: &FindNewContacts, + cx: &mut ViewContext, + ) { + workspace.toggle_modal(cx, |cx, workspace| { + cx.add_view(|cx| ContactFinder::new(workspace.user_store().clone(), cx)) + }); + } } pub enum Event {} @@ -706,7 +612,10 @@ impl View for ContactsPanel { } fn render(&mut self, cx: &mut RenderContext) -> ElementBox { - let theme = &cx.global::().theme.contacts_panel; + enum AddContact {} + + let theme = cx.global::().theme.clone(); + let theme = &theme.contacts_panel; Container::new( Flex::column() .with_child( @@ -719,14 +628,18 @@ impl View for ContactsPanel { .boxed(), ) .with_child( - Svg::new("icons/add-contact.svg") - .with_color(theme.add_contact_icon.color) - .constrained() - .with_height(12.) - .contained() - .with_style(theme.add_contact_icon.container) - .aligned() - .boxed(), + MouseEventHandler::new::(0, cx, |_, _| { + Svg::new("icons/add-contact.svg") + .with_color(theme.add_contact_icon.color) + .constrained() + .with_height(12.) + .contained() + .with_style(theme.add_contact_icon.container) + .aligned() + .boxed() + }) + .on_click(|_, cx| cx.dispatch_action(FindNewContacts)) + .boxed(), ) .constrained() .with_height(32.) diff --git a/crates/theme/src/theme.rs b/crates/theme/src/theme.rs index f0fdcfc29fe4c63c16d1a781052df7a7842aabae..5a47bc504df76476ab06fc1a7554080db83ca052 100644 --- a/crates/theme/src/theme.rs +++ b/crates/theme/src/theme.rs @@ -21,6 +21,7 @@ pub struct Theme { pub workspace: Workspace, pub chat_panel: ChatPanel, pub contacts_panel: ContactsPanel, + pub contact_finder: ContactFinder, pub project_panel: ProjectPanel, pub command_palette: CommandPalette, pub picker: Picker, @@ -240,7 +241,7 @@ pub struct ContactsPanel { pub row_height: f32, pub contact_avatar: ImageStyle, pub contact_username: ContainedText, - pub edit_contact: ContainedText, + pub contact_button: ContainedText, pub tree_branch_width: f32, pub tree_branch_color: Color, pub shared_project: ProjectRow, @@ -249,6 +250,19 @@ pub struct ContactsPanel { pub hovered_unshared_project: ProjectRow, } +#[derive(Deserialize, Default)] +pub struct ContactFinder { + #[serde(flatten)] + pub container: ContainerStyle, + pub max_width: f32, + pub max_height: f32, + pub query_editor: FieldEditor, + pub row_height: f32, + pub contact_avatar: ImageStyle, + pub contact_username: ContainedText, + pub contact_button: ContainedText, +} + #[derive(Deserialize, Default)] pub struct AddContactIcon { #[serde(flatten)] diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index b23710834dfd38f00edcaa3ae7cf454613b79d6b..d5b0bf2ed54f8c999fa669e72a44dc8d1c7595eb 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -824,6 +824,10 @@ impl Workspace { &self.status_bar } + pub fn user_store(&self) -> &ModelHandle { + &self.user_store + } + pub fn project(&self) -> &ModelHandle { &self.project } @@ -931,7 +935,7 @@ impl Workspace { }) } - // Returns the model that was toggled closed if it was open + /// Returns the modal that was toggled closed if it was open. pub fn toggle_modal( &mut self, cx: &mut ViewContext, diff --git a/styles/src/styleTree/app.ts b/styles/src/styleTree/app.ts index 1f1dc74c308baa21f566044c9a30c0a38afed68a..0da6ada222d77ba1ec2cdbe7b1446ef76535cf05 100644 --- a/styles/src/styleTree/app.ts +++ b/styles/src/styleTree/app.ts @@ -1,6 +1,7 @@ import Theme from "../themes/theme"; import chatPanel from "./chatPanel"; import { text } from "./components"; +import contactFinder from "./contactFinder"; import contactsPanel from "./contactsPanel"; import commandPalette from "./commandPalette"; import editor from "./editor"; @@ -24,6 +25,7 @@ export default function app(theme: Theme): Object { projectPanel: projectPanel(theme), chatPanel: chatPanel(theme), contactsPanel: contactsPanel(theme), + contactFinder: contactFinder(theme), search: search(theme), breadcrumbs: { ...text(theme, "sans", "secondary"), diff --git a/styles/src/styleTree/contactFinder.ts b/styles/src/styleTree/contactFinder.ts new file mode 100644 index 0000000000000000000000000000000000000000..1f0fb65776cc634092ffbf39e4207241d0689a67 --- /dev/null +++ b/styles/src/styleTree/contactFinder.ts @@ -0,0 +1,42 @@ +import Theme from "../themes/theme"; +import picker from "./picker"; +import { backgroundColor, border, player, text } from "./components"; + +export default function contactFinder(theme: Theme) { + return { + ...picker(theme), + maxWidth: 540., + maxHeight: 420., + queryEditor: { + background: backgroundColor(theme, 500), + cornerRadius: 6, + text: text(theme, "mono", "primary"), + placeholderText: text(theme, "mono", "placeholder", { size: "sm" }), + selection: player(theme, 1).selection, + border: border(theme, "secondary"), + padding: { + bottom: 4, + left: 8, + right: 8, + top: 4, + }, + }, + rowHeight: 28, + contactAvatar: { + cornerRadius: 10, + width: 18, + }, + contactUsername: { + ...text(theme, "mono", "primary", { size: "sm" }), + padding: { + left: 8, + }, + }, + contactButton: { + ...text(theme, "mono", "primary", { size: "sm" }), + background: backgroundColor(theme, 100), + cornerRadius: 12, + padding: { left: 7, right: 7 } + }, + } +} diff --git a/styles/src/styleTree/contactsPanel.ts b/styles/src/styleTree/contactsPanel.ts index aeae2fca6270fc05bf7e7d436f64f4cfe2f2a4a5..202b818d14b21943af8a5b08fe00a4e7ba86e3bd 100644 --- a/styles/src/styleTree/contactsPanel.ts +++ b/styles/src/styleTree/contactsPanel.ts @@ -2,7 +2,7 @@ import Theme from "../themes/theme"; import { panel } from "./app"; import { backgroundColor, border, borderColor, iconColor, player, text } from "./components"; -export default function(theme: Theme) { +export default function contactsPanel(theme: Theme) { const project = { guestAvatarSpacing: 4, height: 24, @@ -64,7 +64,7 @@ export default function(theme: Theme) { left: 8, }, }, - editContact: { + contactButton: { ...text(theme, "mono", "primary", { size: "sm" }), background: backgroundColor(theme, 100), cornerRadius: 12,