13 changed files with 99 additions and 99 deletions
-
3src/cmd/root.go
-
2src/go.mod
-
2src/go.sum
-
2src/views/components/AccountAvatar.js
-
4src/views/components/AccountGroup.js
-
2src/views/components/AccountPrivacy.js
-
2src/views/components/AccountUserInfo.js
-
2src/views/components/AppLogin.js
-
38src/views/components/AppLogout.js
-
37src/views/components/AppReconnect.js
-
2src/views/components/SendFile.js
-
2src/views/components/SendMessage.js
-
100src/views/index.html
@ -0,0 +1,38 @@ |
|||||
|
export default { |
||||
|
name: 'AppLogout', |
||||
|
methods: { |
||||
|
async handleSubmit() { |
||||
|
try { |
||||
|
await this.submitApi() |
||||
|
showSuccessInfo("Logout success") |
||||
|
|
||||
|
// fetch devices
|
||||
|
this.$emit('reload-devices') |
||||
|
} catch (err) { |
||||
|
showErrorInfo(err) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
async submitApi() { |
||||
|
try { |
||||
|
await http.get(`/app/logout`) |
||||
|
} catch (error) { |
||||
|
if (error.response) { |
||||
|
throw Error(error.response.data.message) |
||||
|
} |
||||
|
throw Error(error.message) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
template: `
|
||||
|
<div class="green card" @click="handleSubmit" style="cursor: pointer"> |
||||
|
<div class="content"> |
||||
|
<div class="header">Logout</div> |
||||
|
<div class="description"> |
||||
|
Remove your login session in application |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
`
|
||||
|
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
export default { |
||||
|
name: 'AppReconnect', |
||||
|
methods: { |
||||
|
async handleSubmit() { |
||||
|
try { |
||||
|
await this.submitApi() |
||||
|
showSuccessInfo("Reconnect success") |
||||
|
|
||||
|
// fetch devices
|
||||
|
this.$emit('reload-devices') |
||||
|
} catch (err) { |
||||
|
showErrorInfo(err) |
||||
|
} |
||||
|
}, |
||||
|
async submitApi() { |
||||
|
try { |
||||
|
await window.http.get(`/app/reconnect`) |
||||
|
} catch (error) { |
||||
|
if (error.response) { |
||||
|
throw Error(error.response.data.message) |
||||
|
} |
||||
|
throw Error(error.message) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
template: `
|
||||
|
<div class="green card" @click="handleSubmit" style="cursor: pointer"> |
||||
|
<div class="content"> |
||||
|
<div class="header">Reconnect</div> |
||||
|
<div class="description"> |
||||
|
Reconnect to whatsapp server, please do this if your api doesn't work or your application is down or |
||||
|
restart |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
`
|
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue