Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
pleroma-fe
Commits
20fc2593
Commit
20fc2593
authored
5 years ago
by
HJ
Browse files
Options
Downloads
Patches
Plain Diff
fixed default values for multi-choice configurations, should also fix warnings
parent
39b71e5d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1028
`master` refresh with `develop`
,
!960
Settings refactor
Pipeline
#17882
failed
5 years ago
Stage: lint
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/settings/settings.js
+15
-0
15 additions, 0 deletions
src/components/settings/settings.js
src/components/settings/settings.vue
+4
-4
4 additions, 4 deletions
src/components/settings/settings.vue
with
19 additions
and
4 deletions
src/components/settings/settings.js
+
15
−
0
View file @
20fc2593
...
...
@@ -10,6 +10,11 @@ import { instanceDefaultProperties, defaultState as configDefaultState } from '.
const
pleromaFeCommitUrl
=
'
https://git.pleroma.social/pleroma/pleroma-fe/commit/
'
const
pleromaBeCommitUrl
=
'
https://git.pleroma.social/pleroma/pleroma/commit/
'
const
multiChoiceProperties
=
[
'
postContentType
'
,
'
subjectLineBehavior
'
]
const
settings
=
{
data
()
{
const
instance
=
this
.
$store
.
state
.
instance
...
...
@@ -51,6 +56,16 @@ const settings = {
},
// Getting localized values for instance-default properties
...
instanceDefaultProperties
.
filter
(
key
=>
multiChoiceProperties
.
includes
(
key
))
.
map
(
key
=>
[
key
+
'
DefaultValue
'
,
function
()
{
return
this
.
$store
.
getters
.
instanceDefaultConfig
[
key
]
}
])
.
reduce
((
acc
,
[
key
,
value
])
=>
({
...
acc
,
[
key
]:
value
}),
{}),
...
instanceDefaultProperties
.
filter
(
key
=>
!
multiChoiceProperties
.
includes
(
key
))
.
map
(
key
=>
[
key
+
'
LocalizedValue
'
,
function
()
{
...
...
This diff is collapsed.
Click to expand it.
src/components/settings/settings.vue
+
4
−
4
View file @
20fc2593
...
...
@@ -141,15 +141,15 @@
>
<option
value=
"email"
>
{{ $t('settings.subject_line_email') }}
{{ subjectLineBehavior
Localized
Value == 'email' ? $t('settings.instance_default_simple') : '' }}
{{ subjectLineBehavior
Default
Value == 'email' ? $t('settings.instance_default_simple') : '' }}
</option>
<option
value=
"masto"
>
{{ $t('settings.subject_line_mastodon') }}
{{ subjectLineBehavior
Localized
Value == 'mastodon' ? $t('settings.instance_default_simple') : '' }}
{{ subjectLineBehavior
Default
Value == 'mastodon' ? $t('settings.instance_default_simple') : '' }}
</option>
<option
value=
"noop"
>
{{ $t('settings.subject_line_noop') }}
{{ subjectLineBehavior
Localized
Value == 'noop' ? $t('settings.instance_default_simple') : '' }}
{{ subjectLineBehavior
Default
Value == 'noop' ? $t('settings.instance_default_simple') : '' }}
</option>
</select>
<i
class=
"icon-down-open"
/>
...
...
@@ -173,7 +173,7 @@
:value=
"postFormat"
>
{{ $t(`post_status.content_type["${postFormat}"]`) }}
{{ postContentType
Localized
Value === postFormat ? $t('settings.instance_default_simple') : '' }}
{{ postContentType
Default
Value === postFormat ? $t('settings.instance_default_simple') : '' }}
</option>
</select>
<i
class=
"icon-down-open"
/>
...
...
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