From aeeae60b76962099ff9d6214038a36fe81757f48 Mon Sep 17 00:00:00 2001 From: Aldino Kemal Date: Sun, 22 May 2022 13:46:02 +0700 Subject: [PATCH] feat: update ui dashboard (#17) * feat: update ui dashboard * chore: update docs --- readme.md | 17 +++++----- src/config/settings.go | 2 +- src/views/index.html | 76 +++++++++++++++++++++++++++++++++++++----- 3 files changed, 78 insertions(+), 17 deletions(-) diff --git a/readme.md b/readme.md index 2a4b1f1..e940213 100644 --- a/readme.md +++ b/readme.md @@ -91,16 +91,17 @@ You can check [docs/openapi.yml](./docs/openapi.yaml) for detail API ### App User Interface -1. Homepage ![Homepage](https://i.ibb.co/xg6r0BV/Screen-Shot-2022-04-23-at-19-55-56.png) +1. Homepage ![Homepage](https://i.ibb.co/nCK9w1W/Screen-Shot-2022-05-22-at-13-39-28.png) 2. Login ![Login](https://i.ibb.co/Yp3YJKM/Screen-Shot-2022-02-13-at-12-55-54.png) -3. Send Message ![Send Message](https://i.ibb.co/YcSfvmP/Screen-Shot-2022-02-13-at-12-58-58.png) +3. Send Message ![Send Message](https://i.ibb.co/VMRjX3K/Screen-Shot-2022-05-22-at-13-41-55.png) 4. Send Image ![Send Image](https://i.ibb.co/HDVJZSN/Screen-Shot-2022-02-13-at-12-59-06.png) -5. Send File ![Send File](https://i.ibb.co/XxNnsQ8/Screen-Shot-2022-02-13-at-12-59-14.png) -6. User Info ![User Info](https://i.ibb.co/BC0mNT7/Screen-Shot-2022-02-13-at-13-00-57.png) -7. User Avatar ![User Avatar](https://i.ibb.co/TkzPbLZ/Screen-Shot-2022-02-13-at-13-01-39.png) -8. User Privacy ![User My Privacy](https://i.ibb.co/RQcC5m9/Screen-Shot-2022-02-13-at-12-58-47.png) -9. User Group ![List Group](https://i.ibb.co/jfkgKdG/Screen-Shot-2022-05-12-at-21-12-06.png) -10. Auto Reply ![Auto Reply](https://i.ibb.co/D4rTytX/IMG-20220517-162500.jpg) +5. Send File ![Send File](https://i.ibb.co/nCwhysd/Screen-Shot-2022-05-22-at-13-43-16.png) +6. Send Video ![Send File](https://i.ibb.co/yBXsWXX/Screen-Shot-2022-05-22-at-13-43-24.png) +7. User Info ![User Info](https://i.ibb.co/BC0mNT7/Screen-Shot-2022-02-13-at-13-00-57.png) +8. User Avatar ![User Avatar](https://i.ibb.co/TkzPbLZ/Screen-Shot-2022-02-13-at-13-01-39.png) +9. User Privacy ![User My Privacy](https://i.ibb.co/RQcC5m9/Screen-Shot-2022-02-13-at-12-58-47.png) +10. User Group ![List Group](https://i.ibb.co/jfkgKdG/Screen-Shot-2022-05-12-at-21-12-06.png) +11. Auto Reply ![Auto Reply](https://i.ibb.co/D4rTytX/IMG-20220517-162500.jpg) ### Mac OS NOTE diff --git a/src/config/settings.go b/src/config/settings.go index 6956e2d..04049fd 100644 --- a/src/config/settings.go +++ b/src/config/settings.go @@ -3,7 +3,7 @@ package config type Browser string var ( - AppVersion string = "3.3.0" + AppVersion string = "3.3.1" AppPort string = "3000" AppDebug bool = false diff --git a/src/views/index.html b/src/views/index.html index aecec57..45f19de 100644 --- a/src/views/index.html +++ b/src/views/index.html @@ -94,7 +94,7 @@
Private -
Send Message
+
Send Message
Send any message to any whatsapp number
@@ -126,7 +126,9 @@ Private
Send Video
- Send video
mp4
up to + Send video +
mp4
+ up to
{{ .MaxVideoSize }}
@@ -169,7 +171,9 @@ Group
Send Video
- Send video
mp4
up to + Send video +
mp4
+ up to
{{ .MaxVideoSize }}
@@ -241,6 +245,25 @@ +
+ + +
+
+ +
+ + +
+
+
+ +
+ + +
+
-
- - -
@@ -278,6 +296,11 @@
+
+ + +
@@ -309,6 +332,25 @@
+
+ + +
+
+ +
+ + +
+
+
+ +
+ + +
+
@@ -605,6 +647,8 @@ data() { return { image_phone: '', + image_view_once: false, + image_compress: false, image_caption: '', image_type: 'user', } @@ -627,6 +671,8 @@ try { let payload = new FormData(); payload.append("phone", this.image_phone) + payload.append("view_once", this.image_view_once) + payload.append("compress", this.image_compress) payload.append("caption", this.image_caption) payload.append("image", $("#image_file")[0].files[0]) payload.append("type", this.image_type) @@ -649,6 +695,8 @@ }) }, sendImageReset() { + this.image_view_once = false; + this.image_compress = false; this.image_phone = ''; this.image_caption = ''; this.image_type = 'user'; @@ -660,6 +708,7 @@ const sendFile = { data() { return { + file_caption: '', file_type: 'user', file_phone: '', } @@ -681,6 +730,7 @@ return new Promise(async (resolve, reject) => { try { let payload = new FormData(); + payload.append("caption", this.file_caption) payload.append("phone", this.file_phone) payload.append("file", $("#file_file")[0].files[0]) payload.append("type", this.file_type) @@ -703,6 +753,7 @@ }) }, sendFileReset() { + this.file_caption = ''; this.file_phone = ''; this.file_type = 'user'; $("#file_file").val(''); @@ -713,6 +764,9 @@ const sendVideo = { data() { return { + video_caption: '', + video_view_once: false, + video_compress: false, video_type: 'user', video_phone: '', } @@ -735,6 +789,9 @@ try { let payload = new FormData(); payload.append("phone", this.video_phone) + payload.append("caption", this.video_caption) + payload.append("view_once", this.video_view_once) + payload.append("compress", this.video_compress) payload.append("video", $("#video_file")[0].files[0]) payload.append("type", this.video_type) let response = await axios.post(`${this.app_host}/send/video`, payload, { @@ -756,6 +813,9 @@ }) }, sendVideoReset() { + this.video_caption = ''; + this.video_view_once = false; + this.video_compress = false; this.video_phone = ''; this.video_type = 'user'; $("#video_file").val('');