refs #574 Add use marker settings for mentions

This commit is contained in:
AkiraFukushima 2022-04-04 23:22:54 +09:00
parent 0ef00ad939
commit 7596476685
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
3 changed files with 16 additions and 2 deletions

View File

@ -115,7 +115,8 @@
"use_marker": {
"title": "Load the timeline from the last reading position",
"home": "Home",
"notifications": "Notifications"
"notifications": "Notifications",
"mentions": "Mentions"
}
},
"filters": {

View File

@ -24,6 +24,9 @@
<el-form-item for="marker_notifications" :label="$t('settings.timeline.use_marker.notifications')">
<el-switch v-model="marker_notifications" id="marker_notifications" />
</el-form-item>
<el-form-item for="marker_mentions" :label="$t('settings.timeline.use_marker.mentions')">
<el-switch v-model="marker_mentions" id="marker_mentions" />
</el-form-item>
</el-form>
</div>
</template>
@ -81,6 +84,16 @@ export default {
notifications: value
})
}
},
marker_mentions: {
get() {
return this.$store.state.Settings.Timeline.setting.useMarker.mentions
},
set(value) {
this.$store.dispatch('Settings/Timeline/changeUseMarker', {
mentions: value
})
}
}
},
async created() {

View File

@ -4,7 +4,7 @@ import { MyWindow } from '~/src/types/global'
import { Setting, UnreadNotification, Timeline as TimelineSetting, UseMarker } from '~src/types/setting'
import { DefaultSetting } from '~/src/constants/initializer/setting'
const win = (window as any) as MyWindow
const win = window as any as MyWindow
export type TimelineState = {
setting: TimelineSetting