summaryrefslogtreecommitdiff
path: root/http-client
diff options
context:
space:
mode:
Diffstat (limited to 'http-client')
-rw-r--r--http-client/client.go12
-rw-r--r--http-client/main.go2
2 files changed, 8 insertions, 6 deletions
diff --git a/http-client/client.go b/http-client/client.go
index d448b8c..57c4fad 100644
--- a/http-client/client.go
+++ b/http-client/client.go
@@ -7,7 +7,7 @@ import (
"errors"
"fmt"
"fyne.io/fyne/v2/data/binding"
- "io"
+ "io/ioutil"
"net/http"
"strings"
"sync"
@@ -78,7 +78,7 @@ func register(user UserData, serverKey string) (Response, error) {
return resp, err
}
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
_ = json.Unmarshal(body, &resp)
if httpResp.StatusCode == http.StatusOK {
@@ -98,7 +98,7 @@ func tryAuth(user UserData) (bool, error) {
return false, err
}
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
_ = json.Unmarshal(body, &resp)
if httpResp.StatusCode == http.StatusOK {
@@ -118,7 +118,7 @@ func getUserKey(user UserData, checkedUser string) (string, error) {
return "", err
}
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
_ = json.Unmarshal(body, &resp)
if httpResp.StatusCode == http.StatusOK {
@@ -170,7 +170,7 @@ func runClient(user UserData) {
lastPoll = time.Now().UnixNano()
if httpResp.StatusCode == http.StatusOK {
- body, _ := io.ReadAll(httpResp.Body)
+ body, _ := ioutil.ReadAll(httpResp.Body)
var resp Response
_ = json.Unmarshal(body, &resp)
var signedMessages []string
@@ -207,7 +207,7 @@ func runClient(user UserData) {
storage.Unlock()
} else {
fmt.Println(httpResp.StatusCode)
- ae, _ := io.ReadAll(httpResp.Body)
+ ae, _ := ioutil.ReadAll(httpResp.Body)
fmt.Println(string(ae))
}
diff --git a/http-client/main.go b/http-client/main.go
index f8ecb4e..7234bfc 100644
--- a/http-client/main.go
+++ b/http-client/main.go
@@ -10,6 +10,7 @@ import (
"fyne.io/fyne/v2/data/binding"
"fyne.io/fyne/v2/dialog"
"fyne.io/fyne/v2/layout"
+ "fyne.io/fyne/v2/theme"
"fyne.io/fyne/v2/widget"
"image/color"
"regexp"
@@ -287,6 +288,7 @@ func startLayout(window fyne.Window, user UserData) {
func main() {
myApp := app.New()
+ myApp.Settings().SetTheme(theme.DarkTheme())
window := myApp.NewWindow("")
window.Resize(fyne.Size{Width: 640, Height: 480})
var user UserData