mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +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 { WsChatService } from 'src/app/services/chat/ws-chat.service';
|
||||||
import { MessageService } from 'src/app/services/chat/message.service'
|
import { MessageService } from 'src/app/services/chat/message.service'
|
||||||
import { SessionStore } from 'src/app/store/session.service';
|
import { SessionStore } from 'src/app/store/session.service';
|
||||||
|
import { capitalizeTxt } from 'src/plugin/text'
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -101,7 +101,7 @@ export class WsChatMethodsService {
|
|||||||
return name != SessionStore.user.RochetChatUser
|
return name != SessionStore.user.RochetChatUser
|
||||||
})[0]
|
})[0]
|
||||||
|
|
||||||
return roomName
|
return capitalizeTxt(roomName.split('.')[0]) + ' ' + capitalizeTxt(roomName.split('.')[1])
|
||||||
} else {
|
} else {
|
||||||
return roomData.fname
|
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/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<script type="module" src="./assets/js/index.js"></script>
|
<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>
|
</head>
|
||||||
|
|
||||||
<body class='gov'>
|
<body class='gov'>
|
||||||
|
|||||||
+1
-1
@@ -14,5 +14,5 @@ function deepFind(obj, path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
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