Rename 'Authenticate' action to 'Sign In'
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
parent
75901f1c33
commit
0bbb4b22c6
2 changed files with 6 additions and 6 deletions
|
@ -66,12 +66,12 @@ pub const ZED_SECRET_CLIENT_TOKEN: &str = "618033988749894";
|
||||||
pub const INITIAL_RECONNECTION_DELAY: Duration = Duration::from_millis(100);
|
pub const INITIAL_RECONNECTION_DELAY: Duration = Duration::from_millis(100);
|
||||||
pub const CONNECTION_TIMEOUT: Duration = Duration::from_secs(5);
|
pub const CONNECTION_TIMEOUT: Duration = Duration::from_secs(5);
|
||||||
|
|
||||||
actions!(client, [Authenticate, SignOut]);
|
actions!(client, [SignIn, SignOut]);
|
||||||
|
|
||||||
pub fn init(client: Arc<Client>, cx: &mut MutableAppContext) {
|
pub fn init(client: Arc<Client>, cx: &mut MutableAppContext) {
|
||||||
cx.add_global_action({
|
cx.add_global_action({
|
||||||
let client = client.clone();
|
let client = client.clone();
|
||||||
move |_: &Authenticate, cx| {
|
move |_: &SignIn, cx| {
|
||||||
let client = client.clone();
|
let client = client.clone();
|
||||||
cx.spawn(
|
cx.spawn(
|
||||||
|cx| async move { client.authenticate_and_connect(true, &cx).log_err().await },
|
|cx| async move { client.authenticate_and_connect(true, &cx).log_err().await },
|
||||||
|
|
|
@ -4,7 +4,7 @@ use crate::{
|
||||||
ToggleScreenSharing,
|
ToggleScreenSharing,
|
||||||
};
|
};
|
||||||
use call::{ActiveCall, ParticipantLocation, Room};
|
use call::{ActiveCall, ParticipantLocation, Room};
|
||||||
use client::{proto::PeerId, Authenticate, ContactEventKind, SignOut, User, UserStore};
|
use client::{proto::PeerId, ContactEventKind, SignIn, SignOut, User, UserStore};
|
||||||
use clock::ReplicaId;
|
use clock::ReplicaId;
|
||||||
use contacts_popover::ContactsPopover;
|
use contacts_popover::ContactsPopover;
|
||||||
use context_menu::{ContextMenu, ContextMenuItem};
|
use context_menu::{ContextMenu, ContextMenuItem};
|
||||||
|
@ -313,7 +313,7 @@ impl CollabTitlebarItem {
|
||||||
vec![
|
vec![
|
||||||
ContextMenuItem::Item {
|
ContextMenuItem::Item {
|
||||||
label: "Sign in".into(),
|
label: "Sign in".into(),
|
||||||
action: Box::new(Authenticate),
|
action: Box::new(SignIn),
|
||||||
},
|
},
|
||||||
ContextMenuItem::Item {
|
ContextMenuItem::Item {
|
||||||
label: "Give Feedback".into(),
|
label: "Give Feedback".into(),
|
||||||
|
@ -556,7 +556,7 @@ impl CollabTitlebarItem {
|
||||||
|
|
||||||
fn render_sign_in_button(&self, theme: &Theme, cx: &mut RenderContext<Self>) -> ElementBox {
|
fn render_sign_in_button(&self, theme: &Theme, cx: &mut RenderContext<Self>) -> ElementBox {
|
||||||
let titlebar = &theme.workspace.titlebar;
|
let titlebar = &theme.workspace.titlebar;
|
||||||
MouseEventHandler::<Authenticate>::new(0, cx, |state, _| {
|
MouseEventHandler::<SignIn>::new(0, cx, |state, _| {
|
||||||
let style = titlebar.sign_in_prompt.style_for(state, false);
|
let style = titlebar.sign_in_prompt.style_for(state, false);
|
||||||
Label::new("Sign In", style.text.clone())
|
Label::new("Sign In", style.text.clone())
|
||||||
.contained()
|
.contained()
|
||||||
|
@ -565,7 +565,7 @@ impl CollabTitlebarItem {
|
||||||
})
|
})
|
||||||
.with_cursor_style(CursorStyle::PointingHand)
|
.with_cursor_style(CursorStyle::PointingHand)
|
||||||
.on_click(MouseButton::Left, move |_, cx| {
|
.on_click(MouseButton::Left, move |_, cx| {
|
||||||
cx.dispatch_action(Authenticate);
|
cx.dispatch_action(SignIn);
|
||||||
})
|
})
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue