تغییرات
This commit is contained in:
parent
815f61b76f
commit
a52cf49dc0
|
@ -182,7 +182,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="subject-box" v-if="source.showSubjectBox ?? false">
|
<div class="subject-box" v-if="source.showSubjectBox ?? false">
|
||||||
<div class="subject-list">
|
<div class="subject-list">
|
||||||
<button type="button" class="btn subject-list-item">
|
<div type="button" class="btn subject-list-item">
|
||||||
{{ subjectInput }}
|
{{ subjectInput }}
|
||||||
|
|
||||||
<!-- edit remove -->
|
<!-- edit remove -->
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
<use xlink:href="#icon-Component-242--1"></use>
|
<use xlink:href="#icon-Component-242--1"></use>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</button>
|
</div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
@ -79,7 +79,8 @@ import ImageUploader from "vue-image-upload-resize";
|
||||||
import chatApi from "~/apis/chatApi";
|
import chatApi from "~/apis/chatApi";
|
||||||
import keyValueApi from "~/apis/keyValueApi";
|
import keyValueApi from "~/apis/keyValueApi";
|
||||||
import { mapState, mapActions } from "pinia";
|
import { mapState, mapActions } from "pinia";
|
||||||
|
import { useChatStore } from "@chat/stores/chatStore";
|
||||||
|
import { useCommonStore } from "@stores/commonStore";
|
||||||
|
|
||||||
import privatesContextMenu from "~/json/chat/json/privatesContextMenu.json";
|
import privatesContextMenu from "~/json/chat/json/privatesContextMenu.json";
|
||||||
import groupsContextMenu from "~/json/chat/json/groupsContextMenu.json";
|
import groupsContextMenu from "~/json/chat/json/groupsContextMenu.json";
|
||||||
|
@ -359,23 +360,22 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState([
|
...mapState(useCommonStore, [
|
||||||
"isSidebarCollapsed",
|
"isSidebarCollapsed",
|
||||||
"getForwardItem",
|
"getForwardItem",
|
||||||
"userPermisionGetter",
|
"userPermisionGetter",
|
||||||
"getPanelStatus",
|
"getPanelStatus",
|
||||||
"sidebarListStatusGetter",
|
"sidebarListStatusGetter",
|
||||||
]),
|
]),
|
||||||
...mapState("list", ["listGetter"]),
|
...mapState(useChatStore, ["listGetter"]),
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions([
|
...mapActions(useChatStore, [
|
||||||
"TOGGLE_PANEL",
|
"TOGGLE_PANEL",
|
||||||
"checkPermissions",
|
"checkPermissions",
|
||||||
"SET_SIDEBAR_LIST_STATUS",
|
"SET_SIDEBAR_LIST_STATUS",
|
||||||
]),
|
]),
|
||||||
...mapActions("list", ["SET_LIST"]),
|
...mapActions(useChatStore, ["SET_LIST"]),
|
||||||
getGroupTypes() {
|
getGroupTypes() {
|
||||||
this.httpService
|
this.httpService
|
||||||
.postRequest("keyvalue/" + keyValueApi.forms.groupTypes)
|
.postRequest("keyvalue/" + keyValueApi.forms.groupTypes)
|
||||||
|
@ -607,8 +607,7 @@ export default {
|
||||||
logout(this.$route);
|
logout(this.$route);
|
||||||
this.fetchingData = false;
|
this.fetchingData = false;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
// remove group/remove lobby group
|
// remove group/remove lobby group
|
||||||
removeItem(groups, groupItem, index) {
|
removeItem(groups, groupItem, index) {
|
||||||
|
@ -785,11 +784,11 @@ export default {
|
||||||
},
|
},
|
||||||
markActive(groups, index) {
|
markActive(groups, index) {
|
||||||
if (this.prevSelectedItemIndex != index) {
|
if (this.prevSelectedItemIndex != index) {
|
||||||
this.$set(groups[this.prevSelectedItemIndex], "active", false);
|
groups[this.prevSelectedItemIndex], "active", false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.prevSelectedItemIndex = index;
|
this.prevSelectedItemIndex = index;
|
||||||
this.$set(groups[index], "active", true);
|
groups[index], "active", true;
|
||||||
},
|
},
|
||||||
|
|
||||||
resizeAction(event) {
|
resizeAction(event) {
|
||||||
|
@ -809,16 +808,16 @@ export default {
|
||||||
// برای دریافت درست پاسخ ها بایستی invite-id
|
// برای دریافت درست پاسخ ها بایستی invite-id
|
||||||
// در روت رو اصلاح کرد
|
// در روت رو اصلاح کرد
|
||||||
if (groupItem.redirectViaInviteLink)
|
if (groupItem.redirectViaInviteLink)
|
||||||
this.$set(this.$route.query, "invite-id", this.listGetter.invite_id);
|
this.$route.query, "invite-id", this.listGetter.invite_id;
|
||||||
else this.$set(this.$route.query, "invite-id", undefined);
|
else this.$route.query, "invite-id", undefined;
|
||||||
|
|
||||||
if (!this.redirectViaInviteLink)
|
if (!this.redirectViaInviteLink)
|
||||||
history.pushState({}, document.title, this.$route.path);
|
history.pushState({}, document.title, this.$route.path);
|
||||||
|
|
||||||
this.isRedirectedFromOtherSystems = false;
|
this.isRedirectedFromOtherSystems = false;
|
||||||
this.redirectViaInviteLink = false;
|
this.redirectViaInviteLink = false;
|
||||||
this.$set(this.$route.query, "group-id", undefined);
|
this.$route.query, "group-id", undefined;
|
||||||
this.$set(this.$route.query, "message-id", undefined);
|
this.$route.query, "message-id", undefined;
|
||||||
// this.$route.query["group-id"] = undefined;
|
// this.$route.query["group-id"] = undefined;
|
||||||
// this.$route.query["message-id"] = undefined;
|
// this.$route.query["message-id"] = undefined;
|
||||||
|
|
||||||
|
@ -828,28 +827,24 @@ export default {
|
||||||
lobbyParentShowMessages(lobby, parentIndex, groupItem) {
|
lobbyParentShowMessages(lobby, parentIndex, groupItem) {
|
||||||
// اگر تالارثابت باشه و کاربر بر روی گروه های تالار کلیک کند.
|
// اگر تالارثابت باشه و کاربر بر روی گروه های تالار کلیک کند.
|
||||||
if (this.prevParentSelectedItemIndex == parentIndex) {
|
if (this.prevParentSelectedItemIndex == parentIndex) {
|
||||||
this.$set(
|
|
||||||
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
||||||
this.prevSelectedItemIndex
|
this.prevSelectedItemIndex
|
||||||
],
|
],
|
||||||
"active",
|
"active",
|
||||||
false
|
false;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
// کاربر بر روی تالار دیگری کلیک کرده است.
|
// کاربر بر روی تالار دیگری کلیک کرده است.
|
||||||
else if (this.prevParentSelectedItemIndex != parentIndex) {
|
else if (this.prevParentSelectedItemIndex != parentIndex) {
|
||||||
this.$set(
|
|
||||||
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
||||||
this.prevSelectedItemIndex
|
this.prevSelectedItemIndex
|
||||||
],
|
],
|
||||||
"active",
|
"active",
|
||||||
false
|
false;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.prevParentSelectedItemIndex = parentIndex;
|
this.prevParentSelectedItemIndex = parentIndex;
|
||||||
|
|
||||||
this.$set(lobby[parentIndex], "active", true);
|
lobby[parentIndex], "active", true;
|
||||||
|
|
||||||
this.SET_LIST(groupItem);
|
this.SET_LIST(groupItem);
|
||||||
this.$emit("update-messages");
|
this.$emit("update-messages");
|
||||||
|
@ -862,29 +857,25 @@ export default {
|
||||||
this.prevParentSelectedItemIndex == parentIndex &&
|
this.prevParentSelectedItemIndex == parentIndex &&
|
||||||
this.prevSelectedItemIndex != index
|
this.prevSelectedItemIndex != index
|
||||||
) {
|
) {
|
||||||
this.$set(
|
|
||||||
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
||||||
this.prevSelectedItemIndex
|
this.prevSelectedItemIndex
|
||||||
],
|
],
|
||||||
"active",
|
"active",
|
||||||
false
|
false;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
// کاربر بر روی تالار دیگری کلیک کرده است.
|
// کاربر بر روی تالار دیگری کلیک کرده است.
|
||||||
else if (this.prevParentSelectedItemIndex != parentIndex) {
|
else if (this.prevParentSelectedItemIndex != parentIndex) {
|
||||||
this.$set(
|
|
||||||
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
lobby[this.prevParentSelectedItemIndex].sub_groups[
|
||||||
this.prevSelectedItemIndex
|
this.prevSelectedItemIndex
|
||||||
],
|
],
|
||||||
"active",
|
"active",
|
||||||
false
|
false;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.prevSelectedItemIndex = index;
|
this.prevSelectedItemIndex = index;
|
||||||
this.prevParentSelectedItemIndex = parentIndex;
|
this.prevParentSelectedItemIndex = parentIndex;
|
||||||
|
|
||||||
this.$set(lobby[parentIndex].sub_groups[index], "active", true);
|
lobby[parentIndex].sub_groups[index], "active", true;
|
||||||
|
|
||||||
this.SET_LIST(groupItem);
|
this.SET_LIST(groupItem);
|
||||||
this.$emit("update-messages");
|
this.$emit("update-messages");
|
||||||
|
@ -969,9 +960,7 @@ export default {
|
||||||
parent_id: 0,
|
parent_id: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.httpService
|
this.httpService.formDataRequest(url, payload).then((res) => {
|
||||||
.formDataRequest(url, payload)
|
|
||||||
.then((res) => {
|
|
||||||
this.fetchingData = false;
|
this.fetchingData = false;
|
||||||
|
|
||||||
// mySwalToast({
|
// mySwalToast({
|
||||||
|
@ -979,8 +968,7 @@ export default {
|
||||||
// });
|
// });
|
||||||
this.resetPagination();
|
this.resetPagination();
|
||||||
this.getAll("lobbies");
|
this.getAll("lobbies");
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -996,9 +984,7 @@ export default {
|
||||||
if (this.$route.name == "privates") {
|
if (this.$route.name == "privates") {
|
||||||
this.findUser(payload);
|
this.findUser(payload);
|
||||||
} else {
|
} else {
|
||||||
this.httpService
|
this.httpService.postRequest(url, payload).then((response) => {
|
||||||
.postRequest(url, payload)
|
|
||||||
.then((response) => {
|
|
||||||
this.groups = response.data;
|
this.groups = response.data;
|
||||||
this.users = response.users;
|
this.users = response.users;
|
||||||
this.pagination = { ...this.pagination, ...response.pagination };
|
this.pagination = { ...this.pagination, ...response.pagination };
|
||||||
|
@ -1006,15 +992,12 @@ export default {
|
||||||
if (this.searchText == "") {
|
if (this.searchText == "") {
|
||||||
this.groups = [];
|
this.groups = [];
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
findUser(query) {
|
findUser(query) {
|
||||||
const url = loginUrl() + "/user/suggestion";
|
const url = loginUrl() + "/user/suggestion";
|
||||||
this.httpService
|
this.httpService.postRequest(url, query).then((response) => {
|
||||||
.postRequest(url, query)
|
|
||||||
.then((response) => {
|
|
||||||
this.groups = response.data;
|
this.groups = response.data;
|
||||||
this.users = response.users;
|
this.users = response.users;
|
||||||
this.pagination = { ...this.pagination, ...response.pagination };
|
this.pagination = { ...this.pagination, ...response.pagination };
|
||||||
|
@ -1022,9 +1005,7 @@ export default {
|
||||||
if (this.searchText == "") {
|
if (this.searchText == "") {
|
||||||
this.groups = [];
|
this.groups = [];
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
replayCount(replays) {
|
replayCount(replays) {
|
||||||
|
@ -1047,9 +1028,7 @@ export default {
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
// this.isLoading = false;
|
// this.isLoading = false;
|
||||||
this.foundUsers = response.data ?? [];
|
this.foundUsers = response.data ?? [];
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1147,16 +1126,13 @@ export default {
|
||||||
.postRequest(url, payload)
|
.postRequest(url, payload)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// this.$route.query["invite-id"] = undefined;
|
// this.$route.query["invite-id"] = undefined;
|
||||||
this.$set(this.$route.query, "invite-id", undefined);
|
this.$route.query, "invite-id", undefined;
|
||||||
this.groupId = res.data.id;
|
this.groupId = res.data.id;
|
||||||
this.resetPagination();
|
this.resetPagination();
|
||||||
|
|
||||||
this.getAll(this.$route.name);
|
this.getAll(this.$route.name);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {});
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// #region mehdi
|
// #region mehdi
|
||||||
|
@ -1207,6 +1183,5 @@ export default {
|
||||||
},
|
},
|
||||||
// #endregion
|
// #endregion
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -39,8 +39,8 @@ export default {
|
||||||
payload.file = fileItem;
|
payload.file = fileItem;
|
||||||
payload.length = fileItem.size;
|
payload.length = fileItem.size;
|
||||||
|
|
||||||
this.fileUploadHttpService
|
this.httpService
|
||||||
.formDataRequest(url, payload)
|
.formDataRequest(messageUrl() +url, payload)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
// this.closeDroppedList();
|
// this.closeDroppedList();
|
||||||
// this.toLastItem();
|
// this.toLastItem();
|
||||||
|
@ -66,8 +66,8 @@ export default {
|
||||||
payload.file = this.files[0];
|
payload.file = this.files[0];
|
||||||
payload.length = this.files[0].size;
|
payload.length = this.files[0].size;
|
||||||
|
|
||||||
return await this.fileUploadHttpService
|
return await this.httpService
|
||||||
.formDataRequest(url, payload)
|
.formDataRequest(messageUrl() +url, payload)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.closeDroppedList();
|
this.closeDroppedList();
|
||||||
|
|
||||||
|
|
|
@ -75,11 +75,12 @@ export default {
|
||||||
|
|
||||||
// #endregion
|
// #endregion
|
||||||
rerenderChatList: 1,
|
rerenderChatList: 1,
|
||||||
|
enablePanelToggling: 1,
|
||||||
showListPanel: false,
|
showListPanel: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useCommonStore, [
|
...mapState(useChatStore, [
|
||||||
"getPanelStatus",
|
"getPanelStatus",
|
||||||
"isSidebarCollapsed",
|
"isSidebarCollapsed",
|
||||||
"sidebarListStatusGetter",
|
"sidebarListStatusGetter",
|
||||||
|
@ -136,6 +137,7 @@ export default {
|
||||||
|
|
||||||
// #region mehdi
|
// #region mehdi
|
||||||
openPagGrup(data) {
|
openPagGrup(data) {
|
||||||
|
console.log("🚀 ~ openPagGrup ~ data:", data)
|
||||||
this.enablePanelToggling = data;
|
this.enablePanelToggling = data;
|
||||||
if (this.enablePanelToggling == 1) {
|
if (this.enablePanelToggling == 1) {
|
||||||
this.showToggleListPanel();
|
this.showToggleListPanel();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user