Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
World
Read It Later
Commits
6f20e1a9
Commit
6f20e1a9
authored
Feb 05, 2020
by
Bilal Elmoussaoui
Browse files
login: show an error when the credentials are incorrect
parent
830e6492
Pipeline
#149445
passed with stages
in 18 minutes and 13 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/application.rs
View file @
6f20e1a9
...
...
@@ -243,6 +243,7 @@ impl Application {
}
}
Err
(
err
)
=>
{
send!
(
sender
,
Action
::
Notify
(
"Failed to log in"
.to_string
()));
send!
(
sender
,
Action
::
SetView
(
View
::
Syncing
(
false
)));
error!
(
"Failed to setup a new client from current config: {}"
,
err
);
}
...
...
src/models/client_manager.rs
View file @
6f20e1a9
...
...
@@ -91,9 +91,8 @@ impl ClientManager {
pub
async
fn
set_config
(
&
mut
self
,
config
:
wallabag_api
::
types
::
Config
)
->
Result
<
(),
Error
>
{
let
client
=
Client
::
new
(
config
);
self
.client
=
Some
(
Arc
::
new
(
Mutex
::
new
(
client
)));
if
let
Ok
(
user
)
=
self
.fetch_user
()
.await
{
self
.user
.replace
(
Arc
::
new
(
Mutex
::
new
(
user
)));
}
let
user
=
self
.fetch_user
()
.await
?
;
self
.user
.replace
(
Arc
::
new
(
Mutex
::
new
(
user
)));
Ok
(())
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment