Skip to content

Commit

Permalink
Merge branch 'dev' into chat_friend_request
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusc93 authored Nov 8, 2023
2 parents c136ef1 + 972635e commit ba419d3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 14 deletions.
3 changes: 3 additions & 0 deletions common/locales/en-US/main.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ messages = Messages
.replying = Replying to:
.react = React
.reply = Reply
.loading = Loading...
.say-something-placeholder = Say Something...
.user-sent-message = { $user } sent you a message.
.unknown-sent-message = someone sent you a message.
Expand Down Expand Up @@ -321,6 +322,8 @@ remote-controls = Remote Controls
.unmute = Unmute
.listen = Listen
.silence = Silence
.start-recording = Start Recording
.stop-recording = Stop Recording
.incoming-call = Incoming Transmission ...
.outgoing-call = Outgoing Transmission ...
.empty = Nobody is here
Expand Down
1 change: 1 addition & 0 deletions kit/src/elements/textarea/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ textarea {
width: 100%;
height: "auto";
max-height: 250px; //Maybe make max variable?
min-height: 22px;
margin: 9px 0;
&.disabled {
cursor: not-allowed;
Expand Down
2 changes: 1 addition & 1 deletion kit/src/layout/chatbar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub fn Chatbar<'a>(cx: Scope<'a, Props<'a>>) -> Element<'a> {
placeholder: cx.props.placeholder.clone(),
ignore_focus: cx.props.ignore_focus,
show_char_counter: true,
value: if cx.props.is_disabled { get_local_text("messages.not-friends")} else { cx.props.value.clone().unwrap_or_default()},
value: if cx.props.is_disabled { get_local_text("messages.loading")} else { cx.props.value.clone().unwrap_or_default()},
onchange: move |(v, _)| cx.props.onchange.call(v),
onreturn: move |(v, is_valid, _)| {
if let Some(i) = selected_emoji.write_silent().take() {
Expand Down
2 changes: 1 addition & 1 deletion kit/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pre code {
--text-color-bright: #ffffff;
--text-color-link: #ff860d;
--text-selection: #e0e0e0;
--placeholder: #fff;
--placeholder: #bcbcbc;
--primary: #fcfbf4;
--primary-dark: color-mix(in srgb, var(--primary) 50%, black);
--primary-light: color-mix(in srgb, var(--primary) 50%, white);
Expand Down
40 changes: 28 additions & 12 deletions ui/src/components/media/calling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ pub fn CallControl(cx: Scope<Props>) -> Element {
unmute_text: get_local_text("remote-controls.unmute"),
listen_text: get_local_text("remote-controls.listen"),
silence_text: get_local_text("remote-controls.silence"),
start_recording_text: get_local_text("remote-controls.start-recording"),
stop_recording_text: get_local_text("remote-controls.stop-recording"),
})),
None => match state.read().ui.call_info.pending_calls().first() {
Some(call) => cx.render(rsx!(PendingCallDialog {
Expand All @@ -89,6 +91,8 @@ pub struct ActiveCallProps {
unmute_text: String,
listen_text: String,
silence_text: String,
start_recording_text: String,
stop_recording_text: String,
}

#[allow(non_snake_case)]
Expand Down Expand Up @@ -434,20 +438,32 @@ fn ActiveCallControl(cx: Scope<ActiveCallProps>) -> Element {
rsx!(Button {
icon: Icon::StopCircle,
appearance: Appearance::Danger,
onpress: move |_| {
ch.send(CallDialogCmd::StopRecording);
},
})
tooltip: cx.render(rsx!(
Tooltip {
arrow_position: ArrowPosition::Bottom,
text: cx.props.stop_recording_text.clone()
}
)),
onpress: move |_| {
ch.send(CallDialogCmd::StopRecording);
},
})
} else {
rsx!(Button {
icon: Icon::RadioSelected,
appearance: Appearance::Secondary,
onpress: move |_| {
ch.send(CallDialogCmd::RecordCall);
},
})
icon: Icon::RadioSelected,
appearance: Appearance::Secondary,
tooltip: cx.render(rsx!(
Tooltip {
arrow_position: ArrowPosition::Bottom,
text: cx.props.start_recording_text.clone()
}
}),
)),
onpress: move |_| {
ch.send(CallDialogCmd::RecordCall);
},
})
}
}),
Button {
icon: Icon::PhoneXMark,
aria_label: "call-hangup-button".into(),
Expand All @@ -456,7 +472,7 @@ fn ActiveCallControl(cx: Scope<ActiveCallProps>) -> Element {
ch.send(CallDialogCmd::Hangup(call.id));
},
},
//Currently not impl
//Currently not implemented
/*Button {
icon: Icon::Cog6Tooth,
appearance: Appearance::Secondary,
Expand Down

0 comments on commit ba419d3

Please sign in to comment.