refs #2429 Disable account context in filter settings when sns is pleroma
This commit is contained in:
parent
6b9b38e643
commit
908dd99d3d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue