Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Merlin
bitmask-vpn
Commits
a40434d4
Unverified
Commit
a40434d4
authored
4 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[feat] do not show password field if allowEmptyPass is set
parent
6ba46743
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gui/qml/LoginDialog.qml
+1
-0
1 addition, 0 deletions
gui/qml/LoginDialog.qml
gui/qml/main.qml
+18
-3
18 additions, 3 deletions
gui/qml/main.qml
with
19 additions
and
3 deletions
gui/qml/LoginDialog.qml
+
1
−
0
View file @
a40434d4
...
...
@@ -18,6 +18,7 @@ Dialog {
id
:
password
placeholderText
:
qsTr
(
"
password
"
)
echoMode
:
TextInput
.
PasswordEchoOnEdit
visible
:
!
allowEmptyPass
}
}
...
...
This diff is collapsed.
Click to expand it.
gui/qml/main.qml
+
18
−
3
View file @
a40434d4
...
...
@@ -11,6 +11,7 @@ ApplicationWindow {
property
var
ctx
property
var
loginDone
property
var
allowEmptyPass
Connections
{
target
:
jsonModel
...
...
@@ -46,8 +47,20 @@ ApplicationWindow {
}
function
showInitFailure
(
msg
)
{
initFailure
.
text
=
msg
initFailure
.
visible
=
true
initFailure
.
text
=
msg
initFailure
.
visible
=
true
}
function
shouldAllowEmptyPass
()
{
let
obj
=
JSON
.
parse
(
providers
.
getJson
())
let
active
=
obj
[
'
default
'
]
let
allProviders
=
obj
[
'
providers
'
]
for
(
let
i
=
0
;
i
<
allProviders
.
length
;
i
++
)
{
if
(
allProviders
[
i
][
'
name
'
]
===
active
)
{
return
(
allProviders
[
i
][
'
authEmptyPass
'
]
===
'
true
'
)
}
}
return
false
}
Component.onCompleted
:
{
...
...
@@ -59,9 +72,11 @@ ApplicationWindow {
Loaders as a placeholder for all the many dialogs, or to load
a nice splash screen etc... */
console
.
debug
(
"
Pre-seeded providers:
"
);
console
.
debug
(
"
DEBUG:
Pre-seeded providers:
"
);
console
.
debug
(
providers
.
getJson
());
allowEmptyPass
=
shouldAllowEmptyPass
()
app
.
visible
=
true
;
show
();
hide
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment