From 53f7152ea15dfeac559c69606cb147e9811076f7 Mon Sep 17 00:00:00 2001 From: Aldino Kemal Date: Sun, 13 Feb 2022 13:12:59 +0700 Subject: [PATCH] feat(add-user-interface) (#1) * feat(add-user-interface): add ui for wa service * feat(add-user-interface): add sample sendFile * feat: make success message clear * fix: change error more clear * feat(add-user-interface): add sendImage * feat(add-user-interface): add ui group list * feat: set device id as string * feat(add-user-interface): add ui my privacy * feat(add-user-interface): rearrange card position * feat(add-user-interface): add get avatar ui * fix: remove array in fetch user info * feat(add-user-interface): change mssage avatar OK * feat(add-user-interface): add ui user info * feat(add-user-interface): change host change host and fix reset phone * feat(add-user-interface): add reset user info phone * feat(add-user-interface): update docs --- .gitignore | 3 +- main.go | 2 +- readme.md | 28 +- views/index.html | 787 ++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 807 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 337cce7..26d25f5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ tmp .DS_Store history-*.json main -main.exe \ No newline at end of file +main.exe +*.jpe \ No newline at end of file diff --git a/main.go b/main.go index 3830367..5444052 100644 --- a/main.go +++ b/main.go @@ -45,7 +45,7 @@ func main() { userController.Route(app) app.Get("/", func(ctx *fiber.Ctx) error { - return ctx.JSON(map[string]interface{}{"Status": "Ok"}) + return ctx.Render("index", fiber.Map{"AppHost": "http://localhost:3000"}) }) err := app.Listen(":3000") diff --git a/readme.md b/readme.md index 1a53ce7..2a9be1b 100644 --- a/readme.md +++ b/readme.md @@ -21,17 +21,17 @@ You can fork or edit this source code ! -Current API +### Current API -| Feature | Menu | Method | URL | Payload | -|---------|-------------------------|--------|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| ✅ | Login | GET | /app/login | | -| ✅ | Logout | GET | /app/logout | | -| ✅ | Reconnect | GET | /app/reconnect | | +| Feature | Menu | Method | URL | Payload | +|---------|-------------------------|--------|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ✅ | Login | GET | /app/login | | +| ✅ | Logout | GET | /app/logout | | +| ✅ | Reconnect | GET | /app/reconnect | | | ✅ | User Info | GET | /user/info |
Param Type Type Example
phonestringquerystring6289685024099
| | ✅ | User Avatar | GET | /user/avatar |
Param Type Type Example
phonestringquerystring6289685024099
| -| ✅ | User My Group List | GET | /user/my/groups | | -| ✅ | User My Privacy Setting | GET | /user/my/privacy | | +| ✅ | User My Group List | GET | /user/my/groups | | +| ✅ | User My Privacy Setting | GET | /user/my/privacy | | | ✅ | Send Message (Text) | POST | /send/message |
Param Type Type Example
phonestringform-data6289685024099
messagestringform-dataHello guys this is testing
| | ✅ | Send Message (Image) | POST | /send/image |
Param Type Type Example
phonestringform-data6289685024099
captionstringform-dataHello guys this is caption
view_onceboolform-datafalse
imagebinaryform-dataimage/jpg,image/jpeg,image/png
| | ✅ | Send Message (File) | POST | /send/file |
ParamTypeTypeExample
phonestringform-data6289685024099
filebinaryform-dataany (max: 10MB)
| @@ -42,6 +42,18 @@ Current API ❌ = Not Available Yet ``` +### App User Interface + +1. Homepage ![Homepage](https://i.ibb.co/gWnzy2F/Screen-Shot-2022-02-13-at-12-55-39.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) +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) +6. User Avatar ![User Avatar](https://i.ibb.co/TkzPbLZ/Screen-Shot-2022-02-13-at-13-01-39.png) +7. User Privacy ![User My Privacy](https://i.ibb.co/RQcC5m9/Screen-Shot-2022-02-13-at-12-58-47.png) +8. User Group ![List Group](https://i.ibb.co/GM9fhQD/Screen-Shot-2022-02-13-at-12-57-19.png) + ### Mac OS NOTE - Please do this if you have an error (invalid flag in pkg-config --cflags: -Xpreprocessor) diff --git a/views/index.html b/views/index.html index 2d68fd9..76aaefc 100644 --- a/views/index.html +++ b/views/index.html @@ -1,10 +1,791 @@ - + - + + + + + + + + + + + + Whatsapp Web Multi + + -

Hello

+
+

[[ app_name ]]

+ +

Features

+
+
+
+
Login
+
App
+
+ Scan your QRCode and you can use all this API feature +
+
+
+
+
+
Logout
+
App
+
+ Remove your login session in application +
+
+
+
+
+
Reconnect
+
App
+
+ Reconnect to whatsapp server, please do this if your api doesn't work or your application is down or + restart +
+
+
+
+ +
+
+
+
Send Message (Text)
+
App
+
+ Send any message to any +
indonesian
+ whatsapp number +
+
+
+
+
+
Send Message (Image)
+
App
+
+ Send image with +
jpg/jpeg/png
+ type +
+
+
+
+
+
Send Message (File)
+
App
+
+ Send any file up to +
10MB
+
+
+
+
+ +
+
+
+
User Info
+
App
+
+ You can search someone user info by phone +
+
+
+
+
+
User Avatar
+
App
+
+ You can search someone avatar by phone +
+
+
+
+
+
User List Groups
+
App
+
+ Display all groups you joined +
+
+
+
+
+
User Privacy Setting
+
App
+
+ Get your privacy settings +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + \ No newline at end of file