Skip to content

Commit

Permalink
chore(chatbar): disabling the chatbar when it's loading instead of di…
Browse files Browse the repository at this point in the history
…splaying different text and not being multi line by default (#1402)
  • Loading branch information
Jekrimo authored Nov 8, 2023
1 parent 3bc85fd commit 972635e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 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
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

0 comments on commit 972635e

Please sign in to comment.