mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix dm room name
This commit is contained in:
@@ -3,7 +3,7 @@ import { RoomService } from './room.service';
|
||||
import { WsChatService } from 'src/app/services/chat/ws-chat.service';
|
||||
import { MessageService } from 'src/app/services/chat/message.service'
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
import { capitalizeTxt } from 'src/plugin/text'
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -101,7 +101,7 @@ export class WsChatMethodsService {
|
||||
return name != SessionStore.user.RochetChatUser
|
||||
})[0]
|
||||
|
||||
return roomName
|
||||
return capitalizeTxt(roomName.split('.')[0]) + ' ' + capitalizeTxt(roomName.split('.')[1])
|
||||
} else {
|
||||
return roomData.fname
|
||||
}
|
||||
|
||||
@@ -66,6 +66,15 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<script type="module" src="./assets/js/index.js"></script>
|
||||
|
||||
<script>
|
||||
Object.defineProperty(String.prototype, 'capitalize', {
|
||||
value: function() {
|
||||
return this.charAt(0).toUpperCase() + this.slice(1);
|
||||
},
|
||||
enumerable: false
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class='gov'>
|
||||
|
||||
+1
-1
@@ -14,5 +14,5 @@ function deepFind(obj, path) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
deepFind: deepFind,
|
||||
deepFind: deepFind,
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
function capitalizeTxt(txt) {
|
||||
return txt.charAt(0).toUpperCase() + txt.slice(1); //or if you want lowercase the rest txt.slice(1).toLowerCase();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
capitalizeTxt: capitalizeTxt
|
||||
}
|
||||
Reference in New Issue
Block a user