You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-13 08:02:38 +03:00
Uppercase the first letter of the app tile name.
This commit is contained in:
@@ -61,11 +61,20 @@ export default React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
formatAppTileName: function() {
|
||||||
|
let appTileName = "No name";
|
||||||
|
if(this.props.name && this.props.name.trim()) {
|
||||||
|
appTileName = this.props.name.trim();
|
||||||
|
appTileName = appTileName[0].toUpperCase() + appTileName.slice(1).toLowerCase();
|
||||||
|
}
|
||||||
|
return appTileName;
|
||||||
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
return (
|
return (
|
||||||
<div className={this.props.fullWidth ? "mx_AppTileFullWidth" : "mx_AppTile"} id={this.props.id}>
|
<div className={this.props.fullWidth ? "mx_AppTileFullWidth" : "mx_AppTile"} id={this.props.id}>
|
||||||
<div className="mx_AppTileMenuBar">
|
<div className="mx_AppTileMenuBar">
|
||||||
{this.props.name}
|
{this.formatAppTileName()}
|
||||||
<span className="mx_AppTileMenuBarWidgets">
|
<span className="mx_AppTileMenuBarWidgets">
|
||||||
{/* Edit widget */}
|
{/* Edit widget */}
|
||||||
{/* <img
|
{/* <img
|
||||||
|
|||||||
Reference in New Issue
Block a user