Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
eccb0457
Commit
eccb0457
authored
5 years ago
by
Angelina Filippova
Browse files
Options
Downloads
Patches
Plain Diff
Render WebPush tab with data from description
parent
e1cebdc6
No related branches found
No related tags found
1 merge request
!65
Update server configuration
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/views/settings/components/WebPush.vue
+11
-19
11 additions, 19 deletions
src/views/settings/components/WebPush.vue
with
11 additions
and
19 deletions
src/views/settings/components/WebPush.vue
+
11
−
19
View file @
eccb0457
<
template
>
<
template
>
<el-form
v-if=
"!loading"
ref=
"vapidDetails"
:model=
"vapidDetails"
:label-width=
"labelWidth"
>
<el-form
v-if=
"!loading"
ref=
"vapidDetailsData"
:model=
"vapidDetailsData"
:label-width=
"labelWidth"
>
<el-form-item
label=
"Subject"
>
<setting
:settings-group=
"vapidDetails"
:data=
"vapidDetailsData"
/>
<el-input
:value=
"vapidDetails.subject"
@
input=
"updateSetting($event, 'vapid_details', 'subject')"
/>
<p
class=
"expl"
>
A mailto link for the administrative contact. It’s best if this email is not a personal email address,
but rather a group email so that if a person leaves an organization, is unavailable for an extended period,
or otherwise can’t respond, someone else on the list can.
</p>
</el-form-item>
<el-form-item
label=
"Public key"
>
<el-input
:value=
"vapidDetails.public_key"
@
input=
"updateSetting($event, 'vapid_details', 'public_key')"
/>
<p
class=
"expl"
>
VAPID public key
</p>
</el-form-item>
<el-form-item
label=
"Private key"
>
<el-input
:value=
"vapidDetails.private_key"
@
input=
"updateSetting($event, 'vapid_details', 'private_key')"
/>
<p
class=
"expl"
>
VAPID private key
</p>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
Submit
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
Submit
</el-button>
</el-form-item>
</el-form-item>
...
@@ -23,12 +10,14 @@
...
@@ -23,12 +10,14 @@
<
script
>
<
script
>
import
i18n
from
'
@/lang
'
import
i18n
from
'
@/lang
'
import
{
mapGetters
}
from
'
vuex
'
import
{
mapGetters
}
from
'
vuex
'
import
Setting
from
'
./Setting
'
export
default
{
export
default
{
name
:
'
WebPush
'
,
name
:
'
WebPush
'
,
components
:
{
Setting
},
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
'
vapidDetail
s
'
'
setting
s
'
]),
]),
isMobile
()
{
isMobile
()
{
return
this
.
$store
.
state
.
app
.
device
===
'
mobile
'
return
this
.
$store
.
state
.
app
.
device
===
'
mobile
'
...
@@ -38,12 +27,15 @@ export default {
...
@@ -38,12 +27,15 @@ export default {
},
},
loading
()
{
loading
()
{
return
this
.
$store
.
state
.
settings
.
loading
return
this
.
$store
.
state
.
settings
.
loading
},
vapidDetails
()
{
return
this
.
settings
.
description
.
find
(
setting
=>
setting
.
key
===
'
:vapid_details
'
)
},
vapidDetailsData
()
{
return
this
.
settings
.
settings
[
'
:vapid_details
'
]
}
}
},
},
methods
:
{
methods
:
{
updateSetting
(
value
,
tab
,
input
)
{
this
.
$store
.
dispatch
(
'
UpdateSettings
'
,
{
tab
,
data
:
{
[
input
]:
value
}})
},
async
onSubmit
()
{
async
onSubmit
()
{
try
{
try
{
await
this
.
$store
.
dispatch
(
'
SubmitChanges
'
)
await
this
.
$store
.
dispatch
(
'
SubmitChanges
'
)
...
...
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