refs #2429 Disable account context in filter settings when sns is pleroma

This commit is contained in:
AkiraFukushima 2021-05-22 15:14:43 +09:00
parent 6b9b38e643
commit 908dd99d3d
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
3 changed files with 16 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<template>
<div id="edit_filter">
<h2>{{ $t('settings.filters.edit.title') }}</h2>
<FilterForm v-model="filter" @cancel="cancel" @onSubmit="onSubmit" :loading="loading"> </FilterForm>
<FilterForm v-model="filter" @cancel="cancel" @onSubmit="onSubmit" :loading="loading" :sns="sns"> </FilterForm>
</div>
</template>
@ -17,6 +17,9 @@ export default {
...mapState('Settings/Filters/Edit', {
loading: state => state.loading
}),
...mapState('TimelineSpace', {
sns: state => state.sns
}),
filter: {
get() {
return this.$store.state.Settings.Filters.Edit.filter

View File

@ -1,7 +1,7 @@
<template>
<div id="new_filter">
<h2>{{ $t('settings.filters.new.title') }}</h2>
<FilterForm v-model="filter" @cancel="cancel" @onSubmit="onSubmit" :loading="loading"> </FilterForm>
<FilterForm v-model="filter" @cancel="cancel" @onSubmit="onSubmit" :loading="loading" :sns="sns"> </FilterForm>
</div>
</template>
@ -16,6 +16,9 @@ export default {
...mapState('Settings/Filters/New', {
loading: state => state.loading
}),
...mapState('TimelineSpace', {
sns: state => state.sns
}),
filter: {
get() {
return this.$store.state.Settings.Filters.New.filter

View File

@ -15,7 +15,7 @@
<el-checkbox label="notifications"></el-checkbox>
<el-checkbox label="public"></el-checkbox>
<el-checkbox label="thread"></el-checkbox>
<el-checkbox label="account"></el-checkbox>
<el-checkbox label="account" :disabled="accountDisabled()"></el-checkbox>
</el-checkbox-group>
</template>
</el-form-item>
@ -42,6 +42,10 @@ export default {
},
value: {
type: Object
},
sns: {
type: String,
default: 'mastodon'
}
},
data() {
@ -144,6 +148,9 @@ export default {
},
onSubmit() {
this.$emit('onSubmit')
},
accountDisabled() {
return this.sns === 'pleroma'
}
}
}