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
Merge requests
!117
Link enabling registrations and invites in settings
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Link enabling registrations and invites in settings
fix/link-registrations-and-invites
into
develop
Overview
0
Commits
2
Pipelines
1
Changes
5
Merged
Angelina Filippova
requested to merge
fix/link-registrations-and-invites
into
develop
5 years ago
Overview
0
Commits
2
Pipelines
1
Changes
5
Expand
Closes
#97 (closed)
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
e2f38605
2 commits,
5 years ago
5 files
+
91
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
src/views/settings/components/inputComponents/RegInvitesInput.vue
0 → 100644
+
74
−
0
Options
<
template
>
<el-switch
:value=
"data[setting.key]"
:data-search=
"setting.key"
class=
"switch-input"
@
change=
"updateSetting($event, settingGroup.group, settingGroup.key, setting.key, setting.type)"
/>
</
template
>
<
script
>
export
default
{
name
:
'
RegInvitesInput
'
,
props
:
{
data
:
{
type
:
[
Object
,
Array
],
default
:
function
()
{
return
{}
}
},
setting
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
},
settingGroup
:
{
type
:
Object
,
default
:
function
()
{
return
{}
}
}
},
methods
:
{
updateSetting
(
value
,
group
,
key
,
input
,
type
)
{
const
registrationsOpen
=
this
.
$store
.
state
.
settings
.
settings
[
group
][
key
][
'
:registrations_open
'
]
const
invitesEnabled
=
this
.
$store
.
state
.
settings
.
settings
[
group
][
key
][
'
:invites_enabled
'
]
if
(
input
===
'
:registrations_open
'
&&
value
&&
invitesEnabled
)
{
this
.
$confirm
(
'
Enabling this setting requires invites to be disabled. Are you sure you want to open registrations?
'
,
'
Warning
'
,
{
confirmButtonText
:
'
OK
'
,
cancelButtonText
:
'
Cancel
'
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'
UpdateSettings
'
,
{
group
,
key
,
input
,
value
,
type
})
this
.
$store
.
dispatch
(
'
UpdateSettings
'
,
{
group
,
key
,
input
:
'
:invites_enabled
'
,
value
:
false
,
type
})
this
.
$store
.
dispatch
(
'
UpdateState
'
,
{
group
,
key
,
input
,
value
})
this
.
$store
.
dispatch
(
'
UpdateState
'
,
{
group
,
key
,
input
:
'
:invites_enabled
'
,
value
:
false
})
})
}
else
if
(
input
===
'
:invites_enabled
'
&&
value
&&
registrationsOpen
)
{
this
.
$confirm
(
'
Enabling this setting requires registrations to be disabled. Are you sure you want to enable invitations?
'
,
'
Warning
'
,
{
confirmButtonText
:
'
OK
'
,
cancelButtonText
:
'
Cancel
'
,
type
:
'
warning
'
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'
UpdateSettings
'
,
{
group
,
key
,
input
,
value
,
type
})
this
.
$store
.
dispatch
(
'
UpdateSettings
'
,
{
group
,
key
,
input
:
'
:registrations_open
'
,
value
:
false
,
type
})
this
.
$store
.
dispatch
(
'
UpdateState
'
,
{
group
,
key
,
input
,
value
})
this
.
$store
.
dispatch
(
'
UpdateState
'
,
{
group
,
key
,
input
:
'
:registrations_open
'
,
value
:
false
})
})
}
else
{
this
.
$store
.
dispatch
(
'
UpdateSettings
'
,
{
group
,
key
,
input
,
value
,
type
})
this
.
$store
.
dispatch
(
'
UpdateState
'
,
{
group
,
key
,
input
,
value
})
}
}
}
}
</
script
>
<
style
rel=
'stylesheet/scss'
lang=
'scss'
>
@import
'../../styles/main'
;
@include
settings
</
style
>
Loading