From 7596476685e8f172840ce99a14d794114e0c5a3d Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Mon, 4 Apr 2022 23:22:54 +0900 Subject: [PATCH] refs #574 Add use marker settings for mentions --- src/config/locales/en/translation.json | 3 ++- src/renderer/components/Settings/Timeline.vue | 13 +++++++++++++ src/renderer/store/Settings/Timeline.ts | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/config/locales/en/translation.json b/src/config/locales/en/translation.json index 117c9761..e9d6ce9a 100644 --- a/src/config/locales/en/translation.json +++ b/src/config/locales/en/translation.json @@ -115,7 +115,8 @@ "use_marker": { "title": "Load the timeline from the last reading position", "home": "Home", - "notifications": "Notifications" + "notifications": "Notifications", + "mentions": "Mentions" } }, "filters": { diff --git a/src/renderer/components/Settings/Timeline.vue b/src/renderer/components/Settings/Timeline.vue index c9c7c97a..8c08fcd8 100644 --- a/src/renderer/components/Settings/Timeline.vue +++ b/src/renderer/components/Settings/Timeline.vue @@ -24,6 +24,9 @@ + + + @@ -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() { diff --git a/src/renderer/store/Settings/Timeline.ts b/src/renderer/store/Settings/Timeline.ts index 5860b6cb..2698be0c 100644 --- a/src/renderer/store/Settings/Timeline.ts +++ b/src/renderer/store/Settings/Timeline.ts @@ -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