Поведай миру что-нибудь хорошее.
-
+
diff --git a/src/app/send-post/send-post.component.ts b/src/app/send-post/send-post.component.ts
index 6372e1e..79ad920 100644
--- a/src/app/send-post/send-post.component.ts
+++ b/src/app/send-post/send-post.component.ts
@@ -11,7 +11,7 @@ import * as vars from "../var/api";
export class SendPostComponent implements OnInit {
progress: number;
- message: string;
+ message: string = '';
filename: string[] = [];
constructor(
@@ -24,10 +24,13 @@ export class SendPostComponent implements OnInit {
sendPost(text: string) {
var threadId = vars.displayed_thread;
- this.apiChatService.sendPostToApi(text, this.filename, threadId).subscribe();
+ this.apiChatService.sendPostToApi(text, this.filename, threadId).subscribe( response => {
+ response = response.toString();
+ vars.showAlert(response.toString(), "#ff0a36");
+ });
this.message = '0';
this.filename = [];
- alert("Сообщение отправлено.");
+
}
@@ -37,7 +40,7 @@ export class SendPostComponent implements OnInit {
response => {
response = response.value.toString();
this.filename.push(response);
- vars.showAlert("Картинка " + response + " добавлена к посту!", "#696116")
+ vars.showAlert("Картинка " + response + " добавлена к посту!", "#ff0a36")
});
}
diff --git a/src/app/var/api.ts b/src/app/var/api.ts
index b75f68a..dbbd11c 100644
--- a/src/app/var/api.ts
+++ b/src/app/var/api.ts
@@ -13,9 +13,9 @@ const showAlert = (message:string, color:string) => {
alertContainer.style.left = '50';
alertContainer.style.top = '0';
alertContainer.style.right = '0';
- alertContainer.style.padding = '10px 3px';
- alertContainer.style.fontSize = '30px';
- alertContainer.style.textAlign = 'center';
+ alertContainer.style.padding = '30px 3px';
+ alertContainer.style.fontSize = '20px';
+ alertContainer.style.textAlign = 'right';
alertContainer.style.backgroundColor = color;
alertContainer.style.border = "2px dashed #6CFFDD"
alertContainer.textContent = message;