From 3c581e5b093a804010ee82635310e0f3f8364c04 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 6 May 2020 09:40:07 +0900 Subject: [PATCH] refactor(client): Export default reaction setting and use it --- src/client/pages/my-settings/reaction.vue | 3 ++- src/client/store.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/pages/my-settings/reaction.vue b/src/client/pages/my-settings/reaction.vue index b2df3f023..bb9eab1e7 100644 --- a/src/client/pages/my-settings/reaction.vue +++ b/src/client/pages/my-settings/reaction.vue @@ -23,6 +23,7 @@ import MkButton from '../../components/ui/button.vue'; import MkReactionPicker from '../../components/reaction-picker.vue'; import i18n from '../../i18n'; import { emojiRegexWithCustom } from '../../../misc/emoji-regex'; +import { defaultSettings } from '../../store'; export default Vue.extend({ i18n, @@ -70,7 +71,7 @@ export default Vue.extend({ }, setDefault() { - this.reactions = '👍❤😆🤔😮🎉💢😥😇🍮'; + this.reactions = defaultSettings.reactions; }, async chooseEmoji(ev) { diff --git a/src/client/store.ts b/src/client/store.ts index 0b596ba41..3635e21f1 100644 --- a/src/client/store.ts +++ b/src/client/store.ts @@ -3,7 +3,7 @@ import createPersistedState from 'vuex-persistedstate'; import * as nestedProperty from 'nested-property'; import { apiUrl } from './config'; -const defaultSettings = { +export const defaultSettings = { tutorial: 0, keepCw: false, showFullAcct: false,