diff --git a/api/ChatAPI.js b/api/ChatAPI.js index 490272eff..ecb254ac7 100644 --- a/api/ChatAPI.js +++ b/api/ChatAPI.js @@ -111,4 +111,8 @@ export default class ChatAPI extends BaseAPI { typing(chatid) { return this.$post('/chatrooms', { id: chatid, action: 'Typing' }) } + + referToSupport(chatid) { + return this.$post('/chatrooms', { id: chatid, action: 'ReferToSupport' }) + } } diff --git a/components/ChatFooter.vue b/components/ChatFooter.vue index 2520b04d9..479203357 100644 --- a/components/ChatFooter.vue +++ b/components/ChatFooter.vue @@ -123,7 +123,15 @@ Central - + + Refer to Support + Send  @@ -168,6 +176,12 @@ Central +
+ +
+ Support +
+
@@ -206,6 +220,8 @@ + +
diff --git a/components/ModBanMemberModal.vue b/components/ModBanMemberModal.vue index 5707b5283..f565acef2 100644 --- a/components/ModBanMemberModal.vue +++ b/components/ModBanMemberModal.vue @@ -1,7 +1,7 @@ diff --git a/components/ModChatNoteModal.vue b/components/ModChatNoteModal.vue index 05a15b273..5b3e38e06 100644 --- a/components/ModChatNoteModal.vue +++ b/components/ModChatNoteModal.vue @@ -30,7 +30,7 @@ Close - + Add Mod Message diff --git a/components/ModChatReviewUser.vue b/components/ModChatReviewUser.vue index ff8b3da0f..39542e5e0 100644 --- a/components/ModChatReviewUser.vue +++ b/components/ModChatReviewUser.vue @@ -52,7 +52,7 @@ export default { email() { let ret = null - if (this.user) { + if (this.user && this.user.emails) { this.user.emails.forEach(e => { if (!e.ourdomain && (!ret || e.preferred)) { ret = e.email diff --git a/components/ModMemberActions.vue b/components/ModMemberActions.vue index 47ff73f2e..9556a008a 100644 --- a/components/ModMemberActions.vue +++ b/components/ModMemberActions.vue @@ -17,7 +17,7 @@ - +
@@ -26,9 +26,15 @@ import ModCommentAddModal from './ModCommentAddModal' import ModSpammerReport from './ModSpammerReport' const ConfirmModal = () => import('./ConfirmModal') +const ModBanMemberConfirmModal = () => import('./ModBanMemberConfirmModal') export default { - components: { ModSpammerReport, ModCommentAddModal, ConfirmModal }, + components: { + ModSpammerReport, + ModCommentAddModal, + ConfirmModal, + ModBanMemberConfirmModal + }, props: { userid: { diff --git a/components/ModMessage.vue b/components/ModMessage.vue index 4ed13075a..239ee4315 100644 --- a/components/ModMessage.vue +++ b/components/ModMessage.vue @@ -6,7 +6,7 @@
- +
@@ -63,13 +63,22 @@ {{ message.fromuser.displayname }}
-
- - View Email Source - +
Edit + + View Email Source + +
@@ -350,6 +359,7 @@ import GroupSelect from './GroupSelect' import MessageMap from './MessageMap' import ModMessageMicroVolunteering from './ModMessageMicroVolunteering' import twem from '~/assets/js/twem' +import SpinButton from '~/components/SpinButton' const Highlighter = () => import('vue-highlight-words') const OurFilePond = () => import('~/components/OurFilePond') @@ -378,7 +388,8 @@ export default { MessageReplyInfo, MessageUserInfo, MessageHistory, - Highlighter + Highlighter, + SpinButton }, mixins: [keywords], props: { @@ -622,6 +633,13 @@ export default { }, duplicates() { return this.checkHistory(true) + }, + memberGroupIds() { + return this.message && + this.message.fromuser && + this.message.fromuser.memberof + ? this.message.fromuser.memberof.map(g => g.id) + : [] } }, watch: { @@ -880,6 +898,11 @@ export default { this.$store.dispatch('messages/fetch', { id: this.message.id }) + }, + backToPending() { + this.$store.dispatch('messages/backToPending', { + id: this.message.id + }) } } } diff --git a/components/ModMissingTwitter.vue b/components/ModMissingTwitter.vue deleted file mode 100644 index 7fb13a42d..000000000 --- a/components/ModMissingTwitter.vue +++ /dev/null @@ -1,105 +0,0 @@ - - diff --git a/components/ModPostingHistoryModal.vue b/components/ModPostingHistoryModal.vue index 512590eed..b2492fb99 100644 --- a/components/ModPostingHistoryModal.vue +++ b/components/ModPostingHistoryModal.vue @@ -8,9 +8,10 @@ no-stacking > + diff --git a/plugins/dayjs.js b/plugins/dayjs.js index 86d2e14ca..a4246fdbf 100644 --- a/plugins/dayjs.js +++ b/plugins/dayjs.js @@ -5,6 +5,7 @@ import isSameOrBefore from 'dayjs/plugin/isSameOrBefore' import isSameOrAfter from 'dayjs/plugin/isSameOrAfter' import isBetween from 'dayjs/plugin/isBetween' import isToday from 'dayjs/plugin/isToday' +import customParseFormat from 'dayjs/plugin/customParseFormat' import dayjs from 'dayjs' @@ -15,3 +16,4 @@ dayjs.extend(isSameOrBefore) dayjs.extend(isSameOrAfter) dayjs.extend(isBetween) dayjs.extend(isToday) +dayjs.extend(customParseFormat) diff --git a/store/chats.js b/store/chats.js index b66f3fec5..cdaf82339 100644 --- a/store/chats.js +++ b/store/chats.js @@ -388,6 +388,10 @@ export const actions = { await this.$api.chat.typing(params.chatid) }, + async referToSupport({ dispatch, commit }, params) { + await this.$api.chat.referToSupport(params.id) + }, + clear({ commit }) { commit('clear') } diff --git a/store/compose.js b/store/compose.js index 7916a70ca..f773897e2 100644 --- a/store/compose.js +++ b/store/compose.js @@ -241,7 +241,6 @@ function markSubmitted(id, commit, me) { } async function backToDraft(id, dispatch, commit) { - console.log('Back to draft', id) await dispatch( 'messages/update', { diff --git a/store/group.js b/store/group.js index 8173515c2..c51eff836 100644 --- a/store/group.js +++ b/store/group.js @@ -122,6 +122,8 @@ export const actions = { lng: params.lng, onyahoo: 0, onhere: 1, + ontn: 1, + onlovejunk: 1, licenserequired: 0, showonyahoo: 0 }) diff --git a/store/messages.js b/store/messages.js index f97fef46e..25f87e136 100644 --- a/store/messages.js +++ b/store/messages.js @@ -596,6 +596,16 @@ export const actions = { } }, removeFromCache({ commit }, params) { + commit('remove', { + id: params.id + }) + }, + async backToPending({ dispatch, commit }, params) { + await this.$api.message.update({ + id: params.id, + action: 'BackToPending' + }) + commit('remove', { id: params.id })