[IMP] mail: turn 'Discuss/addChatInputPlaceholder' into field

Task-2793280

closes odoo/odoo#86443

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2022-03-17 18:37:14 +01:00
parent 69792684cf
commit dea2da8b25
3 changed files with 11 additions and 8 deletions
@@ -41,13 +41,6 @@ export class Discuss extends LegacyComponent {
// Public
//--------------------------------------------------------------------------
/**
* @returns {string}
*/
get addChatInputPlaceholder() {
return this.env._t("Search user...");
}
/**
* @returns {DiscussView}
*/
@@ -33,7 +33,7 @@
className="'o_Discuss_mobileAddItemHeaderInput'"
isFocusOnMount="true"
isHtml="discussView.discuss.isAddingChannel"
placeholder="discussView.discuss.isAddingChannel ? discuss.addChannelInputPlaceholder : addChatInputPlaceholder"
placeholder="discussView.discuss.isAddingChannel ? discussView.discuss.addChannelInputPlaceholder : discussView.discuss.addChatInputPlaceholder"
select="_onMobileAddItemHeaderInputSelect"
source="_onMobileAddItemHeaderInputSource"
onHide="_onHideMobileAddItemHeader"
+10
View File
@@ -239,6 +239,13 @@ registerModel({
_computeAddChannelInputPlaceholder() {
return this.env._t("Create or search channel...");
},
/**
* @private
* @returns {string}
*/
_computeAddChatInputPlaceholder() {
return this.env._t("Search user...");
},
/**
* @private
* @returns {string}
@@ -346,6 +353,9 @@ registerModel({
addChannelInputPlaceholder: attr({
compute: '_computeAddChannelInputPlaceholder',
}),
addChatInputPlaceholder: attr({
compute: '_computeAddChatInputPlaceholder',
}),
/**
* Value that is used to create a channel from the sidebar.
*/