Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
openvpn-app
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cloudron
openvpn-app
Commits
0f350df7
Commit
0f350df7
authored
Sep 24, 2020
by
Johannes Zellner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve busy state
parent
bf50461f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
frontend/index.html
frontend/index.html
+2
-2
frontend/js/app.js
frontend/js/app.js
+6
-4
No files found.
frontend/index.html
View file @
0f350df7
...
...
@@ -28,7 +28,7 @@
<el-button
id=
"logoutButton"
size=
"small"
v-show=
"user"
@
click=
"logout()"
>
Logout
</el-button>
</header>
<el-dialog
title=
"Settings"
:visible.sync=
"settings.visible"
width=
"30%"
:close-on-click-modal=
"false"
>
<el-dialog
title=
"Settings"
:visible.sync=
"settings.visible"
width=
"30%"
>
<el-form
ref=
"form"
:model=
"settings.data"
label-position=
"left"
label-width=
"120px"
size=
"small"
>
<el-form-item
label=
"Network Address"
>
<el-input
v-model=
"settings.data.networkAddress"
></el-input>
...
...
@@ -42,7 +42,7 @@
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"onSettingsClose()"
>
Cancel
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"onSettingsSave()"
>
Save and Restart
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"onSettingsSave()"
:loading=
"settings.busy"
>
Save and Restart
</el-button>
</span>
</el-dialog>
...
...
frontend/js/app.js
View file @
0f350df7
...
...
@@ -15,8 +15,9 @@ window.app = new Vue({
loginForm
:
{
username
:
''
,
password
:
''
},
connectedClients
:
{},
settings
:
{
visible
:
false
,
data
:
{}
busy
:
false
,
visible
:
false
,
data
:
{}
}
},
computed
:
{
...
...
@@ -200,14 +201,15 @@ window.app = new Vue({
}
if
(
error
)
return
console
.
error
(
error
)
console
.
log
(
result
.
body
.
settings
)
this
.
settings
.
data
=
result
.
body
.
settings
})
},
onSettingsSave
()
{
this
.
settings
.
busy
=
true
;
superagent
.
post
(
'
/api/settings
'
,
{
settings
:
this
.
settings
.
data
})
.
end
((
error
,
result
)
=>
{
this
.
settings
.
busy
=
false
;
if
(
result
&&
result
.
statusCode
===
401
)
{
this
.
$nextTick
(()
=>
this
.
$refs
.
passwordInput
.
focus
())
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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