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

Task-2793280

closes odoo/odoo#86442

Signed-off-by: Ooming <wil@odoo.com>
This commit is contained in:
Alexandre Kühn
2022-03-16 16:07:09 +01:00
parent aa24c3a757
commit f8633598c8
3 changed files with 11 additions and 8 deletions
@@ -41,13 +41,6 @@ export class Discuss extends LegacyComponent {
// Public
//--------------------------------------------------------------------------
/**
* @returns {string}
*/
get addChannelInputPlaceholder() {
return this.env._t("Create or search channel...");
}
/**
* @returns {string}
*/
@@ -33,7 +33,7 @@
className="'o_Discuss_mobileAddItemHeaderInput'"
isFocusOnMount="true"
isHtml="discussView.discuss.isAddingChannel"
placeholder="discussView.discuss.isAddingChannel ? addChannelInputPlaceholder : addChatInputPlaceholder"
placeholder="discussView.discuss.isAddingChannel ? discuss.addChannelInputPlaceholder : addChatInputPlaceholder"
select="_onMobileAddItemHeaderInputSelect"
source="_onMobileAddItemHeaderInputSource"
onHide="_onHideMobileAddItemHeader"
@@ -232,6 +232,13 @@ registerModel({
}
return this.threadToActiveId(this.thread);
},
/**
* @private
* @returns {string}
*/
_computeAddChannelInputPlaceholder() {
return this.env._t("Create or search channel...");
},
/**
* @private
* @returns {string}
@@ -336,6 +343,9 @@ registerModel({
activeMobileNavbarTabId: attr({
default: 'mailbox',
}),
addChannelInputPlaceholder: attr({
compute: '_computeAddChannelInputPlaceholder',
}),
/**
* Value that is used to create a channel from the sidebar.
*/