Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
matrix.to
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
prp
matrix.to
Commits
9395d7f3
Commit
9395d7f3
authored
4 years ago
by
Bruno Windels
Browse files
Options
Downloads
Patches
Plain Diff
fix ask every time not being respected for no preview option
parent
9712ecf9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/open/ServerConsentView.js
+10
-5
10 additions, 5 deletions
src/open/ServerConsentView.js
src/open/ServerConsentViewModel.js
+2
-2
2 additions, 2 deletions
src/open/ServerConsentViewModel.js
with
12 additions
and
7 deletions
src/open/ServerConsentView.js
+
10
−
5
View file @
9395d7f3
...
...
@@ -19,13 +19,13 @@ import {ClientListView} from "./ClientListView.js";
import
{
PreviewView
}
from
"
../preview/PreviewView.js
"
;
export
class
ServerConsentView
extends
TemplateView
{
render
(
t
,
vm
)
{
render
(
t
,
vm
)
{
const
useAnotherServer
=
t
.
button
({
className
:
"
text
"
,
onClick
:
()
=>
vm
.
setShowServers
()},
"
use another server
"
);
const
continueWithoutPreview
=
t
.
button
({
className
:
"
text
"
,
onClick
:
()
=>
vm
.
continueWithoutConsent
()
onClick
:
()
=>
vm
.
continueWithoutConsent
(
this
.
_askEveryTimeChecked
)
},
"
continue without a preview
"
);
return
t
.
div
({
className
:
"
ServerConsentView
"
},
[
t
.
p
([
...
...
@@ -48,7 +48,7 @@ export class ServerConsentView extends TemplateView {
continueWithoutPreview
,
"
.
"
]),
t
.
form
({
action
:
"
#
"
,
onSubmit
:
evt
=>
this
.
_onSubmit
(
evt
)},
[
t
.
form
({
action
:
"
#
"
,
id
:
"
serverConsentForm
"
,
onSubmit
:
evt
=>
this
.
_onSubmit
(
evt
)},
[
t
.
mapView
(
vm
=>
vm
.
showSelectServer
,
show
=>
show
?
new
ServerOptions
(
vm
)
:
null
),
t
.
div
({
className
:
"
actions
"
},
[
t
.
label
([
t
.
input
({
type
:
"
checkbox
"
,
name
:
"
askEveryTime
"
}),
"
Ask every time
"
]),
...
...
@@ -60,8 +60,13 @@ export class ServerConsentView extends TemplateView {
_onSubmit
(
evt
)
{
evt
.
preventDefault
();
const
{
askEveryTime
}
=
evt
.
target
.
elements
;
this
.
value
.
continueWithSelection
(
askEveryTime
.
checked
);
this
.
value
.
continueWithSelection
(
this
.
_askEveryTimeChecked
);
}
get
_askEveryTimeChecked
()
{
const
form
=
document
.
getElementById
(
"
serverConsentForm
"
);
const
{
askEveryTime
}
=
form
.
elements
;
return
askEveryTime
.
checked
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/open/ServerConsentViewModel.js
+
2
−
2
View file @
9395d7f3
...
...
@@ -64,8 +64,8 @@ export class ServerConsentViewModel extends ViewModel {
this
.
done
();
}
continueWithoutConsent
()
{
this
.
preferences
.
setHomeservers
([]);
continueWithoutConsent
(
askEveryTime
)
{
this
.
preferences
.
setHomeservers
([]
,
!
askEveryTime
);
this
.
done
();
}
}
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