remove publication mobile

This commit is contained in:
Peter Maquiran
2024-03-11 10:23:33 +01:00
parent b02971e70b
commit e87b4ccdef
9 changed files with 42 additions and 22 deletions
+12 -2
View File
@@ -144,8 +144,18 @@ export class LoginPage implements OnInit {
if (attempt.ChatData) {
await this.authService.loginToChatWs();
this.ChatService.setheader()
try {
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"
name="image" ngDefaultControl [src]="'data:image/jpg;base64,' + seleted.FileBase64"
name="image" ngDefaultControl [src]="seleted.FileBase64"
(click)="imageSize(capturedImage)" style="height: 69px;"></ion-img>
<video *ngIf="checkFileType.checkFileType(seleted.FileExtension) == 'video'" width="70" height="70"
@@ -758,7 +758,7 @@ console.log(stringGerada);
this.shareContentAndroid(resultUrl,FileExtension)
}
/*
/*
Filesystem.readFile({ path: resultUrl }).then(async (content) => {
let fileObject;
try {
@@ -809,7 +809,7 @@ console.log(stringGerada);
} else {
window["sharedContent"] = null
}
}
async recordevideoIos(fullPath) {
@@ -854,7 +854,7 @@ console.log(stringGerada);
.catch((erro) => console.error('read converted video erro ', erro));
});
} catch (error) {
console.log('record video ios erro, ', error)
}
@@ -906,7 +906,7 @@ console.log(stringGerada);
}
} else {
fileObject = {
FileBase64: content.data,
FileBase64: 'data:image/jpeg;base64,' + content.data,
FileExtension: this.removeTextBeforeSlash(element.mimeType, '/'),
OriginalFileName: 'image'
}
@@ -915,18 +915,18 @@ console.log(stringGerada);
this.seletedContent.push(fileObject)
})
.catch((err) => console.error(err));
}
gerarStringAleatoria() {
const caracteres = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let stringAleatoria = '';
for (let i = 0; i < 4; i++) {
const indiceAleatorio = Math.floor(Math.random() * caracteres.length);
stringAleatoria += caracteres.charAt(indiceAleatorio);
}
return stringAleatoria;
}
@@ -944,23 +944,23 @@ console.log(stringGerada);
OriginalFileName: 'shared',
}
console.log('shared base', content.data)
this.seletedContent.push(fileObject)
} catch (error) {
console.log('error shared filesystem', error)
}
})
} else if (this.checkFileType.checkFileType(FileExtension) == 'video') {
const directory = await Filesystem.getUri({
directory: Directory.Cache,
path: '',
});
let fileObject ={};
this.videoconvertService.convertVideo(fullPath,directory.uri,filename,'mp4').then(() => {
Filesystem.readFile({ path: `${directory.uri}output.mp4`})
.then(async (content) => {
console.log(content.data)
this.filecontent = true;
@@ -991,8 +991,8 @@ console.log(stringGerada);
});
}
} catch (error) {
console.log('record video ios erro, ', error)
}
@@ -1005,7 +1005,7 @@ console.log(stringGerada);
try {
if (this.checkFileType.checkFileType(FileExtension) == 'image') {
fileObject = {
FileBase64: this.removeTextBeforeSlash(content.data, ','),
FileBase64: 'data:image/jpeg;base64,' +this.removeTextBeforeSlash(content.data, ','),
FileExtension: FileExtension,
OriginalFileName: 'shared',
}
+1
View File
@@ -183,6 +183,7 @@ export class AuthService {
setTimeout(() => {
if (SessionStore.user.ChatData?.data) {
this.RochetChatConnectorService.logout();
this.RochetChatConnectorService.connect();
this.RochetChatConnectorService.login().then((message: any) => {
console.log('Chat login', message)
+1 -1
View File
@@ -157,7 +157,7 @@ export class ChatSystemService {
runMainChangeDetector() {
console.log("change")
this.mainChangeDetector()
// this.mainChangeDetector()
}
loadChat() {
+1 -1
View File
@@ -391,7 +391,7 @@ export class RoomService {
this.name = ChatMessage.msg
}
this.changeDetector()
// this.changeDetector()
setTimeout(() => {
done()
}, 5)
+10
View File
@@ -43,6 +43,16 @@ export class HeaderPage implements OnInit {
notificationCount: number = 0;
profilePicture = "";
hideHeader = false
hideHeaderValidation() {
const result = this.HeaderSettingsService.hideHeader && this.ActiveTabService.pages.gabineteDetails
if(result != this.hideHeader) {
this.hideHeader = true
}
}
constructor(
private router: Router,
@@ -64,7 +64,7 @@
</div>
<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"
preload="metadata" webkit-playsinline="webkit-playsinline">
@@ -410,7 +410,6 @@ export class NewPublicationPage implements OnInit {
if(e.FileType == 'video' && e.blobFile && e.toUpload) {
e.OriginalFileName = e.chucksManager.path.replace(".mp4", "")
e.FileExtension = "mp4"
e.Base64 = ""
}
return e
})
@@ -420,7 +419,7 @@ export class NewPublicationPage implements OnInit {
const publication: any = Object.assign({}, this.publicationFormMV.form)
publication.Files = publication.Files.map( (e:PublicationAttachmentEntity) => ({
FileBase64: e.url,
FileBase64: e.Base64,
FileExtension: e.FileExtension,
OriginalFileName: e.OriginalFileName || 'foto'
}))