diff --git a/backend/login.go b/backend/login.go index 677e5bb..407c284 100644 --- a/backend/login.go +++ b/backend/login.go @@ -30,6 +30,15 @@ func (a *App) GetQrcode() (qrCode QrCodeResp, err error) { if err != nil { return } + if token == `{"message":"invalid csrf token"}` { + app.Logout() + services.CsrfToken = "" + _, _ = Instance.GetHomeInitialState() + token, err = Instance.LoginAccessToken() + if err != nil { + return + } + } code, err := Instance.GetQrcode(token) if err != nil { return diff --git a/build/darwin/Info.dev.plist b/build/darwin/Info.dev.plist index 02e7358..ac81d3b 100644 --- a/build/darwin/Info.dev.plist +++ b/build/darwin/Info.dev.plist @@ -23,6 +23,7 @@ true NSHumanReadableCopyright {{.Info.Copyright}} + NSExceptionAllowsInsecureHTTPLoads NSAppTransportSecurity NSAllowsLocalNetworking diff --git a/build/darwin/Info.plist b/build/darwin/Info.plist index 02e7358..ac81d3b 100644 --- a/build/darwin/Info.plist +++ b/build/darwin/Info.plist @@ -23,6 +23,7 @@ true NSHumanReadableCopyright {{.Info.Copyright}} + NSExceptionAllowsInsecureHTTPLoads NSAppTransportSecurity NSAllowsLocalNetworking diff --git a/frontend/src/components/Menu.vue b/frontend/src/components/Menu.vue index 824cce4..9048831 100644 --- a/frontend/src/components/Menu.vue +++ b/frontend/src/components/Menu.vue @@ -20,7 +20,6 @@ const activeIndex = computed(() => { return route.path }) const handleSelect = (key: string, keyPath: string[]) => { - // this.activeIndex = this.$route.path // console.log(key, keyPath) } \ No newline at end of file diff --git a/frontend/src/components/NotesItem.vue b/frontend/src/components/NotesItem.vue index bf1cfef..86751d1 100644 --- a/frontend/src/components/NotesItem.vue +++ b/frontend/src/components/NotesItem.vue @@ -99,8 +99,8 @@ + return v + })" :initial-index="0" fit="cover" :style="item.s_part.images?.length>1?'height:245px;width: 32%;':'width: 32%;'"/> @@ -162,15 +162,9 @@