Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
wip
Max Brunsfeld0ae1f29be82c
diff --git a/crates/client/src/channel_store.rs b/crates/client/src/channel_store.rsindex 558570475e6..534bd0b05a5 100644--- a/crates/client/src/channel_store.rs+++ b/crates/client/src/channel_store.rs@@ -115,10 +115,6 @@ impl ChannelStore {}}- pub fn is_channel_invite_pending(&self, channel: &Arc<Channel>) -> bool {- false- }-pub fn remove_channel(&self, channel_id: ChannelId) -> impl Future<Output = Result<()>> {let client = self.client.clone();async move {@@ -127,6 +123,10 @@ impl ChannelStore {}}+ pub fn is_channel_invite_pending(&self, _: &Arc<Channel>) -> bool {+ false+ }+pub fn remove_member(&self,channel_id: ChannelId,@@ -144,10 +144,6 @@ impl ChannelStore {todo!()}- pub fn add_guest_channel(&self, channel_id: ChannelId) -> Task<Result<()>> {- todo!()- }-async fn handle_update_channels(this: ModelHandle<Self>,message: TypedEnvelope<proto::UpdateChannels>,diff --git a/crates/collab/src/db/tests.rs b/crates/collab/src/db/tests.rsindex a6249bb548a..a1d1a23dc96 100644--- a/crates/collab/src/db/tests.rs+++ b/crates/collab/src/db/tests.rs@@ -1080,7 +1080,7 @@ test_both_dbs!(test_channel_invites_sqlite,db,{- let owner_id = db.create_server("test").await.unwrap().0 as u32;+ db.create_server("test").await.unwrap();let user_1 = db.create_user(diff --git a/crates/collab_ui/src/face_pile.rs b/crates/collab_ui/src/face_pile.rsindex 7e95a7677ca..30fcb975067 100644--- a/crates/collab_ui/src/face_pile.rs+++ b/crates/collab_ui/src/face_pile.rs@@ -10,8 +10,6 @@ use gpui::{AnyElement, Axis, Element, LayoutContext, SceneBuilder, View, ViewContext,};-use crate::CollabTitlebarItem;-pub(crate) struct FacePile<V: View> {overlap: f32,faces: Vec<AnyElement<V>>,diff --git a/crates/collab_ui/src/panel.rs b/crates/collab_ui/src/panel.rsindex 406daae0f22..667e8d3a5cd 100644--- a/crates/collab_ui/src/panel.rs+++ b/crates/collab_ui/src/panel.rs@@ -1259,8 +1259,8 @@ impl CollabPanel {fn render_channel_editor(&self,- theme: &theme::CollabPanel,- depth: usize,+ _theme: &theme::CollabPanel,+ _depth: usize,cx: &AppContext,) -> AnyElement<Self> {ChildView::new(&self.channel_name_editor, cx).into_any()@@ -1276,7 +1276,7 @@ impl CollabPanel {let channel_id = channel.id;MouseEventHandler::<Channel, Self>::new(channel.id as usize, cx, |state, cx| {Flex::row()- .with_child({ Svg::new("icons/file_icons/hash.svg").aligned().left() })+ .with_child(Svg::new("icons/file_icons/hash.svg").aligned().left()).with_child(Label::new(channel.name.clone(), theme.contact_username.text.clone()).contained()@@ -1329,12 +1329,7 @@ impl CollabPanel {let button_spacing = theme.contact_button_spacing;Flex::row()- .with_child({- Svg::new("icons/file_icons/hash.svg")- // .with_style(theme.contact_avatar)- .aligned()- .left()- })+ .with_child(Svg::new("icons/file_icons/hash.svg").aligned().left()).with_child(Label::new(channel.name.clone(), theme.contact_username.text.clone()).contained()@@ -1616,7 +1611,7 @@ impl CollabPanel {}}} else if let Some((editing_state, channel_name)) = self.take_editing_state(cx) {- let create_channel = self.channel_store.update(cx, |channel_store, cx| {+ let create_channel = self.channel_store.update(cx, |channel_store, _| {channel_store.create_channel(&channel_name, editing_state.parent_id)});@@ -1687,7 +1682,7 @@ impl CollabPanel {cx.spawn(|_, mut cx| async move {if answer.next().await == Some(0) {if let Err(e) = channel_store- .update(&mut cx, |channels, cx| channels.remove_channel(channel_id))+ .update(&mut cx, |channels, _| channels.remove_channel(channel_id)).await{cx.prompt(diff --git a/crates/collab_ui/src/panel/channel_modal.rs b/crates/collab_ui/src/panel/channel_modal.rsindex fff1dc86244..aa1b3e5a136 100644--- a/crates/collab_ui/src/panel/channel_modal.rs+++ b/crates/collab_ui/src/panel/channel_modal.rs@@ -9,7 +9,7 @@ pub fn init(cx: &mut AppContext) {pub struct ChannelModal {has_focus: bool,- input_editor: ViewHandle<Editor>,+ filter_editor: ViewHandle<Editor>,}pub enum Event {@@ -30,7 +30,7 @@ impl ChannelModal {ChannelModal {has_focus: false,- input_editor,+ filter_editor: input_editor,}}@@ -55,7 +55,7 @@ impl View for ChannelModal {enum ChannelModal {}MouseEventHandler::<ChannelModal, _>::new(0, cx, |_, cx| {Flex::column()- .with_child(ChildView::new(self.input_editor.as_any(), cx))+ .with_child(ChildView::new(self.filter_editor.as_any(), cx)).with_child(Label::new("ADD OR BROWSE CHANNELS HERE", style)).contained().with_style(modal_container)@@ -71,7 +71,7 @@ impl View for ChannelModal {fn focus_in(&mut self, _: AnyViewHandle, cx: &mut ViewContext<Self>) {self.has_focus = true;if cx.is_self_focused() {- cx.focus(&self.input_editor);+ cx.focus(&self.filter_editor);}}diff --git a/script/zed-with-local-servers b/script/zed-with-local-serversindex c47b0e3de01..e1b224de600 100755--- a/script/zed-with-local-servers+++ b/script/zed-with-local-servers@@ -1,3 +1,6 @@#!/bin/bash-ZED_ADMIN_API_TOKEN=secret ZED_IMPERSONATE=as-cii ZED_SERVER_URL=http://localhost:8080 cargo run $@+: "${ZED_IMPERSONATE:=as-cii}"+export ZED_IMPERSONATE++ZED_ADMIN_API_TOKEN=secret ZED_SERVER_URL=http://localhost:8080 cargo run $@diff --git a/styles/.eslintrc.js b/styles/.eslintrc.jsindex 485ff73d104..82e9636189a 100644--- a/styles/.eslintrc.js+++ b/styles/.eslintrc.js@@ -28,6 +28,7 @@ module.exports = {},rules: {"linebreak-style": ["error", "unix"],+ "@typescript-eslint/no-explicit-any": "off",semi: ["error", "never"],},}diff --git a/styles/src/style_tree/collab_panel.ts b/styles/src/style_tree/collab_panel.tsindex 49a343e6c93..3390dd51f8e 100644--- a/styles/src/style_tree/collab_panel.ts+++ b/styles/src/style_tree/collab_panel.ts@@ -8,6 +8,7 @@ import {import { interactive, toggleable } from "../element"import { useTheme } from "../theme"+export default function contacts_panel(): any {const theme = useTheme()diff --git a/styles/tsconfig.json b/styles/tsconfig.jsonindex a1913027b70..281bd74b215 100644--- a/styles/tsconfig.json+++ b/styles/tsconfig.json@@ -24,5 +24,7 @@"useUnknownInCatchVariables": false,"baseUrl": "."},- "exclude": ["node_modules"]+ "exclude": [+ "node_modules"+ ]}