mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
improve
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
**/Dockerfile*
|
**/Dockerfile*
|
||||||
**/node_modules
|
**/node_modules
|
||||||
**/npm-debug.log
|
**/npm-debug.log
|
||||||
**/www
|
|
||||||
**/secrets.dev.yaml
|
**/secrets.dev.yaml
|
||||||
**/values.dev.yaml
|
**/values.dev.yaml
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|||||||
+11
-11
@@ -1,15 +1,15 @@
|
|||||||
FROM node:14 as build
|
# FROM node:14 as build
|
||||||
WORKDIR /app
|
# WORKDIR /app
|
||||||
COPY ./package*.json /app/
|
# COPY ./package*.json /app/
|
||||||
RUN npm config set unsafe-perm true
|
# RUN npm config set unsafe-perm true
|
||||||
RUN npm install -g ionic
|
# RUN npm install -g ionic
|
||||||
RUN npm config set legacy-peer-deps true
|
# RUN npm config set legacy-peer-deps true
|
||||||
RUN npm i -D typescript@4.3.5
|
# RUN npm i -D typescript@4.3.5
|
||||||
RUN npm install --save --legacy-peer-deps
|
# RUN npm install --save --legacy-peer-deps
|
||||||
COPY ./ /app/
|
# COPY ./ /app/
|
||||||
RUN ionic build --prod
|
# RUN ionic build --prod
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
RUN rm -rf /usr/share/nginx/html/*
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
COPY --from=build /app/www/ /usr/share/nginx/html/
|
COPY /www/ /usr/share/nginx/html/
|
||||||
@@ -18,9 +18,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="div-icon">
|
<div class="div-icon">
|
||||||
|
|
||||||
<!-- <button (click)="openChatDebuggingPageModal()" title="Nova Conversa Individual" class="btn-no-color font-12">
|
<button (click)="openChatDebuggingPageModal()" title="Nova Conversa Individual" class="btn-no-color font-12">
|
||||||
Dev
|
Dev
|
||||||
</button> -->
|
</button>
|
||||||
<button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()">
|
<button title="Nova Conversa Individual" class="btn-no-color" (click)="openContactsPage()">
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " slot="end" src="assets/images/icons-chat-new-conversation.svg"></ion-icon>
|
||||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
|
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src="assets/images/theme/gov/icons-chat-new-conversation.svg"></ion-icon>
|
||||||
|
|||||||
@@ -159,7 +159,9 @@ export class LoginPage implements OnInit {
|
|||||||
if(attempt.ChatData) {
|
if(attempt.ChatData) {
|
||||||
await this.authService.loginChat(attempt.ChatData.data);
|
await this.authService.loginChat(attempt.ChatData.data);
|
||||||
await this.authService.loginToChatWs();
|
await this.authService.loginToChatWs();
|
||||||
this.ChatService.setheader()
|
this.ChatService.setheader();
|
||||||
|
this.ChatService.refreshtoken();
|
||||||
|
this.WsChatMethodsService.ReLoadChat();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getToken();
|
this.getToken();
|
||||||
|
|||||||
@@ -669,8 +669,7 @@ export class RoomService {
|
|||||||
|
|
||||||
const messages = await MessageModel.filter({rid:this.id}).execute()
|
const messages = await MessageModel.filter({rid:this.id}).execute()
|
||||||
|
|
||||||
await messages.forEach( async (ChatMessage, index) => {
|
for (let ChatMessage of messages) {
|
||||||
|
|
||||||
const wewMessage = await this.simplePrepareMessage(ChatMessage)
|
const wewMessage = await this.simplePrepareMessage(ChatMessage)
|
||||||
|
|
||||||
if(wewMessage.offline == false) {
|
if(wewMessage.offline == false) {
|
||||||
@@ -694,9 +693,8 @@ export class RoomService {
|
|||||||
if(wewMessage.delate && !wewMessage.offline && !wewMessage.delateRequest) {
|
if(wewMessage.delate && !wewMessage.offline && !wewMessage.delateRequest) {
|
||||||
this.sendDeleteRequest(wewMessage._id)
|
this.sendDeleteRequest(wewMessage._id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.scrollDown()
|
this.scrollDown()
|
||||||
}, 50)
|
}, 50)
|
||||||
|
|||||||
@@ -153,11 +153,10 @@ export class WsChatMethodsService {
|
|||||||
const rooms = await this.storage.get('Rooms');
|
const rooms = await this.storage.get('Rooms');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(rooms) {
|
if(rooms) {
|
||||||
await rooms.result.update.forEach( async (roomData: room) => {
|
for (let roomData of rooms.result.update) {
|
||||||
await this.prepareRoom(roomData);
|
await this.prepareRoom(roomData);
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +171,7 @@ export class WsChatMethodsService {
|
|||||||
async getAllRooms () {
|
async getAllRooms () {
|
||||||
this.loadingWholeList = true
|
this.loadingWholeList = true
|
||||||
const rooms = await this.WsChatService.getRooms();
|
const rooms = await this.WsChatService.getRooms();
|
||||||
try {
|
try {
|
||||||
await this.storage.remove('Rooms');
|
await this.storage.remove('Rooms');
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
||||||
@@ -219,6 +218,7 @@ export class WsChatMethodsService {
|
|||||||
|
|
||||||
|
|
||||||
await this.storage.set('Rooms', rooms);
|
await this.storage.set('Rooms', rooms);
|
||||||
|
console.log("Done")
|
||||||
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -247,7 +247,7 @@ export class WsChatMethodsService {
|
|||||||
*/
|
*/
|
||||||
subscribeToRoom() {
|
subscribeToRoom() {
|
||||||
|
|
||||||
|
console.log('subcribe/////////////////////////////////')
|
||||||
for (const id in this.dm) {
|
for (const id in this.dm) {
|
||||||
this.defaultSubtribe(id)
|
this.defaultSubtribe(id)
|
||||||
}
|
}
|
||||||
@@ -283,7 +283,6 @@ export class WsChatMethodsService {
|
|||||||
*/
|
*/
|
||||||
private defaultSubtribe(id: any) {
|
private defaultSubtribe(id: any) {
|
||||||
|
|
||||||
|
|
||||||
this.WsChatService.streamRoomMessages(id).then((subscription) => {
|
this.WsChatService.streamRoomMessages(id).then((subscription) => {
|
||||||
const room = this.getRoomById(id);
|
const room = this.getRoomById(id);
|
||||||
room.status.receive.message = true;
|
room.status.receive.message = true;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<ion-content>
|
<ion-content>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Chat login</li>
|
<li>Chat login</li>
|
||||||
<li>Chat user list</li>
|
<li>Chat user list {{ wsChatMethodsService.users | json }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let room of wsChatMethodsService._dm">chat Name: {{room.name}}; subcribe: {{room.status.receive.message}}; </li>
|
<li *ngFor="let room of wsChatMethodsService._dm">chat Name: {{room.name}}; subcribe: {{room.status.receive.message}}; </li>
|
||||||
|
|||||||
Reference in New Issue
Block a user