Revert "feat: Adds support for draft in conversation reply box (#4205)" (#4425)

This reverts commit 5ea0436051.
This commit is contained in:
Pranav Raj S
2022-04-08 15:52:39 +05:30
committed by GitHub
parent 7e5ec7925c
commit bc7bcc20b8
10 changed files with 24 additions and 202 deletions

View File

@@ -12,11 +12,12 @@
</template>
<script>
import Banner from 'dashboard/components/ui/Banner.vue';
import { LocalStorage, LOCAL_STORAGE_KEYS } from '../../helper/localStorage';
import LocalStorage from '../../helper/localStorage';
import { mapGetters } from 'vuex';
import adminMixin from 'dashboard/mixins/isAdmin';
const semver = require('semver');
const dismissedUpdates = new LocalStorage('dismissedUpdates');
export default {
components: {
@@ -56,22 +57,16 @@ export default {
},
methods: {
isVersionNotificationDismissed(version) {
const dismissedVersions =
LocalStorage.get(LOCAL_STORAGE_KEYS.DISMISSED_UPDATES) || [];
return dismissedVersions.includes(version);
return dismissedUpdates.get().includes(version);
},
dismissUpdateBanner() {
let updatedDismissedItems =
LocalStorage.get(LOCAL_STORAGE_KEYS.DISMISSED_UPDATES) || [];
let updatedDismissedItems = dismissedUpdates.get();
if (updatedDismissedItems instanceof Array) {
updatedDismissedItems.push(this.latestChatwootVersion);
} else {
updatedDismissedItems = [this.latestChatwootVersion];
}
LocalStorage.set(
LOCAL_STORAGE_KEYS.DISMISSED_UPDATES,
updatedDismissedItems
);
dismissedUpdates.store(updatedDismissedItems);
this.latestChatwootVersion = this.globalConfig.appVersion;
},
},