mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
remove publication mobile
This commit is contained in:
@@ -144,8 +144,18 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
if (attempt.ChatData) {
|
if (attempt.ChatData) {
|
||||||
|
|
||||||
await this.authService.loginToChatWs();
|
try {
|
||||||
this.ChatService.setheader()
|
|
||||||
|
await MessageModel.deleteAll();
|
||||||
|
await DeleteMessageModel.deleteAll();
|
||||||
|
this.ChatSystemService.clearChat();
|
||||||
|
this.NotificationHolderService.clear()
|
||||||
|
await this.authService.loginToChatWs();
|
||||||
|
this.ChatService.setheader()
|
||||||
|
|
||||||
|
} catch(error) {
|
||||||
|
console.log("faild to clear chat")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'" [(ngModel)]="capturedImage"
|
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'" [(ngModel)]="capturedImage"
|
||||||
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64"
|
name="image" ngDefaultControl [src]="seleted.FileBase64"
|
||||||
(click)="imageSize(capturedImage)" style="height: 69px;"></ion-img>
|
(click)="imageSize(capturedImage)" style="height: 69px;"></ion-img>
|
||||||
|
|
||||||
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ console.log(stringGerada);
|
|||||||
this.shareContentAndroid(resultUrl,FileExtension)
|
this.shareContentAndroid(resultUrl,FileExtension)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
|
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
|
||||||
let fileObject;
|
let fileObject;
|
||||||
try {
|
try {
|
||||||
@@ -809,7 +809,7 @@ console.log(stringGerada);
|
|||||||
} else {
|
} else {
|
||||||
window["sharedContent"] = null
|
window["sharedContent"] = null
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async recordevideoIos(fullPath) {
|
async recordevideoIos(fullPath) {
|
||||||
@@ -854,7 +854,7 @@ console.log(stringGerada);
|
|||||||
.catch((erro) => console.error('read converted video erro ', erro));
|
.catch((erro) => console.error('read converted video erro ', erro));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('record video ios erro, ', error)
|
console.log('record video ios erro, ', error)
|
||||||
}
|
}
|
||||||
@@ -906,7 +906,7 @@ console.log(stringGerada);
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fileObject = {
|
fileObject = {
|
||||||
FileBase64: content.data,
|
FileBase64: 'data:image/jpeg;base64,' + content.data,
|
||||||
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
|
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
|
||||||
OriginalFileName: 'image'
|
OriginalFileName: 'image'
|
||||||
}
|
}
|
||||||
@@ -915,18 +915,18 @@ console.log(stringGerada);
|
|||||||
this.seletedContent.push(fileObject)
|
this.seletedContent.push(fileObject)
|
||||||
})
|
})
|
||||||
.catch((err) => console.error(err));
|
.catch((err) => console.error(err));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gerarStringAleatoria() {
|
gerarStringAleatoria() {
|
||||||
const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||||
let stringAleatoria = '';
|
let stringAleatoria = '';
|
||||||
|
|
||||||
for (let i = 0; i < 4; i++) {
|
for (let i = 0; i < 4; i++) {
|
||||||
const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
|
const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
|
||||||
stringAleatoria += caracteres.charAt(indiceAleatorio);
|
stringAleatoria += caracteres.charAt(indiceAleatorio);
|
||||||
}
|
}
|
||||||
|
|
||||||
return stringAleatoria;
|
return stringAleatoria;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -944,23 +944,23 @@ console.log(stringGerada);
|
|||||||
OriginalFileName: 'shared',
|
OriginalFileName: 'shared',
|
||||||
}
|
}
|
||||||
console.log('shared base', content.data)
|
console.log('shared base', content.data)
|
||||||
|
|
||||||
this.seletedContent.push(fileObject)
|
this.seletedContent.push(fileObject)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('error shared filesystem', error)
|
console.log('error shared filesystem', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
|
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
|
||||||
const directory = await Filesystem.getUri({
|
const directory = await Filesystem.getUri({
|
||||||
directory: Directory.Cache,
|
directory: Directory.Cache,
|
||||||
path: '',
|
path: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
let fileObject ={};
|
let fileObject ={};
|
||||||
this.videoconvertService.convertVideo(fullPath,directory.uri,filename,'mp4').then(() => {
|
this.videoconvertService.convertVideo(fullPath,directory.uri,filename,'mp4').then(() => {
|
||||||
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
|
||||||
|
|
||||||
.then(async (content) => {
|
.then(async (content) => {
|
||||||
console.log(content.data)
|
console.log(content.data)
|
||||||
this.filecontent = true;
|
this.filecontent = true;
|
||||||
@@ -991,8 +991,8 @@ console.log(stringGerada);
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('record video ios erro, ', error)
|
console.log('record video ios erro, ', error)
|
||||||
}
|
}
|
||||||
@@ -1005,7 +1005,7 @@ console.log(stringGerada);
|
|||||||
try {
|
try {
|
||||||
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
|
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
|
||||||
fileObject = {
|
fileObject = {
|
||||||
FileBase64: this.removeTextBeforeSlash(content.data, ','),
|
FileBase64: 'data:image/jpeg;base64,' +this.removeTextBeforeSlash(content.data, ','),
|
||||||
FileExtension: FileExtension,
|
FileExtension: FileExtension,
|
||||||
OriginalFileName: 'shared',
|
OriginalFileName: 'shared',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ export class AuthService {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
||||||
if (SessionStore.user.ChatData?.data) {
|
if (SessionStore.user.ChatData?.data) {
|
||||||
|
this.RochetChatConnectorService.logout();
|
||||||
this.RochetChatConnectorService.connect();
|
this.RochetChatConnectorService.connect();
|
||||||
this.RochetChatConnectorService.login().then((message: any) => {
|
this.RochetChatConnectorService.login().then((message: any) => {
|
||||||
console.log('Chat login', message)
|
console.log('Chat login', message)
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export class ChatSystemService {
|
|||||||
|
|
||||||
runMainChangeDetector() {
|
runMainChangeDetector() {
|
||||||
console.log("change")
|
console.log("change")
|
||||||
this.mainChangeDetector()
|
// this.mainChangeDetector()
|
||||||
}
|
}
|
||||||
|
|
||||||
loadChat() {
|
loadChat() {
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ export class RoomService {
|
|||||||
this.name = ChatMessage.msg
|
this.name = ChatMessage.msg
|
||||||
}
|
}
|
||||||
|
|
||||||
this.changeDetector()
|
// this.changeDetector()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
done()
|
done()
|
||||||
}, 5)
|
}, 5)
|
||||||
|
|||||||
@@ -43,6 +43,16 @@ export class HeaderPage implements OnInit {
|
|||||||
notificationCount: number = 0;
|
notificationCount: number = 0;
|
||||||
profilePicture = "";
|
profilePicture = "";
|
||||||
|
|
||||||
|
hideHeader = false
|
||||||
|
|
||||||
|
|
||||||
|
hideHeaderValidation() {
|
||||||
|
const result = this.HeaderSettingsService.hideHeader && this.ActiveTabService.pages.gabineteDetails
|
||||||
|
if(result != this.hideHeader) {
|
||||||
|
this.hideHeader = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
|
<ion-img *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'image'"
|
||||||
name="image" ngDefaultControl [src]="seleted.url" style="height: 69px;"></ion-img>
|
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64" style="height: 69px;"></ion-img>
|
||||||
|
|
||||||
<video class="sdf" *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video' && checkDesktop() == true" width="70" height="70"
|
<video class="sdf" *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video' && checkDesktop() == true" width="70" height="70"
|
||||||
preload="metadata" webkit-playsinline="webkit-playsinline">
|
preload="metadata" webkit-playsinline="webkit-playsinline">
|
||||||
|
|||||||
@@ -410,7 +410,6 @@ export class NewPublicationPage implements OnInit {
|
|||||||
if(e.FileType == 'video' && e.blobFile && e.toUpload) {
|
if(e.FileType == 'video' && e.blobFile && e.toUpload) {
|
||||||
e.OriginalFileName = e.chucksManager.path.replace(".mp4", "")
|
e.OriginalFileName = e.chucksManager.path.replace(".mp4", "")
|
||||||
e.FileExtension = "mp4"
|
e.FileExtension = "mp4"
|
||||||
e.Base64 = ""
|
|
||||||
}
|
}
|
||||||
return e
|
return e
|
||||||
})
|
})
|
||||||
@@ -420,7 +419,7 @@ export class NewPublicationPage implements OnInit {
|
|||||||
const publication: any = Object.assign({}, this.publicationFormMV.form)
|
const publication: any = Object.assign({}, this.publicationFormMV.form)
|
||||||
|
|
||||||
publication.Files = publication.Files.map( (e:PublicationAttachmentEntity) => ({
|
publication.Files = publication.Files.map( (e:PublicationAttachmentEntity) => ({
|
||||||
FileBase64: e.url,
|
FileBase64: e.Base64,
|
||||||
FileExtension: e.FileExtension,
|
FileExtension: e.FileExtension,
|
||||||
OriginalFileName: e.OriginalFileName || 'foto'
|
OriginalFileName: e.OriginalFileName || 'foto'
|
||||||
}))
|
}))
|
||||||
|
|||||||
Reference in New Issue
Block a user