feat: Vite + vue 3 💚 (#10047)
Fixes https://github.com/chatwoot/chatwoot/issues/8436 Fixes https://github.com/chatwoot/chatwoot/issues/9767 Fixes https://github.com/chatwoot/chatwoot/issues/10156 Fixes https://github.com/chatwoot/chatwoot/issues/6031 Fixes https://github.com/chatwoot/chatwoot/issues/5696 Fixes https://github.com/chatwoot/chatwoot/issues/9250 Fixes https://github.com/chatwoot/chatwoot/issues/9762 --------- Co-authored-by: Pranav <pranavrajs@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
This commit is contained in:
co-authored by
Pranav
Sivin Varghese
parent
e0bf2bd9d4
commit
42f6621afb
@@ -1,4 +1,3 @@
|
||||
import Vue from 'vue';
|
||||
import types from '../mutation-types';
|
||||
|
||||
import { REPLY_EDITOR_MODES } from 'dashboard/components/widgets/WootWriter/constants';
|
||||
@@ -31,16 +30,19 @@ export const actions = {
|
||||
|
||||
export const mutations = {
|
||||
[types.SET_DRAFT_MESSAGES]($state, { key, message }) {
|
||||
Vue.set($state.records, key, message);
|
||||
$state.records = {
|
||||
...$state.records,
|
||||
[key]: message,
|
||||
};
|
||||
LocalStorage.set(LOCAL_STORAGE_KEYS.DRAFT_MESSAGES, $state.records);
|
||||
},
|
||||
[types.REMOVE_DRAFT_MESSAGES]($state, { key }) {
|
||||
const { [key]: draftToBeRemoved, ...updatedRecords } = $state.records;
|
||||
Vue.set($state, 'records', updatedRecords);
|
||||
$state.records = updatedRecords;
|
||||
LocalStorage.set(LOCAL_STORAGE_KEYS.DRAFT_MESSAGES, $state.records);
|
||||
},
|
||||
[types.SET_REPLY_EDITOR_MODE]($state, { mode }) {
|
||||
Vue.set($state, 'replyEditorMode', mode);
|
||||
$state.replyEditorMode = mode;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user